* 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'])){
$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));
}
$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';