From 7e5e9e9d8945bc856d08fbbce8f3fd8987dd1210 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 9 Apr 2014 00:43:09 -0400 Subject: [PATCH] CC-5788 : Library Cleanup removed this js file. --- .../controllers/PlayouthistoryController.php | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index 80ad9e92e..02b1fb55f 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -18,32 +18,32 @@ class PlayouthistoryController extends Zend_Controller_Action ->addActionContext('update-file-item', 'json') ->initContext(); } - + private function getStartEnd() { $request = $this->getRequest(); - + $userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone()); $utcTimezone = new DateTimeZone("UTC"); $utcNow = new DateTime("now", $utcTimezone); - + $start = $request->getParam("start"); $end = $request->getParam("end"); - + if (empty($start) || empty($end)) { $startsDT = clone $utcNow; $startsDT->sub(new DateInterval("P1D")); $endsDT = clone $utcNow; } else { - + try { $startsDT = new DateTime($start, $userTimezone); $startsDT->setTimezone($utcTimezone); - + $endsDT = new DateTime($end, $userTimezone); $endsDT->setTimezone($utcTimezone); - + if ($startsDT > $endsDT) { throw new Exception("start greater than end"); } @@ -51,14 +51,14 @@ class PlayouthistoryController extends Zend_Controller_Action catch (Exception $e) { Logging::info($e); Logging::info($e->getMessage()); - + $startsDT = clone $utcNow; $startsDT->sub(new DateInterval("P1D")); $endsDT = clone $utcNow; } - + } - + return array($startsDT, $endsDT); } @@ -68,7 +68,7 @@ class PlayouthistoryController extends Zend_Controller_Action $baseUrl = Application_Common_OsPath::getBaseDir(); list($startsDT, $endsDT) = $this->getStartEnd(); - + $userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone()); $startsDT->setTimezone($userTimezone); $endsDT->setTimezone($userTimezone); @@ -87,7 +87,6 @@ class PlayouthistoryController extends Zend_Controller_Action $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); @@ -120,7 +119,7 @@ class PlayouthistoryController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getParams(); $instance = $request->getParam("instance_id", null); - + list($startsDT, $endsDT) = $this->getStartEnd(); $historyService = new Application_Service_HistoryService(); @@ -143,12 +142,12 @@ class PlayouthistoryController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getParams(); $instance = $request->getParam("instance_id", null); - + list($startsDT, $endsDT) = $this->getStartEnd(); - + $limit = intval($params["iDisplayLength"]); $offset = intval($params["iDisplayStart"]); - + $historyService = new Application_Service_HistoryService(); $r = $historyService->getPlayedItemData($startsDT, $endsDT, $instance, $offset, $limit); @@ -169,7 +168,7 @@ class PlayouthistoryController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getParams(); $instance = $request->getParam("instance_id", null); - + list($startsDT, $endsDT) = $this->getStartEnd(); $historyService = new Application_Service_HistoryService();