diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-16 15:33:47 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-16 15:33:47 +0000 |
commit | 9330baece53a1e0adb5e8ae08dfec4dfec7ca2de (patch) | |
tree | ef25f0d49764c40554f49478143940c21b376593 /engine/start.php | |
parent | b2537fa6483ee7f637e97beb6b2933a9d0c01841 (diff) | |
download | elgg-9330baece53a1e0adb5e8ae08dfec4dfec7ca2de.tar.gz elgg-9330baece53a1e0adb5e8ae08dfec4dfec7ca2de.tar.bz2 |
Views simplecache improvements.
git-svn-id: https://code.elgg.org/elgg/trunk@2766 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/start.php')
-rw-r--r-- | engine/start.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/engine/start.php b/engine/start.php index 067e6c9b0..2960c938c 100644 --- a/engine/start.php +++ b/engine/start.php @@ -134,6 +134,9 @@ $files = get_library_files(dirname(__FILE__) . "/lib",$file_exceptions);
asort($files);
+
+ // Get config
+ global $CONFIG;
// Include them
foreach($files as $file) {
@@ -190,6 +193,19 @@ // System booted, return to normal view
set_input('view', $oldview);
+ if (empty($oldview)) {
+ if (empty($CONFIG->view))
+ $oldview = 'default';
+ else
+ $oldview = $CONFIG->view;
+ }
+
+ $lastcached = datalist_get('simplecache_'.$oldview);
+ if ($lastcached < (time() - (86400 * 7))) {
+ elgg_view_regenerate_simplecache();
+ $lastcached = time();
+ datalist_set('simplecache_'.$oldview,$lastcached);
+ }
+ $CONFIG->lastcache = $lastcached;
- run_function_once('elgg_view_regenerate_simplecache',time() - (86400 * 7));
?>
\ No newline at end of file |