From: Hypolite Petovan Date: Fri, 26 Apr 2019 13:11:01 +0000 (-0400) Subject: Normalize how we store enabled addons/themes in config value to straight comma-separa... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fb503e82bf6d9dd05e857626251ee56d5d4cbf54;p=friendica.git Normalize how we store enabled addons/themes in config value to straight comma-separated list --- diff --git a/src/Core/Addon.php b/src/Core/Addon.php index 2c28c24ee9..4dd34eb16f 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 ae389515c2..37e673e404 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) {