From 1bdb3c916a8809225fca39630e0b7c39dee424e8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 12 Jan 2019 02:21:12 -0500 Subject: [PATCH] Make style.php require query parameter puid for specific stylesheets --- view/theme/duepuntozero/style.php | 2 +- view/theme/frio/style.php | 2 +- view/theme/quattro/style.php | 2 +- view/theme/vier/style.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/view/theme/duepuntozero/style.php b/view/theme/duepuntozero/style.php index 6d102350cc..a5810f2dc1 100644 --- a/view/theme/duepuntozero/style.php +++ b/view/theme/duepuntozero/style.php @@ -10,7 +10,7 @@ if (file_exists("$THEMEPATH/style.css")) { echo file_get_contents("$THEMEPATH/style.css"); } -$uid = Profile::getThemeUid(); +$uid = defaults($_REQUEST, 'puid', 0); $s_colorset = Config::get('duepuntozero', 'colorset'); $colorset = PConfig::get($uid, 'duepuntozero', 'colorset'); diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index 7570ae0e57..d8bffa9c64 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -14,7 +14,7 @@ $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'); diff --git a/view/theme/quattro/style.php b/view/theme/quattro/style.php index 8158468327..08756ec4aa 100644 --- a/view/theme/quattro/style.php +++ b/view/theme/quattro/style.php @@ -6,7 +6,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Model\Profile; -$uid = Profile::getThemeUid(); +$uid = defaults($_REQUEST, 'puid', 0); $color = false; $quattro_align = false; diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index 196d377656..4dfbe4e268 100644 --- a/view/theme/vier/style.php +++ b/view/theme/vier/style.php @@ -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'); -- 2.39.5