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 6d102350c..a5810f2dc 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 7570ae0e5..d8bffa9c6 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 815846832..08756ec4a 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 196d37765..4dfbe4e26 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');