]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Theme.php
Replace BaseObject class with DI::* calls
[friendica.git] / src / Core / Theme.php
index 7a59f11325cd6ef6730e9ffdd41335050549520d..dea3e20e647b2ed0740a6535d135c2b80863b2b3 100644 (file)
@@ -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 = [];