From fb503e82bf6d9dd05e857626251ee56d5d4cbf54 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 26 Apr 2019 09:11:01 -0400 Subject: [PATCH] Normalize how we store enabled addons/themes in config value to straight comma-separated list --- src/Core/Addon.php | 3 ++- src/Core/Theme.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/Addon.php b/src/Core/Addon.php index 2c28c24ee..4dd34eb16 100644 --- a/src/Core/Addon.php +++ b/src/Core/Addon.php @@ -2,6 +2,7 @@ /** * @file src/Core/Addon.php */ + namespace Friendica\Core; use Friendica\BaseObject; @@ -313,7 +314,7 @@ class Addon extends BaseObject */ public static function saveEnabledList() { - return Config::set('system', 'addon', implode(', ', self::$addons)); + return Config::set('system', 'addon', implode(',', self::$addons)); } /** diff --git a/src/Core/Theme.php b/src/Core/Theme.php index ae389515c..37e673e40 100644 --- a/src/Core/Theme.php +++ b/src/Core/Theme.php @@ -20,7 +20,7 @@ class Theme public static function getAllowedList() { $allowed_themes_str = Config::get('system', 'allowed_themes'); - $allowed_themes_raw = explode(',', $allowed_themes_str); + $allowed_themes_raw = explode(',', str_replace(' ', '', $allowed_themes_str)); $allowed_themes = []; if (count($allowed_themes_raw)) { foreach ($allowed_themes_raw as $theme) {