don't try to upgrade what isn't installed

This commit is contained in:
Robin Appelman 2012-01-08 13:01:41 +01:00
parent c2392bbace
commit 76b193c698
1 changed files with 9 additions and 7 deletions

View 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();