summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-27 15:20:33 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-27 15:20:33 +0200
commit02f682b156998a3f3f94fd506867c28eba878da9 (patch)
treeea401db4b0d3f1708452f74b3636ba735b192765 /lib
parent146583a98d632fceaff1642cd9bc3b566c51615a (diff)
downloadnextcloud-server-02f682b156998a3f3f94fd506867c28eba878da9.tar.gz
nextcloud-server-02f682b156998a3f3f94fd506867c28eba878da9.zip
Now showing disabled apps as upgrade status line
- Added app id in update overview. - Added status message for disabled app for CLI upgrade and web upgrade
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/private/app.php8
-rw-r--r--lib/private/updater.php5
3 files changed, 13 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 455e8ad4613..7bca1b7c877 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -298,7 +298,7 @@ class OC {
foreach ($apps as $appId) {
$info = OC_App::getAppInfo($appId);
if(!OC_App::isAppCompatible($version, $info)) {
- $incompatibleApps[] = $info['name'];
+ $incompatibleApps[] = $info;
}
}
$tmpl->assign('appList', $incompatibleApps);
diff --git a/lib/private/app.php b/lib/private/app.php
index 50065197eb4..ea0453e58ea 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -889,8 +889,14 @@ class OC_App{
* ownCloud version. disable them if not.
* This is important if you upgrade ownCloud and have non ported 3rd
* party apps installed.
+ *
+ * @param array $apps optional app id list to check, uses all enabled apps
+ * when not specified
+ *
+ * @return array containing the list of ids of the disabled apps
*/
public static function checkAppsRequirements($apps = array()) {
+ $disabledApps = array();
if (empty($apps)) {
$apps = OC_App::getEnabledApps();
}
@@ -905,8 +911,10 @@ class OC_App{
OC_Log::ERROR);
OC_App::disable( $app );
OC_Hook::emit('update', 'success', 'Disabled '.$info['name'].' app because it is not compatible');
+ $disabledApps[] = $app;
}
}
+ return $disabledApps;
}
/**
diff --git a/lib/private/updater.php b/lib/private/updater.php
index d8694ac6ed5..58d3cab73aa 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -134,7 +134,10 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'failure', array($exception->getMessage()));
}
\OC_Config::setValue('version', implode('.', \OC_Util::getVersion()));
- \OC_App::checkAppsRequirements();
+ $disabledApps = \OC_App::checkAppsRequirements();
+ if (!empty($disabledApps)) {
+ $this->emit('\OC\Updater', 'disabledApps', array($disabledApps));
+ }
// load all apps to also upgrade enabled apps
\OC_App::loadApps();