diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-04-03 17:41:32 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-04-03 17:41:32 +0000 |
commit | ce4df7b66b9b7475b28eaaf3ca92f043f511cf3e (patch) | |
tree | 76f860216ba376ac3fb9a6e59cb710046a04faf1 /includes/registry.inc | |
parent | 238c2a61e6337c6cca094a06ee90667c2ada5988 (diff) | |
download | brdo-ce4df7b66b9b7475b28eaaf3ca92f043f511cf3e.tar.gz brdo-ce4df7b66b9b7475b28eaaf3ca92f043f511cf3e.tar.bz2 |
- Patch #422374 by JamesAn: convert to use the new static caching API.
Diffstat (limited to 'includes/registry.inc')
-rw-r--r-- | includes/registry.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/registry.inc b/includes/registry.inc index 35caaa3fb..3fb3a9964 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -145,7 +145,7 @@ function _registry_parse_files($files) { * (optional) Weight of the module. */ function _registry_parse_file($filename, $contents, $module = '', $weight = 0) { - static $map = array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface'); + $map = &drupal_static(__FUNCTION__, array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface')); // Delete registry entries for this file, so we can insert the new resources. db_delete('registry') ->condition('filename', $filename) @@ -207,7 +207,7 @@ function _registry_parse_file($filename, $contents, $module = '', $weight = 0) { function _registry_get_resource_name(&$tokens = NULL, $type = NULL) { // Keep a running list of all resources we've saved so far, so that we never // save one more than once. - static $resources; + $resources = &drupal_static(__FUNCTION__); if (!isset($tokens)) { $resources = array(); |