From ce4df7b66b9b7475b28eaaf3ca92f043f511cf3e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 3 Apr 2009 17:41:32 +0000 Subject: - Patch #422374 by JamesAn: convert to use the new static caching API. --- includes/registry.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/registry.inc') 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(); -- cgit v1.2.3