aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 08:09:36 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 08:09:36 +0000
commit59274adc20aa0dcb88d9bc410c42b785cde0d3f9 (patch)
treedf7e91f88375287f5826b4f81eda9814407e74a5
parent940a2c4533fd43a1013108df9552042c6923c390 (diff)
downloadelgg-59274adc20aa0dcb88d9bc410c42b785cde0d3f9.tar.gz
elgg-59274adc20aa0dcb88d9bc410c42b785cde0d3f9.tar.bz2
Closes #783: Initial cache write on start now checks whether elgg has been fully installed before proceeding.
git-svn-id: https://code.elgg.org/elgg/trunk@2774 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/start.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/engine/start.php b/engine/start.php
index a77da9caa..e967d292e 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -200,14 +200,16 @@
$oldview = $CONFIG->view;
}
- $lastupdate = datalist_get('simplecache_lastupdate');
- $lastcached = datalist_get('simplecache_'.$oldview);
- if ($lastupdate == 0 || $lastcached < $lastupdate) {
- elgg_view_regenerate_simplecache();
- $lastcached = time();
- datalist_set('simplecache_lastupdate',$lastcached);
- datalist_set('simplecache_'.$oldview,$lastcached);
+ if (($installed) && ($db_installed))
+ {
+ $lastupdate = datalist_get('simplecache_lastupdate');
+ $lastcached = datalist_get('simplecache_'.$oldview);
+ if ($lastupdate == 0 || $lastcached < $lastupdate) {
+ elgg_view_regenerate_simplecache();
+ $lastcached = time();
+ datalist_set('simplecache_lastupdate',$lastcached);
+ datalist_set('simplecache_'.$oldview,$lastcached);
+ }
+ $CONFIG->lastcache = $lastcached;
}
- $CONFIG->lastcache = $lastcached;
-
?> \ No newline at end of file