]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/style.php
@brief is removed completely
[friendica.git] / view / theme / vier / style.php
index 9b528a14bbc0e7b507672fae008895714452eb97..f8068646ca58ec2001074d55eb69b25b67327dcf 100644 (file)
@@ -4,12 +4,11 @@
  */
 use Friendica\Core\Logger;
 use Friendica\Core\Config;
-use Friendica\Core\PConfig;
-use Friendica\Model\Profile;
+use Friendica\DI;
 
-$uid = Profile::getThemeUid();
+$uid = $_REQUEST['puid'] ?? 0;
 
-$style = PConfig::get($uid, 'vier', 'style');
+$style = DI::pConfig()->get($uid, 'vier', 'style');
 
 if (empty($style)) {
        $style = Config::get('vier', 'style');
@@ -22,6 +21,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)) {
@@ -31,7 +32,7 @@ foreach (['style', $style] as $file) {
                        $modified = $stylemodified;
                }
        } else {
-               //TODO: use LOGGER_ERROR?
+               //TODO: use Logger::ERROR?
                Logger::log('Error: missing file: "' . $stylecssfile .'" (userid: '. $uid .')');
        }
 }