Merge remote-tracking branch 'origin/2.5.x-albertenhancements' into saas
This commit is contained in:
commit
e13e4413ea
5 changed files with 31 additions and 7 deletions
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -7,7 +7,11 @@
|
|||
|
||||
<?php echo $this->element->getElement('stationLogo')->render() ?>
|
||||
|
||||
<div id="Logo-img-container"><img id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" /></div>
|
||||
<button id="logo-remove-btn" value="Remove" class="btn">Remove</button>
|
||||
|
||||
<div id="Logo-img-container">
|
||||
<img onError="this.onerror = '';this.style.visibility='hidden';$('#logo-remove-btn').hide();" id="logo-img" onload='resizeImg(this, 450, 450);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" />
|
||||
</div>
|
||||
|
||||
<?php echo $this->element->getElement('locale')->render() ?>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue