This commit is contained in:
Naomi 2013-07-30 19:25:06 -04:00
parent 7ca3048f36
commit a170ee7308
2 changed files with 48 additions and 48 deletions

View File

@ -137,9 +137,9 @@ class PlayouthistoryController extends Zend_Controller_Action
$historyService = new Application_Service_HistoryService(); $historyService = new Application_Service_HistoryService();
$historyService->createPlayedItem($params); $historyService->createPlayedItem($params);
} }
catch (Exception $e) { catch (Exception $e) {
Logging::info($e); Logging::info($e);
Logging::info($e->getMessage()); Logging::info($e->getMessage());
} }
} }
@ -195,10 +195,10 @@ class PlayouthistoryController extends Zend_Controller_Action
public function configureItemTemplateAction() { public function configureItemTemplateAction() {
$request = $this->getRequest(); $request = $this->getRequest();
$params = $request->getPost(); $params = $request->getPost();
Logging::info($params); Logging::info($params);
try { try {
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
@ -218,10 +218,10 @@ class PlayouthistoryController extends Zend_Controller_Action
$this->view->fileMD = $historyService->getFileMetadataTypes(); $this->view->fileMD = $historyService->getFileMetadataTypes();
$this->view->fields = $historyService->getFieldTypes(); $this->view->fields = $historyService->getFieldTypes();
$this->view->required_fields = $mandatoryFields; $this->view->required_fields = $mandatoryFields;
} }
catch (Exception $e) { catch (Exception $e) {
Logging::info($e); Logging::info($e);
Logging::info($e->getMessage()); Logging::info($e->getMessage());
} }
} }
@ -241,26 +241,26 @@ class PlayouthistoryController extends Zend_Controller_Action
} }
} }
public function setItemTemplateDefaultAction() public function setItemTemplateDefaultAction()
{ {
$request = $this->getRequest(); $request = $this->getRequest();
$params = $request->getPost(); $params = $request->getPost();
Logging::info($params); Logging::info($params);
$template_id = $this->_getParam('id', null); $template_id = $this->_getParam('id', null);
if (empty($template_id)) { if (empty($template_id)) {
return; return;
} }
try { try {
$historyService = new Application_Service_HistoryService(); $historyService = new Application_Service_HistoryService();
$historyService->setConfiguredItemTemplate($template_id); $historyService->setConfiguredItemTemplate($template_id);
} }
catch (Exception $e) { catch (Exception $e) {
Logging::info($e); Logging::info($e);
Logging::info($e->getMessage()); Logging::info($e->getMessage());
} }
} }
public function editTemplateAction() public function editTemplateAction()

View File

@ -301,9 +301,9 @@ USING (history_id)
} }
} }
if (count($md) > 0) { if (count($md) > 0) {
$f = Application_Model_StoredFile::createWithFile($file, $this->con); $f = Application_Model_StoredFile::createWithFile($file, $this->con);
$f->setDbColMetadata($md); $f->setDbColMetadata($md);
} }
foreach ($metadata as $key => $val) { foreach ($metadata as $key => $val) {
@ -498,7 +498,7 @@ USING (history_id)
private function loadTemplate($id) { private function loadTemplate($id) {
try { try {
$template = CcPlayoutHistoryTemplateQuery::create()->findPk($id, $this->con); $template = CcPlayoutHistoryTemplateQuery::create()->findPk($id, $this->con);
$c = new Criteria(); $c = new Criteria();
@ -520,10 +520,10 @@ USING (history_id)
$data["name"] = $template->getDbName(); $data["name"] = $template->getDbName();
$data["fields"] = $fields; $data["fields"] = $fields;
return $data; return $data;
} }
catch (Exception $e) { catch (Exception $e) {
throw $e; throw $e;
} }
} }
@ -544,7 +544,7 @@ USING (history_id)
public function getListItemTemplates() { public function getListItemTemplates() {
$list = array(); $list = array();
try { try {
$templates = CcPlayoutHistoryTemplateQuery::create() $templates = CcPlayoutHistoryTemplateQuery::create()
@ -556,28 +556,28 @@ USING (history_id)
} }
return $list; return $list;
} }
catch (Exception $e) { catch (Exception $e) {
throw $e; throw $e;
} }
} }
public function getConfiguredItemTemplate() { public function getConfiguredItemTemplate() {
try { try {
$id = Application_Model_Preference::GetHistoryItemTemplate(); $id = Application_Model_Preference::GetHistoryItemTemplate();
return $this->getItemTemplate($id); return $this->getItemTemplate($id);
} }
catch (Exception $e) { catch (Exception $e) {
throw $e; throw $e;
} }
} }
public function setConfiguredItemTemplate($id) { public function setConfiguredItemTemplate($id) {
try { try {
Application_Model_Preference::SetHistoryItemTemplate($id); Application_Model_Preference::SetHistoryItemTemplate($id);
} }
catch (Exception $e) { catch (Exception $e) {
throw $e; throw $e;
} }
} }
@ -615,9 +615,9 @@ USING (history_id)
$this->con->commit(); $this->con->commit();
} }
catch (Exception $e) { catch (Exception $e) {
$this->con->rollback(); $this->con->rollback();
throw $e; throw $e;
} }
} }