summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-07 18:24:55 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-07 18:24:55 +0000
commitaaaf8f572d1b7a5cb0d0e5b68a5f788adee222b2 (patch)
tree5f27aa04ba22fc2cb664ba4aab9c19fd75e1d59c /includes
parent9a971410dfadb631ea14fd6ee837d72b863a9f5e (diff)
downloadbrdo-aaaf8f572d1b7a5cb0d0e5b68a5f788adee222b2.tar.gz
brdo-aaaf8f572d1b7a5cb0d0e5b68a5f788adee222b2.tar.bz2
#198620 by yched: a tiny bit of optimization in menu_router_rebuild(); do not try to use the cache when resetting is asked
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index d89629622..7c19b1d8e 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1519,8 +1519,7 @@ function menu_router_build($reset = FALSE) {
static $menu;
if (!isset($menu) || $reset) {
- $cache = cache_get('router:', 'cache_menu');
- if (!$reset && $cache && isset($cache->data)) {
+ if (!$reset && ($cache = cache_get('router:', 'cache_menu')) && isset($cache->data)) {
$menu = $cache->data;
}
else {