]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/style.php
Merge pull request #7060 from annando/ap-connect
[friendica.git] / view / theme / frio / style.php
index 7570ae0e5774b13ba52de1b78f39921ffea624ef..6a8aaf2c2819fcd06e1e292573c4b1934b421be1 100644 (file)
@@ -2,19 +2,21 @@
 /**
  * @file view/theme/frio/style.php
  */
+
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
-use Friendica\Model\Profile;
+use Friendica\Util\Strings;
 
 require_once 'view/theme/frio/php/PHPColors/Color.php';
 
+$scheme = '';
 $schemecss = '';
 $schemecssfile = false;
 $scheme_modified = 0;
 
 if ($a->module !== 'install') {
        // Get the UID of the profile owner.
-       $uid = Profile::getThemeUid();
+       $uid = defaults($_REQUEST, 'puid', 0);
        if ($uid) {
                PConfig::load($uid, 'frio');
 
@@ -67,9 +69,7 @@ if (!empty($_REQUEST['scheme'])) {
        $scheme = $_REQUEST['scheme'];
 }
 
-// Sanitize the data.
-$scheme = !empty($scheme) ? basename($scheme) : '';
-
+$scheme = Strings::sanitizeFilePathItem($scheme);
 
 if (($scheme) && ($scheme != '---')) {
        if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {