diff --git a/airtime_mvc/application/controllers/PlayouthistoryController.php b/airtime_mvc/application/controllers/PlayouthistoryController.php index e331db127..7bf911837 100644 --- a/airtime_mvc/application/controllers/PlayouthistoryController.php +++ b/airtime_mvc/application/controllers/PlayouthistoryController.php @@ -194,12 +194,12 @@ class PlayouthistoryController extends Zend_Controller_Action $historyService->deletePlayedItem($history_id); } - public function deleteListItemsAction() - { - $history_ids = $this->_getParam('ids'); - - $historyService = new Application_Service_HistoryService(); - $historyService->deletePlayedItems($history_ids); + public function deleteListItemsAction() + { + $history_ids = $this->_getParam('ids'); + + $historyService = new Application_Service_HistoryService(); + $historyService->deletePlayedItems($history_ids); } public function updateListItemAction() diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 3eb3ca6a8..db36b2856 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -826,23 +826,23 @@ class Application_Service_HistoryService } } - /* id is an id in cc_playout_history */ - public function deletePlayedItems($ids) { - - $this->con->beginTransaction(); - - try { - - $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); - $records->delete($this->con); - - $this->con->commit(); - } - catch (Exception $e) { - $this->con->rollback(); - Logging::info($e); - throw $e; - } + /* id is an id in cc_playout_history */ + public function deletePlayedItems($ids) { + + $this->con->beginTransaction(); + + try { + + $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con); + $records->delete($this->con); + + $this->con->commit(); + } + catch (Exception $e) { + $this->con->rollback(); + Logging::info($e); + throw $e; + } } @@ -863,19 +863,19 @@ class Application_Service_HistoryService return $fields; } - private function getPhpCasts() { - - $fields = array( - TEMPLATE_DATE => "strval", - TEMPLATE_TIME => "strval", - TEMPLATE_DATETIME => "strval", - TEMPLATE_STRING => "strval", - TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? - TEMPLATE_INT => "intval", - TEMPLATE_FLOAT => "floatval", - ); - - return $fields; + private function getPhpCasts() { + + $fields = array( + TEMPLATE_DATE => "strval", + TEMPLATE_TIME => "strval", + TEMPLATE_DATETIME => "strval", + TEMPLATE_STRING => "strval", + TEMPLATE_BOOLEAN => "intval", //boolval only exists in php 5.5+ wtf? + TEMPLATE_INT => "intval", + TEMPLATE_FLOAT => "floatval", + ); + + return $fields; } private function getSqlTypes() {