Commit 84beb258 authored by Dries's avatar Dries
Browse files

- Patch #44771 by jvandyk: small performance improvement.

parent 2e9bbda7
...@@ -409,15 +409,14 @@ function _form_sort($a, $b) { ...@@ -409,15 +409,14 @@ function _form_sort($a, $b) {
function _element_info($type, $refresh = null) { function _element_info($type, $refresh = null) {
static $cache; static $cache;
$parents = array();
$basic_defaults = array( $basic_defaults = array(
'#description' => NULL, '#description' => NULL,
'#attributes' => array(), '#attributes' => array(),
'#required' => FALSE, '#required' => FALSE,
'#tree' => FALSE, '#tree' => FALSE,
'#parents' => $parents '#parents' => array()
); );
if ($refresh || !isset($cache)) { if (!isset($cache) || $refresh) {
$cache = array(); $cache = array();
foreach (module_implements('elements') as $module) { foreach (module_implements('elements') as $module) {
$elements = module_invoke($module, 'elements'); $elements = module_invoke($module, 'elements');
......
...@@ -361,7 +361,7 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at ...@@ -361,7 +361,7 @@ function theme_pager_link($text, $page_new, $element, $parameters = array(), $at
$query[] = $key .'='. $value; $query[] = $key .'='. $value;
} }
// Set each pager link title // Set each pager link title
if (!isset($attributes['title'])) { if (!isset($attributes['title'])) {
static $titles = null; static $titles = null;
if (!isset($titles)) { if (!isset($titles)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment