CC-4090: Make code style PSR compliant
-removed all trailing whitespace
This commit is contained in:
parent
ee3447f903
commit
d9cde230cd
17 changed files with 484 additions and 484 deletions
|
@ -15,20 +15,20 @@ class DashboardController extends Zend_Controller_Action
|
|||
{
|
||||
// action body
|
||||
}
|
||||
|
||||
|
||||
public function disconnectSourceAction(){
|
||||
$request = $this->getRequest();
|
||||
$sourcename = $request->getParam('sourcename');
|
||||
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
|
||||
$show = Application_Model_Show::GetCurrentShow();
|
||||
|
||||
|
||||
$show_id = isset($show['id'])?$show['id']:0;
|
||||
|
||||
|
||||
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
|
||||
|
||||
|
||||
if($user->canSchedule($show_id) && $source_connected){
|
||||
$data = array("sourcename"=>$sourcename);
|
||||
Application_Model_RabbitMq::SendMessageToPypo("disconnect_source", $data);
|
||||
|
@ -40,40 +40,40 @@ class DashboardController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function switchSourceAction(){
|
||||
$request = $this->getRequest();
|
||||
$sourcename = $this->_getParam('sourcename');
|
||||
$current_status = $this->_getParam('status');
|
||||
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
|
||||
$show = Application_Model_Show::GetCurrentShow();
|
||||
$show_id = isset($show[0]['id'])?$show[0]['id']:0;
|
||||
|
||||
|
||||
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
|
||||
if($user->canSchedule($show_id) && ($source_connected || $sourcename == 'scheduled_play' || $current_status == "on")){
|
||||
|
||||
|
||||
$change_status_to = "on";
|
||||
|
||||
|
||||
if(strtolower($current_status) == "on"){
|
||||
$change_status_to = "off";
|
||||
}
|
||||
|
||||
|
||||
$data = array("sourcename"=>$sourcename, "status"=>$change_status_to);
|
||||
Application_Model_RabbitMq::SendMessageToPypo("switch_source", $data);
|
||||
if(strtolower($current_status) == "on"){
|
||||
Application_Model_Preference::SetSourceSwitchStatus($sourcename, "off");
|
||||
$this->view->status = "OFF";
|
||||
|
||||
|
||||
//Log table updates
|
||||
Application_Model_LiveLog::SetEndTime($sourcename == 'scheduled_play'?'S':'L',
|
||||
new DateTime("now", new DateTimeZone('UTC')));
|
||||
}else{
|
||||
Application_Model_Preference::SetSourceSwitchStatus($sourcename, "on");
|
||||
$this->view->status = "ON";
|
||||
|
||||
|
||||
//Log table updates
|
||||
Application_Model_LiveLog::SetNewLogTime($sourcename == 'scheduled_play'?'S':'L',
|
||||
new DateTime("now", new DateTimeZone('UTC')));
|
||||
|
@ -91,18 +91,18 @@ class DashboardController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function switchOffSource(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function streamPlayerAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.blue.monday.css?'.$CC_CONFIG['airtime_version']);
|
||||
$this->_helper->layout->setLayout('bare');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue