From 84beb25884b2e45d245ba2d8367d6b1306cd27cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 15 Jan 2006 16:55:35 +0000 Subject: - Patch #44771 by jvandyk: small performance improvement. --- includes/form.inc | 5 ++--- includes/pager.inc | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/form.inc b/includes/form.inc index 174f68432..ea950cbca 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -409,15 +409,14 @@ function _form_sort($a, $b) { function _element_info($type, $refresh = null) { static $cache; - $parents = array(); $basic_defaults = array( '#description' => NULL, '#attributes' => array(), '#required' => FALSE, '#tree' => FALSE, - '#parents' => $parents + '#parents' => array() ); - if ($refresh || !isset($cache)) { + if (!isset($cache) || $refresh) { $cache = array(); foreach (module_implements('elements') as $module) { $elements = module_invoke($module, 'elements'); diff --git a/includes/pager.inc b/includes/pager.inc index 186810fb7..80d80dd82 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -361,7 +361,7 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at $query[] = $key .'='. $value; } - // Set each pager link title + // Set each pager link title if (!isset($attributes['title'])) { static $titles = null; if (!isset($titles)) { -- cgit v1.2.3