From bd81b0cd4f105c7d49a5cfda2278fbe5394c0544 Mon Sep 17 00:00:00 2001
From: naomiaro <naomiaro@gmail.com>
Date: Tue, 15 Mar 2011 16:39:52 -0400
Subject: [PATCH] CC-1985 : Automatic rebroadcast of recorded content

working on disabling resizing of a rebroadcast show.
---
 .../controllers/ScheduleController.php        |  4 ++-
 application/models/Shows.php                  | 27 ++++++++++---------
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php
index d9e580edc..b2d849e1c 100644
--- a/application/controllers/ScheduleController.php
+++ b/application/controllers/ScheduleController.php
@@ -341,6 +341,7 @@ class ScheduleController extends Zend_Controller_Action
 		$formRepeats = new Application_Form_AddShowRepeats();
 		$formStyle = new Application_Form_AddShowStyle();
         $formRecord = new Application_Form_AddShowRR();
+        $formAbsoluteRebroadcast = new Application_Form_AddShowAbsoluteRebroadcastDates();
         $formRebroadcast = new Application_Form_AddShowRebroadcastDates();
 
 		$formWhat->removeDecorator('DtDdWrapper');
@@ -349,6 +350,7 @@ class ScheduleController extends Zend_Controller_Action
 		$formRepeats->removeDecorator('DtDdWrapper');
 		$formStyle->removeDecorator('DtDdWrapper');
         $formRecord->removeDecorator('DtDdWrapper');
+        $formAbsoluteRebroadcast->removeDecorator('DtDdWrapper');
         $formRebroadcast->removeDecorator('DtDdWrapper');
 
         $this->view->what = $formWhat;
@@ -357,8 +359,8 @@ class ScheduleController extends Zend_Controller_Action
 	    $this->view->who = $formWho;
 	    $this->view->style = $formStyle;
         $this->view->rr = $formRecord;
+        $this->view->absoluteRebroadcast = $formAbsoluteRebroadcast;
         $this->view->rebroadcast = $formRebroadcast;
-
 		$what = $formWhat->isValid($data);
 		$when = $formWhen->isValid($data);
         if($when) {
diff --git a/application/models/Shows.php b/application/models/Shows.php
index 63915dc4f..159329a47 100644
--- a/application/models/Shows.php
+++ b/application/models/Shows.php
@@ -456,27 +456,28 @@ class Show {
 
 	private static function makeFullCalendarEvent($show, $options=array()) {
 		global $CC_DBC;
+    
+        $event = array();
 
         if($show["rebroadcast"]) {
             $title = "REBROADCAST ".$show["name"];
+            $event["disableResizing"] = true;
         }
         else {
             $title = $show["name"];
         }
 
-		$event = array(
-			"id" => $show["instance_id"],
-			"title" => $title,
-			"start" => $show["starts"],
-			"end" => $show["ends"],
-			"allDay" => false,
-			"description" => $show["description"],
-			"color" => $show["color"],
-			"backgroundColor" => $show["background_color"],
-            "showId" => $show["show_id"],
-            "record" => intval($show["record"]),
-            "rebroadcast" => intval($show["rebroadcast"])
-		);
+		$event["id"] = $show["instance_id"];
+		$event["title"] = $title;
+		$event["start"] = $show["starts"];
+		$event["end"] = $show["ends"];
+		$event["allDay"] = false;
+		$event["description"] = $show["description"];
+		$event["color"] = $show["color"];
+		$event["backgroundColor"] = $show["background_color"];
+        $event["showId"] = $show["show_id"];
+        $event["record"] = intval($show["record"]);
+        $event["rebroadcast"] = intval($show["rebroadcast"]);
 
 		foreach($options as $key=>$value) {
 			$event[$key] = $value;