diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 767fd3b62..09188b93d 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -146,6 +146,15 @@ class PreferenceController extends Zend_Controller_Action $this->view->form = $watched_dirs_pref; } + public function removeLogoAction() + { + $this->view->layout()->disableLayout(); + // Remove reliance on .phtml files to render requests + $this->_helper->viewRenderer->setNoRender(true); + + Application_Model_Preference::SetStationLogo(""); + } + public function streamSettingAction() { $CC_CONFIG = Config::getConfig(); diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index e568e0159..1ba71e782 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -589,13 +589,12 @@ class Application_Model_Preference public static function SetStationLogo($imagePath) { - if (!empty($imagePath)) { - $image = @file_get_contents($imagePath); - $image = base64_encode($image); - self::setValue("logoImage", $image); - } else { - Logging::warn("Attempting to set imagePath to empty string"); + if (empty($imagePath)) { + Logging::info("Removed station logo"); } + $image = @file_get_contents($imagePath); + $image = base64_encode($image); + self::setValue("logoImage", $image); } public static function GetStationLogo() diff --git a/airtime_mvc/application/views/scripts/form/preferences_general.phtml b/airtime_mvc/application/views/scripts/form/preferences_general.phtml index 7bf5d487d..99cb4384c 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_general.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_general.phtml @@ -7,7 +7,11 @@ element->getElement('stationLogo')->render() ?> -