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

2022.09-rc
Hypolite Petovan 2019-04-26 09:11:01 -04:00
rodzic 26bee52212
commit fb503e82bf
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

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