diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-29 19:02:21 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-29 19:02:21 +0000 |
commit | 35c39df3d382f5e79d8833bebcfaeb4041c9c3e6 (patch) | |
tree | d6ceb65e74856b5ea0f8e2d5cdad7e19d3b32729 /engine/lib | |
parent | 85ba73cbe4ac331c89fd5bccef055bb6b262c87c (diff) | |
download | elgg-35c39df3d382f5e79d8833bebcfaeb4041c9c3e6.tar.gz elgg-35c39df3d382f5e79d8833bebcfaeb4041c9c3e6.tar.bz2 |
Fixes #1470, Fixes #1471: elgg_view_regenerate_simplecache() no longer triggers the pagesetup/system hook. Fixes problems with creating the submenu.
git-svn-id: http://code.elgg.org/elgg/trunk@3855 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 021af5e48..4c45da6e9 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -375,6 +375,14 @@ function elgg_view_register_simplecache($viewname) { function elgg_view_regenerate_simplecache() { global $CONFIG; + // @todo elgg_view() checks if the page set is done (isset($CONFIG->pagesetupdone)) and + // triggers an event if it's not. Calling elgg_view() here breaks submenus + // (at least) because the page setup hook is called before any + // contexts can be correctly set (since this is called before page_handler()). + // To avoid this, lie about $CONFIG->pagehandlerdone to force + // the trigger correctly when the first view is actually being output. + $CONFIG->pagesetupdone = TRUE; + if (isset($CONFIG->views->simplecache)) { if (!file_exists($CONFIG->dataroot . 'views_simplecache')) { @mkdir($CONFIG->dataroot . 'views_simplecache'); @@ -391,8 +399,10 @@ function elgg_view_regenerate_simplecache() { } } - datalist_set('simplecache_lastupdate', 0); + datalist_set('simplecache_lastupdate', 0); } + + unset($CONFIG->pagesetupdone); } /** |