summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-01-06 14:40:51 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-01-06 14:40:51 +0100
commit622c4cf77903470bc7ddc1df5b74d5e17a0e70c7 (patch)
tree79f0e6b00fd7f89b8d8de8249ebaff67e876cdc6
parent68efeba343f05c48763ce176bb7a1359879245b3 (diff)
parentfc38d4cc813215a6761e671380f774095575b076 (diff)
downloadnextcloud-server-622c4cf77903470bc7ddc1df5b74d5e17a0e70c7.tar.gz
nextcloud-server-622c4cf77903470bc7ddc1df5b74d5e17a0e70c7.zip
Merge pull request #13122 from owncloud/fix-licence-apps-management
fixing wrong usage of license vs licence
-rw-r--r--settings/controller/appsettingscontroller.php9
-rw-r--r--settings/templates/apps.php4
2 files changed, 10 insertions, 3 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php
index b9e60c376de..3688859ef56 100644
--- a/settings/controller/appsettingscontroller.php
+++ b/settings/controller/appsettingscontroller.php
@@ -120,6 +120,8 @@ class AppSettingsController extends Controller {
// fix groups to be an array
$dependencyAnalyzer = new DependencyAnalyzer(new Platform($this->config), $this->l10n);
$apps = array_map(function($app) use ($dependencyAnalyzer) {
+
+ // fix groups
$groups = array();
if (is_string($app['groups'])) {
$groups = json_decode($app['groups']);
@@ -127,11 +129,16 @@ class AppSettingsController extends Controller {
$app['groups'] = $groups;
$app['canUnInstall'] = !$app['active'] && $app['removable'];
+ // fix licence vs license
+ if (isset($app['license']) && !isset($app['licence'])) {
+ $app['licence'] = $app['license'];
+ }
+
// analyse dependencies
$missing = $dependencyAnalyzer->analyze($app);
-
$app['canInstall'] = empty($missing);
$app['missingDependencies'] = $missing;
+
return $app;
}, $apps);
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index ae87297bb14..02cab16dec5 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -22,8 +22,8 @@
<h2 class="app-name"><a href="{{detailpage}}" target="_blank">{{name}}</a></h2>
<div class="app-version"> {{version}}</div>
<div class="app-author"><?php p($l->t('by')); ?> {{author}}
- {{#if license}}
- ({{license}}-<?php p($l->t('licensed')); ?>)
+ {{#if licence}}
+ ({{licence}}-<?php p($l->t('licensed')); ?>)
{{/if}}
</div>
{{#if score}}