]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/style.php
Make the site admin theme setting link go to the currently selected theme
[friendica.git] / view / theme / vier / style.php
index 196d3776561e165632fcfaa184f55ba206134fd6..69bfc78d88abfff0347a98c99db71df7b4f4b921 100644 (file)
@@ -7,7 +7,7 @@ use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Model\Profile;
 
-$uid = Profile::getThemeUid();
+$uid = defaults($_REQUEST, 'puid', 0);
 
 $style = PConfig::get($uid, 'vier', 'style');
 
@@ -22,6 +22,8 @@ if (empty($style)) {
 $stylecss = '';
 $modified = '';
 
+$style = \Friendica\Util\Strings::sanitizeFilePathItem($style);
+
 foreach (['style', $style] as $file) {
        $stylecssfile = $THEMEPATH . DIRECTORY_SEPARATOR . $file .'.css';
        if (file_exists($stylecssfile)) {