]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't try to upgrade what isn't installed
authorRobin Appelman <icewind1991@gmail.com>
Sun, 8 Jan 2012 12:01:41 +0000 (13:01 +0100)
committerRobin Appelman <icewind1991@gmail.com>
Sun, 8 Jan 2012 12:01:59 +0000 (13:01 +0100)
lib/base.php

index c3965c9cd39683e7a6fc2a12dfc2f458bb2dc20e..854b91b0c1d9876c116f0a20930cb7b806101235 100644 (file)
@@ -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();