From 59274adc20aa0dcb88d9bc410c42b785cde0d3f9 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 17 Feb 2009 08:09:36 +0000 Subject: 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 --- engine/start.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'engine') 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 -- cgit v1.2.3