Merge branch 'CC-3174' into devel

This commit is contained in:
Naomi Aro 2012-04-20 13:04:38 +02:00
commit e242972a78
4 changed files with 45 additions and 5 deletions

View file

@ -245,7 +245,8 @@ class Application_Model_Schedule {
showt.background_color AS show_background_color, showt.id AS show_id,
si.starts AS si_starts, si.ends AS si_ends, si.time_filled AS si_time_filled,
si.record AS si_record, si.rebroadcast AS si_rebroadcast, si.id AS si_id, si.last_scheduled AS si_last_scheduled,
si.record AS si_record, si.rebroadcast AS si_rebroadcast, si.instance_id AS parent_show,
si.id AS si_id, si.last_scheduled AS si_last_scheduled,
sched.starts AS sched_starts, sched.ends AS sched_ends, sched.id AS sched_id,
sched.cue_in AS cue_in, sched.cue_out AS cue_out,

View file

@ -159,6 +159,22 @@ class Application_Model_ShowBuilder {
$showEndDT->setTimezone(new DateTimeZone($this->timezone));
$endsEpoch = floatval($showEndDT->format("U.u"));
//is a rebroadcast show
if (intval($p_item["si_rebroadcast"]) === 1) {
$row["rebroadcast"] = true;
$parentInstance = CcShowInstancesQuery::create()->findPk($p_item["parent_show"]);
$name = $parentInstance->getCcShow()->getDbName();
$dt = $parentInstance->getDbStarts(null);
$dt->setTimezone(new DateTimeZone($this->timezone));
$time = $dt->format("Y-m-d H:i");
$row["rebroadcast_title"] = "Rebroadcast of {$name} from {$time}";
}
else if (intval($p_item["si_record"]) === 1) {
$row["record"] = true;
}
if ($startsEpoch < $this->epoch_now && $endsEpoch > $this->epoch_now) {
$row["currentShow"] = true;
$this->currentShow = true;
@ -238,7 +254,11 @@ class Application_Model_ShowBuilder {
$row["id"] = 0 ;
$row["instance"] = intval($p_item["si_id"]);
}
if (intval($p_item["si_rebroadcast"]) === 1) {
$row["record"] = true;
}
if ($this->currentShow = true) {
$row["currentShow"] = true;
}