diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-01 21:47:22 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-04 11:40:33 +0100 |
commit | b469e9f6fb83758ad91b8e41d81319ab3a73f098 (patch) | |
tree | 5ccc10851661957739d893d914c278e1b18ff409 /settings/controller/appsettingscontroller.php | |
parent | f74d568bdac14390a787a71f91571d84662f1fbe (diff) | |
download | nextcloud-server-b469e9f6fb83758ad91b8e41d81319ab3a73f098.tar.gz nextcloud-server-b469e9f6fb83758ad91b8e41d81319ab3a73f098.zip |
introduce dependency analyzer to take care of app dependencies
some more unit tests on xml info parser
Diffstat (limited to 'settings/controller/appsettingscontroller.php')
-rw-r--r-- | settings/controller/appsettingscontroller.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index 27205400aff..1f7e3b259fe 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -11,6 +11,8 @@ namespace OC\Settings\Controller; +use OC\App\DependencyAnalyzer; +use OC\App\Platform; use \OCP\AppFramework\Controller; use OCP\IRequest; use OCP\IL10N; @@ -123,10 +125,16 @@ class AppSettingsController extends Controller { } $app['groups'] = $groups; $app['canUnInstall'] = !$app['active'] && $app['removable']; + + // analyse dependencies + $dependencyAnalyzer = new DependencyAnalyzer($app, new Platform(), $this->l10n); + $missing = $dependencyAnalyzer->analyze(); + + $app['canInstall'] = empty($missing); + $app['missingDependencies'] = $missing; return $app; }, $apps); return array('apps' => $apps, 'status' => 'success'); } - } |