diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index c05929781..1b97672f8 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -116,6 +116,15 @@ class PreferenceController extends Zend_Controller_Action { } + 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 1ca0a7442..aef7f0bb5 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 d884a7d55..65be0a13b 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() ?> -