Merge branch 'saas' into cc-5709-airtime-analyzer-cloud-storage-saas
Conflicts: CREDITS airtime_mvc/application/modules/rest/controllers/MediaController.php airtime_mvc/application/views/scripts/form/support-setting.phtml
This commit is contained in:
commit
ac8fadfc80
36 changed files with 121 additions and 146 deletions
|
@ -14,7 +14,9 @@ class ApiController extends Zend_Controller_Action
|
|||
"item-history-feed",
|
||||
"shows",
|
||||
"show-tracks",
|
||||
"show-schedules"
|
||||
"show-schedules",
|
||||
"station-logo",
|
||||
"show-logo"
|
||||
);
|
||||
|
||||
$params = $this->getRequest()->getParams();
|
||||
|
|
|
@ -32,15 +32,11 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$form = new Application_Form_Preferences();
|
||||
$values = array();
|
||||
|
||||
if ($request->isPost()) {
|
||||
$params = $request->getPost();
|
||||
$postData = explode('&', $params['data']);
|
||||
foreach($postData as $k=>$v) {
|
||||
$v = explode('=', $v);
|
||||
$values[$v[0]] = urldecode($v[1]);
|
||||
}
|
||||
if ($form->isValid($values)) {
|
||||
|
||||
if ($request->isPost()) {
|
||||
$values = $request->getPost();
|
||||
if ($form->isValid($values))
|
||||
{
|
||||
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
|
||||
Application_Model_Preference::SetDefaultCrossfadeDuration($values["stationDefaultCrossfadeDuration"]);
|
||||
Application_Model_Preference::SetDefaultFadeIn($values["stationDefaultFadeIn"]);
|
||||
|
@ -50,6 +46,11 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetDefaultTimezone($values["timezone"]);
|
||||
Application_Model_Preference::SetWeekStartDay($values["weekStartDay"]);
|
||||
|
||||
$logoUploadElement = $form->getSubForm('preferences_general')->getElement('stationLogo');
|
||||
$logoUploadElement->receive();
|
||||
$imagePath = $logoUploadElement->getFileName();
|
||||
Application_Model_Preference::SetStationLogo($imagePath);
|
||||
|
||||
Application_Model_Preference::SetUploadToSoundcloudOption($values["UploadToSoundcloudOption"]);
|
||||
Application_Model_Preference::SetSoundCloudDownloadbleOption($values["SoundCloudDownloadbleOption"]);
|
||||
Application_Model_Preference::SetSoundCloudUser($values["SoundCloudUser"]);
|
||||
|
@ -61,12 +62,14 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
$this->view->statusMsg = "<div class='success'>". _("Preferences updated.")."</div>";
|
||||
$this->view->form = $form;
|
||||
$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
|
||||
//$this->_helper->json->sendJson(array("valid"=>"true", "html"=>$this->view->render('preference/index.phtml')));
|
||||
} else {
|
||||
$this->view->form = $form;
|
||||
$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
|
||||
//$this->_helper->json->sendJson(array("valid"=>"false", "html"=>$this->view->render('preference/index.phtml')));
|
||||
}
|
||||
}
|
||||
$this->view->logoImg = Application_Model_Preference::GetStationLogo();
|
||||
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
|
@ -90,13 +93,9 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetEmail($values["Email"]);
|
||||
Application_Model_Preference::SetStationWebSite($values["StationWebSite"]);
|
||||
|
||||
$form->Logo->receive();
|
||||
$imagePath = $form->Logo->getFileName();
|
||||
|
||||
Application_Model_Preference::SetStationCountry($values["Country"]);
|
||||
Application_Model_Preference::SetStationCity($values["City"]);
|
||||
Application_Model_Preference::SetStationDescription($values["Description"]);
|
||||
Application_Model_Preference::SetStationLogo($imagePath);
|
||||
if (isset($values["Privacy"])) {
|
||||
Application_Model_Preference::SetPrivacyPolicyCheck($values["Privacy"]);
|
||||
}
|
||||
|
@ -104,10 +103,6 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$this->view->statusMsg = "<div class='success'>"._("Support setting updated.")."</div>";
|
||||
}
|
||||
|
||||
$logo = Application_Model_Preference::GetStationLogo();
|
||||
if ($logo) {
|
||||
$this->view->logoImg = $logo;
|
||||
}
|
||||
$privacyChecked = false;
|
||||
if (Application_Model_Preference::GetPrivacyPolicyCheck() == 1) {
|
||||
$privacyChecked = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue