summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-05 11:28:01 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-05 11:28:01 -0500
commit89823ef4f98640e43163223c7fab95d677a93ad0 (patch)
tree89d0e2641835eb5a959260b246a27d437848ab45 /lib/app.php
parent6b2216f0d6ca610178ef295c1a9c6e246f5fc6da (diff)
downloadnextcloud-server-89823ef4f98640e43163223c7fab95d677a93ad0.tar.gz
nextcloud-server-89823ef4f98640e43163223c7fab95d677a93ad0.zip
Modify and include additional update messages from updating apps
Diffstat (limited to 'lib/app.php')
-rwxr-xr-xlib/app.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/app.php b/lib/app.php
index 596f3bf3a79..48bbe53c744 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -634,15 +634,17 @@ class OC_App{
if ($currentVersion) {
$installedVersion = $versions[$app];
if (version_compare($currentVersion, $installedVersion, '>')) {
+ $info = self::getAppInfo($app);
OC_Log::write($app, 'starting app upgrade from '.$installedVersion.' to '.$currentVersion, OC_Log::DEBUG);
try {
OC_App::updateApp($app);
+ OC_Hook::emit('update', 'success', 'Updated '.$info['name'].' app');
}
catch (Exception $e) {
echo 'Failed to upgrade "'.$app.'". Exception="'.$e->getMessage().'"';
+ OC_Hook::emit('update', 'failure', 'Error updating '.$info['name'].' app: '.$e->getMessage());
die;
}
- OC_Hook::emit('update', 'success', 'Updated '.$app.' app');
OC_Appconfig::setValue($app, 'installed_version', OC_App::getAppVersion($app));
}
}
@@ -665,6 +667,7 @@ class OC_App{
if(!isset($info['require']) or (($version[0].'.'.$version[1])>$info['require'])) {
OC_Log::write('core', 'App "'.$info['name'].'" ('.$app.') can\'t be used because it is not compatible with this version of ownCloud', OC_Log::ERROR);
OC_App::disable( $app );
+ OC_Hook::emit('update', 'success', 'Disabled '.$info['name'].' app because it is not compatible');
}
}
}