This commit is contained in:
Naomi 2013-08-01 16:37:10 -04:00
parent a5a99da21e
commit 557b3f9c9b
2 changed files with 85 additions and 85 deletions

View file

@ -197,9 +197,9 @@ class PlayouthistoryController extends Zend_Controller_Action
public function templateAction()
{
$CC_CONFIG = Config::getConfig();
$baseUrl = Application_Common_OsPath::getBaseDir();
$CC_CONFIG = Config::getConfig();
$baseUrl = Application_Common_OsPath::getBaseDir();
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$historyService = new Application_Service_HistoryService();
@ -284,25 +284,25 @@ class PlayouthistoryController extends Zend_Controller_Action
public function updateTemplateAction()
{
$request = $this->getRequest();
$params = $request->getPost();
Logging::info($params);
$request = $this->getRequest();
$params = $request->getPost();
Logging::info($params);
$template_id = $this->_getParam('id', null);
$name = $this->_getParam('name', null);
$fields = $this->_getParam('fields', array());
if (empty($template_id)) {
return;
}
try {
$historyService = new Application_Service_HistoryService();
$historyService->updateItemTemplate($template_id, $name, $fields);
}
catch (Exception $e) {
Logging::info($e);
Logging::info($e->getMessage());
$fields = $this->_getParam('fields', array());
if (empty($template_id)) {
return;
}
try {
$historyService = new Application_Service_HistoryService();
$historyService->updateItemTemplate($template_id, $name, $fields);
}
catch (Exception $e) {
Logging::info($e);
Logging::info($e->getMessage());
}
}
@ -310,13 +310,13 @@ class PlayouthistoryController extends Zend_Controller_Action
{
$template_id = $this->_getParam('id');
try {
$historyService = new Application_Service_HistoryService();
$historyService->deleteTemplate($template_id);
}
catch (Exception $e) {
Logging::info($e);
Logging::info($e->getMessage());
try {
$historyService = new Application_Service_HistoryService();
$historyService->deleteTemplate($template_id);
}
catch (Exception $e) {
Logging::info($e);
Logging::info($e->getMessage());
}
}
}