log upgrades

This commit is contained in:
Robin Appelman 2012-05-19 01:55:20 +02:00
parent df64b9b0e9
commit b096fd9ed8
2 changed files with 2 additions and 1 deletions

View File

@ -495,7 +495,6 @@ class OC_App{
* check if any apps need updating and update those
*/
public static function updateApps(){
// The rest comes here
$versions = self::getAppVersions();
//ensure files app is installed for upgrades
if(!isset($versions['files'])){
@ -505,6 +504,7 @@ class OC_App{
$currentVersion=OC_App::getAppVersion($app);
if ($currentVersion) {
if (version_compare($currentVersion, $installedVersion, '>')) {
OC_Log::write($app,'starting app upgrade from '.$installedVersion.' to '.$currentVersion,OC_Log::DEBUG);
OC_App::updateApp($app);
OC_Appconfig::setValue($app,'installed_version',OC_App::getAppVersion($app));
}

View File

@ -223,6 +223,7 @@ class OC{
$installedVersion=OC_Config::getValue('version','0.0.0');
$currentVersion=implode('.',OC_Util::getVersion());
if (version_compare($currentVersion, $installedVersion, '>')) {
OC_Log::write('core','starting upgrade from '.$installedVersion.' to '.$currentVersion,OC_Log::DEBUG);
$result=OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/db_structure.xml');
if(!$result){
echo 'Error while upgrading the database';