From ea86675d077e1e25f1cbe3cd2ae4670c3a191c4e Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 6 Aug 2015 11:14:43 -0400 Subject: [PATCH] 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. --- airtime_mvc/application/models/Preference.php | 7 +++++++ .../application/views/scripts/partialviews/header.phtml | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 6a73ceb30..bd6680c14 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -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'; } diff --git a/airtime_mvc/application/views/scripts/partialviews/header.phtml b/airtime_mvc/application/views/scripts/partialviews/header.phtml index aa3a83618..02a2eeb05 100644 --- a/airtime_mvc/application/views/scripts/partialviews/header.phtml +++ b/airtime_mvc/application/views/scripts/partialviews/header.phtml @@ -22,7 +22,7 @@

-