diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-15 16:55:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-15 16:55:35 +0000 |
commit | 84beb25884b2e45d245ba2d8367d6b1306cd27cb (patch) | |
tree | 64f4a61fd92ef923436d7bc67b766e5e2e040fdc | |
parent | 2e9bbda79198879adba89eda98e4a4867d9d3cd9 (diff) | |
download | brdo-84beb25884b2e45d245ba2d8367d6b1306cd27cb.tar.gz brdo-84beb25884b2e45d245ba2d8367d6b1306cd27cb.tar.bz2 |
- Patch #44771 by jvandyk: small performance improvement.
-rw-r--r-- | includes/form.inc | 5 | ||||
-rw-r--r-- | includes/pager.inc | 2 |
2 files changed, 3 insertions, 4 deletions
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)) { |