This commit is contained in:
Naomi 2013-08-20 17:23:48 -04:00
parent 007a7ee7ef
commit 84efdfd64a
2 changed files with 36 additions and 36 deletions

View File

@ -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()

View File

@ -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() {