1
0
Fork 0

Normalize how we store enabled addons/themes in config value to straight comma-separated list

This commit is contained in:
Hypolite Petovan 2019-04-26 09:11:01 -04:00
parent 26bee52212
commit fb503e82bf
2 changed files with 3 additions and 2 deletions

View file

@ -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));
}
/**

View file

@ -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) {