From fc38d4cc813215a6761e671380f774095575b076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 6 Jan 2015 13:07:17 +0100 Subject: [PATCH] fixing wrong usage of license vs licence --- settings/controller/appsettingscontroller.php | 9 ++++++++- settings/templates/apps.php | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index b9e60c376d..3688859ef5 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 ae87297bb1..02cab16dec 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -22,8 +22,8 @@

{{name}}

{{version}}
t('by')); ?> {{author}} - {{#if license}} - ({{license}}-t('licensed')); ?>) + {{#if licence}} + ({{licence}}-t('licensed')); ?>) {{/if}}
{{#if score}}