This commit is contained in:
Naomi Aro 2013-07-29 08:59:04 -04:00
parent 7183396da5
commit c0206ff8f4
3 changed files with 21 additions and 21 deletions

View File

@ -190,7 +190,7 @@ class PlayouthistoryController extends Zend_Controller_Action
public function configureItemTemplateAction() { public function configureItemTemplateAction() {
$historyService = new Application_Service_HistoryService(); $historyService = new Application_Service_HistoryService();
$mandatoryFields = $historyService->mandatoryItemTemplate(); $mandatoryFields = $historyService->mandatoryItemTemplate();
$this->view->required = $mandatoryFields; $this->view->required = $mandatoryFields;

View File

@ -233,7 +233,7 @@ class Application_Service_HistoryService
$file = $historyRecord->getCcFiles(); $file = $historyRecord->getCcFiles();
$metadata = array(); $metadata = array();
for ($i = 0, $len = count($template); $i < $len; $i++) { for ($i = 0, $len = count($template); $i < $len; $i++) {
@ -249,9 +249,9 @@ class Application_Service_HistoryService
else if ($isFileMd && isset($file)) { else if ($isFileMd && isset($file)) {
Logging::info("adding file metadata associated to a file"); Logging::info("adding file metadata associated to a file");
} }
else if ($isFileMd && empty($file)) { else if ($isFileMd && empty($file)) {
Logging::info("adding file metadata NOT associated to a file"); Logging::info("adding file metadata NOT associated to a file");
$metadata[$key] = $entry; $metadata[$key] = $entry;
} }
else { else {
Logging::info("doing something else"); Logging::info("doing something else");
@ -263,14 +263,14 @@ class Application_Service_HistoryService
if (count($metadata) > 0) { if (count($metadata) > 0) {
$meta = new CcPlayoutHistoryMetaData(); $meta = new CcPlayoutHistoryMetaData();
} }
foreach ($metadata as $key => $val) { foreach ($metadata as $key => $val) {
$meta->setDbKey($key); $meta->setDbKey($key);
$meta->setDbValue($val); $meta->setDbValue($val);
$historyRecord->addCcPlayoutHistoryMetaData($meta); $historyRecord->addCcPlayoutHistoryMetaData($meta);
} }
$historyRecord->save($this->con); $historyRecord->save($this->con);
@ -401,12 +401,12 @@ class Application_Service_HistoryService
public function getFieldTypes() { public function getFieldTypes() {
$fields = array( $fields = array(
TEMPLATE_DATE, TEMPLATE_DATE,
TEMPLATE_TIME, TEMPLATE_TIME,
TEMPLATE_DATETIME, TEMPLATE_DATETIME,
TEMPLATE_STRING, TEMPLATE_STRING,
TEMPLATE_BOOLEAN, TEMPLATE_BOOLEAN,
TEMPLATE_INT, TEMPLATE_INT,
TEMPLATE_FLOAT, TEMPLATE_FLOAT,
); );
@ -417,7 +417,7 @@ class Application_Service_HistoryService
$fields = array(); $fields = array();
$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
return $fields; return $fields;
@ -427,7 +427,7 @@ class Application_Service_HistoryService
$fields = array(); $fields = array();
$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
$fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. $fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file.
$fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true);

File diff suppressed because one or more lines are too long