diff options
author | Robin Appelman <icewind1991@gmail.com> | 2012-01-08 13:01:41 +0100 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2012-01-08 13:01:59 +0100 |
commit | 76b193c69818187b5d52fdcd3d07873c343aa5d9 (patch) | |
tree | c8dd12d313698a9c9b5c7c8021be47aeede5c13f /lib/base.php | |
parent | c2392bbace7511dfa424513ba88a8d76f3ee620c (diff) | |
download | nextcloud-server-76b193c69818187b5d52fdcd3d07873c343aa5d9.tar.gz nextcloud-server-76b193c69818187b5d52fdcd3d07873c343aa5d9.zip |
don't try to upgrade what isn't installed
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/base.php b/lib/base.php index c3965c9cd39..854b91b0c1d 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(); |