From 76b193c69818187b5d52fdcd3d07873c343aa5d9 Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind1991@gmail.com> Date: Sun, 8 Jan 2012 13:01:41 +0100 Subject: [PATCH] don't try to upgrade what isn't installed --- lib/base.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/base.php b/lib/base.php index c3965c9cd3..854b91b0c1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -152,14 +152,16 @@ class OC{ } } - $installedVersion=OC_Config::getValue('version','0.0.0'); - $currentVersion=implode('.',OC_Util::getVersion()); - if (version_compare($currentVersion, $installedVersion, '>')) { - OC_DB::updateDbFromStructure('../db_structure.xml'); - OC_Config::setValue('version',implode('.',OC_Util::getVersion())); - } + if(OC_Config::getValue('installed', false)){ + $installedVersion=OC_Config::getValue('version','0.0.0'); + $currentVersion=implode('.',OC_Util::getVersion()); + if (version_compare($currentVersion, $installedVersion, '>')) { + OC_DB::updateDbFromStructure('../db_structure.xml'); + OC_Config::setValue('version',implode('.',OC_Util::getVersion())); + } - OC_App::updateApps(); + OC_App::updateApps(); + } ini_set('session.cookie_httponly','1;'); session_start(); -- GitLab