diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php
index c514ce8ca..f3f956da5 100644
--- a/airtime_mvc/application/Bootstrap.php
+++ b/airtime_mvc/application/Bootstrap.php
@@ -19,7 +19,7 @@ require_once 'Soundcloud.php';
require_once 'Preference.php';
//require_once 'Shows.php';
//require_once 'User.php';
-require_once 'RabbitMq.php';
+//require_once 'RabbitMq.php';
require_once 'DateHelper.php';
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php
index 2f0466b12..28987eb81 100644
--- a/airtime_mvc/application/controllers/LibraryController.php
+++ b/airtime_mvc/application/controllers/LibraryController.php
@@ -164,7 +164,7 @@ class LibraryController extends Zend_Controller_Action
else {
$res = settype($res, "integer");
$data = array("filepath" => $file->getFilePath(), "delete" => $res);
- RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
+ Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
}
}
@@ -214,7 +214,7 @@ class LibraryController extends Zend_Controller_Action
$data = $file->getMetadata();
- RabbitMq::SendMessageToMediaMonitor("md_update", $data);
+ Application_Model_RabbitMq::SendMessageToMediaMonitor("md_update", $data);
$this->_helper->redirector('index');
}
diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php
index 4fdf9ec0b..11fead872 100644
--- a/airtime_mvc/application/controllers/PreferenceController.php
+++ b/airtime_mvc/application/controllers/PreferenceController.php
@@ -188,7 +188,7 @@ class PreferenceController extends Zend_Controller_Action
Application_Model_StreamSetting::setStreamSetting($values);
$data = array();
$data['setting'] = Application_Model_StreamSetting::getStreamSetting();
- RabbitMq::SendMessageToPypo("update_stream_setting", $data);
+ Application_Model_RabbitMq::SendMessageToPypo("update_stream_setting", $data);
$this->view->statusMsg = "
Stream Setting Updated.
";
}
}
diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php
index 4f2ade3cd..a99392f7c 100644
--- a/airtime_mvc/application/controllers/ScheduleController.php
+++ b/airtime_mvc/application/controllers/ScheduleController.php
@@ -700,7 +700,7 @@ class ScheduleController extends Zend_Controller_Action
$show->clearShow();
$show->deleteShow();
// send 'cancel-current-show' command to pypo
- RabbitMq::SendMessageToPypo("cancel_current_show", array());
+ Application_Model_RabbitMq::SendMessageToPypo("cancel_current_show", array());
}
}
diff --git a/airtime_mvc/application/controllers/plugins/RabbitMqPlugin.php b/airtime_mvc/application/controllers/plugins/RabbitMqPlugin.php
index 50dc9969f..1c885528c 100644
--- a/airtime_mvc/application/controllers/plugins/RabbitMqPlugin.php
+++ b/airtime_mvc/application/controllers/plugins/RabbitMqPlugin.php
@@ -4,10 +4,10 @@ class RabbitMqPlugin extends Zend_Controller_Plugin_Abstract
{
public function dispatchLoopShutdown()
{
- if (RabbitMq::$doPush) {
+ if (Application_Model_RabbitMq::$doPush) {
$md = array('schedule' => Application_Model_Schedule::GetScheduledPlaylists());
- RabbitMq::SendMessageToPypo("update_schedule", $md);
- RabbitMq::SendMessageToShowRecorder("update_schedule");
+ Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md);
+ Application_Model_RabbitMq::SendMessageToShowRecorder("update_schedule");
}
}
}
diff --git a/airtime_mvc/application/models/MusicDir.php b/airtime_mvc/application/models/MusicDir.php
index 0ca8ab00d..cee6182cd 100644
--- a/airtime_mvc/application/models/MusicDir.php
+++ b/airtime_mvc/application/models/MusicDir.php
@@ -58,7 +58,7 @@ class Application_Model_MusicDir {
$temp_show->updateScheduledTime();
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
/**
@@ -184,7 +184,7 @@ class Application_Model_MusicDir {
$data = array();
$data["directory"] = $p_path;
- RabbitMq::SendMessageToMediaMonitor("new_watch", $data);
+ Application_Model_RabbitMq::SendMessageToMediaMonitor("new_watch", $data);
}
return $res;
}
@@ -256,7 +256,7 @@ class Application_Model_MusicDir {
$data = array();
$data["directory"] = $p_dir;
$data["dir_id"] = $dirId;
- RabbitMq::SendMessageToMediaMonitor("change_stor", $data);
+ Application_Model_RabbitMq::SendMessageToMediaMonitor("change_stor", $data);
return array("code"=>0);
}else{
return array("code"=>1, "error"=>"'$p_dir' is already set as the current storage dir or in the watched folders list.");
@@ -289,7 +289,7 @@ class Application_Model_MusicDir {
$dir->remove();
$data = array();
$data["directory"] = $p_dir;
- RabbitMq::SendMessageToMediaMonitor("remove_watch", $data);
+ Application_Model_RabbitMq::SendMessageToMediaMonitor("remove_watch", $data);
return array("code"=>0);
}
}
diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php
index db4f095ee..513067b79 100644
--- a/airtime_mvc/application/models/Preference.php
+++ b/airtime_mvc/application/models/Preference.php
@@ -81,7 +81,7 @@ class Application_Model_Preference
self::SetValue("station_name", $title);
$defaultNamespace = new Zend_Session_Namespace('title_name');
$defaultNamespace->title = $title;
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
//set session variable to new station name so that html title is updated.
//should probably do this in a view helper to keep this controller as minimal as possible.
@@ -107,7 +107,7 @@ class Application_Model_Preference
public static function SetStreamLabelFormat($type){
self::SetValue("stream_label_format", $type);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public static function GetStreamLabelFormat(){
diff --git a/airtime_mvc/application/models/RabbitMq.php b/airtime_mvc/application/models/RabbitMq.php
index 537136c9f..d5bbfbfba 100644
--- a/airtime_mvc/application/models/RabbitMq.php
+++ b/airtime_mvc/application/models/RabbitMq.php
@@ -9,7 +9,7 @@ class RabbitMq
* Sets a flag to push the schedule at the end of the request.
*/
public static function PushSchedule() {
- RabbitMq::$doPush = TRUE;
+ Application_Model_RabbitMq::$doPush = TRUE;
}
public static function SendMessageToPypo($event_type, $md)
diff --git a/airtime_mvc/application/models/ScheduleGroup.php b/airtime_mvc/application/models/ScheduleGroup.php
index 713c9c5bc..5d8b29b21 100644
--- a/airtime_mvc/application/models/ScheduleGroup.php
+++ b/airtime_mvc/application/models/ScheduleGroup.php
@@ -116,7 +116,7 @@ class Application_Model_ScheduleGroup {
}
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
return $this->groupId;
}
@@ -155,7 +155,7 @@ class Application_Model_ScheduleGroup {
." WHERE group_id = ".$this->groupId;
//echo $sql;
$retVal = $CC_DBC->query($sql);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
return $retVal;
}
diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php
index 6f241e999..77f86953e 100644
--- a/airtime_mvc/application/models/Show.php
+++ b/airtime_mvc/application/models/Show.php
@@ -19,7 +19,7 @@ class Application_Model_Show {
{
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbName($name);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public function getDescription()
@@ -119,7 +119,7 @@ class Application_Model_Show {
WHERE starts >= '{$day_timestamp}' AND show_id = {$this->_showId}";
$CC_DBC->query($sql);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
/**
@@ -871,7 +871,7 @@ class Application_Model_Show {
}
Application_Model_Show::populateShowUntil($showId);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
return $showId;
}
@@ -1008,7 +1008,7 @@ class Application_Model_Show {
}
}
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
//for a show with repeat_type == 0,1,2
@@ -1091,7 +1091,7 @@ class Application_Model_Show {
}
Application_Model_Show::setNextPop($next_date, $show_id, $day);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
private static function populateShow($repeatType, $show_id, $next_pop_date,
diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php
index 163dcdbde..7fed88a1a 100644
--- a/airtime_mvc/application/models/ShowInstance.php
+++ b/airtime_mvc/application/models/ShowInstance.php
@@ -111,14 +111,14 @@ class Application_Model_ShowInstance {
{
$this->_showInstance->setDbStarts($start)
->save();
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public function setShowEnd($end)
{
$this->_showInstance->setDbEnds($end)
->save();
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public function updateScheduledTime()
@@ -153,7 +153,7 @@ class Application_Model_ShowInstance {
$CC_DBC->query($sql);
}
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public function moveShow($deltaDay, $deltaMin)
@@ -219,7 +219,7 @@ class Application_Model_ShowInstance {
$show->setShowLastShow($new_ends);
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
public function resizeShow($deltaDay, $deltaMin)
@@ -263,7 +263,7 @@ class Application_Model_ShowInstance {
}
$this->setShowEnd($new_ends);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
}
/**
@@ -295,7 +295,7 @@ class Application_Model_ShowInstance {
else {
$groupId = $sched->addPlaylistAfter($this->_instanceId, $lastGroupId, $plId);
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
$this->updateScheduledTime();
}
@@ -315,7 +315,7 @@ class Application_Model_ShowInstance {
else {
$groupId = $sched->addFileAfter($this->_instanceId, $lastGroupId, $file_id);
}
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
$this->updateScheduledTime();
}
@@ -351,7 +351,7 @@ class Application_Model_ShowInstance {
WHERE starts >= '{$groupBoundry["end_timestamp"]}' AND instance_id = {$this->_instanceId}";
$CC_DBC->query($sql);
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
$this->updateScheduledTime();
}
@@ -360,7 +360,7 @@ class Application_Model_ShowInstance {
CcScheduleQuery::create()
->filterByDbInstanceId($this->_instanceId)
->delete();
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
$this->updateScheduledTime();
}
@@ -373,9 +373,9 @@ class Application_Model_ShowInstance {
CcShowInstancesQuery::create()
->findPK($this->_instanceId)
->delete();
- RabbitMq::PushSchedule();
+ Application_Model_RabbitMq::PushSchedule();
if($recording){
- RabbitMq::SendMessageToShowRecorder("cancel_recording");
+ Application_Model_RabbitMq::SendMessageToShowRecorder("cancel_recording");
}
}
diff --git a/airtime_mvc/application/models/tests/populator.php b/airtime_mvc/application/models/tests/populator.php
index 82c7ad1e6..6d70e1fbb 100644
--- a/airtime_mvc/application/models/tests/populator.php
+++ b/airtime_mvc/application/models/tests/populator.php
@@ -97,9 +97,9 @@ while ($showTime < $endDate) {
$showNumber = $showNumber + 1;
}
-if (RabbitMq::$doPush) {
+if (Application_Model_RabbitMq::$doPush) {
$md = array('schedule' => Application_Model_Schedule::GetScheduledPlaylists());
- RabbitMq::SendMessageToPypo("update_schedule", $md);
+ Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md);
}