Created
September 5, 2014 14:20
-
-
Save arturo-c/e27b563aa9bf6e12728d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/www/includes/module.inc b/www/includes/module.inc | |
index 58dfac1..6e41ba3 100644 | |
--- a/www/includes/module.inc | |
+++ b/www/includes/module.inc | |
@@ -446,7 +446,8 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE, $write_cache = | |
if ($reset) { | |
$implementations = array(); | |
$verified = array(); | |
- cache_set('module_implements', array(array(), array())); | |
+ cache_set('module_implements', array()); | |
+ cache_set('module_implements_verified', array()); | |
return; | |
} | |
@@ -456,7 +457,8 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE, $write_cache = | |
// be optimized as tightly, and not doing so keeps the cache entry smaller. | |
if (isset($implementations['#write_cache']) && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')) { | |
unset($implementations['#write_cache']); | |
- cache_set('module_implements', array($implementations, $verified)); | |
+ cache_set('module_implements', $implementations); | |
+ cache_set('module_implements_verified', $verified); | |
} | |
return; | |
} | |
@@ -469,7 +471,8 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE, $write_cache = | |
$verified = array(); | |
} | |
else { | |
- list($implementations, $verified) = $cache->data; | |
+ $implementations = $cache->data; | |
+ $verified = $cache->data; | |
} | |
} | |
@@ -499,11 +502,15 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE, $write_cache = | |
} | |
} | |
$verified[$hook] = TRUE; | |
- $write_cache = TRUE; | |
+ $write_cache_verified = TRUE; | |
} | |
if ($write_cache) { | |
- cache_set('module_implements', array($implementations, $verified)); | |
+ cache_set('module_implements', $implementations); | |
+ } | |
+ | |
+ if (!empty($write_cache_verified)) { | |
+ cache_set('module_implements_verified', $verified); | |
} | |
// The explicit cast forces a copy to be made. This is needed because |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment