From 2c7db0e83c0fff0b5f1d41f021d800196c5e971d Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Fri, 6 Dec 2013 17:11:07 -0500 Subject: [PATCH] CC-5555: Fix user preferences logic in preferences cache * Fixes stream settings not dislaying --- airtime_mvc/application/models/Preference.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 33269acba..5d1e2a1ad 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -131,7 +131,7 @@ class Application_Model_Preference if ($isUserValue && is_null($userId)) { throw new Exception("User id can't be null for a user preference."); } - + $res = $cache->fetch($key, $isUserValue, $userId); if ($res !== false) { //Logging::info("returning {$key} {$userId} from cache. = {$res}"); @@ -146,8 +146,7 @@ class Application_Model_Preference $paramMap[':key'] = $key; //For user specific preference, check if id matches as well - if (isset($userId)) { - + if ($isUserValue) { $sql .= " AND subjid = :id"; $paramMap[':id'] = $userId; } @@ -166,7 +165,7 @@ class Application_Model_Preference $paramMap[':key'] = $key; //For user specific preference, check if id matches as well - if (isset($userId)) { + if ($isUserValue) { $sql .= " AND subjid = :id"; $paramMap[':id'] = $userId; }