]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/scheme.php
Happy New Year 2023!
[friendica.git] / view / theme / frio / php / scheme.php
index ced19327e8becd9b4dc78d7ce2cce7f461572ba4..5140f33b2c71085b191c12b13f90d01681d9325b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -42,7 +42,7 @@ function get_scheme_info($scheme)
        $theme = DI::app()->getCurrentTheme();
        $themepath = 'view/theme/' . $theme . '/';
        if (empty($scheme)) {
-               $scheme = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema'));
+               $scheme = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'frio', 'scheme', DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'frio', 'schema', '---'));
        }
 
        $scheme = Strings::sanitizeFilePathItem($scheme);
@@ -56,7 +56,9 @@ function get_scheme_info($scheme)
                'accented' => false,
        ];
 
-       if (!is_file($themepath . 'scheme/' . $scheme . '.php')) return $info;
+       if (!is_file($themepath . 'scheme/' . $scheme . '.php')) {
+               return $info;
+       }
 
        $f = file_get_contents($themepath . 'scheme/' . $scheme . '.php');