SAAS-994: The Scheduled Play switch should not be able to be turned off without a warning message

Hid the element in the dashboard so it can never be turned off.
This commit is contained in:
drigato 2015-08-06 11:14:43 -04:00
parent 07d8a0de04
commit ea86675d07
2 changed files with 8 additions and 7 deletions

View file

@ -1096,6 +1096,13 @@ class Application_Model_Preference
public static function GetSourceSwitchStatus($sourcename)
{
// Scheduled play switch should always be "on".
// Even though we've hidden this element in the dashboard we should
// always make sure it's on or else a station's stream could go offline.
if ($sourcename == "scheduled_play") {
return "on";
}
$value = self::getValue($sourcename."_switch");
return ($value == null || $value == "off") ? 'off' : 'on';
}