X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FTheme.php;h=dea3e20e647b2ed0740a6535d135c2b80863b2b3;hb=388b963714895b6aee59648084fe4a66a0964efc;hp=7a59f11325cd6ef6730e9ffdd41335050549520d;hpb=0191f5242bfd3bc2d8d3139bf2f144a7d738cbe7;p=friendica.git diff --git a/src/Core/Theme.php b/src/Core/Theme.php index 7a59f11325..dea3e20e64 100644 --- a/src/Core/Theme.php +++ b/src/Core/Theme.php @@ -6,7 +6,7 @@ namespace Friendica\Core; -use Friendica\BaseObject; +use Friendica\DI; use Friendica\Model\Profile; use Friendica\Util\Strings; @@ -31,12 +31,12 @@ class Theme } } - return $allowed_themes; + return array_unique($allowed_themes); } public static function setAllowedList(array $allowed_themes) { - Config::set('system', 'allowed_themes', implode(',', $allowed_themes)); + Config::set('system', 'allowed_themes', implode(',', array_unique($allowed_themes))); } /** @@ -194,7 +194,7 @@ class Theme */ public static function getPathForFile($file) { - $a = BaseObject::getApp(); + $a = DI::app(); $theme = $a->getCurrentTheme(); @@ -232,7 +232,7 @@ class Theme return 'view/theme/' . $theme . '/style.css'; } - $a = BaseObject::getApp(); + $a = DI::app(); $query_params = [];