From d0474f424709010711b0138ea723e3eb22d7dfea Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 12 Dec 2013 16:47:55 -0500 Subject: [PATCH] Changed function title when editing a repeating instance Removed a function call we don't need when editing a repeating instance --- airtime_mvc/application/controllers/ScheduleController.php | 2 +- airtime_mvc/application/services/ShowService.php | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 518abee1f..91d56bd74 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -437,7 +437,7 @@ class ScheduleController extends Zend_Controller_Action if ($service_showForm->validateShowForms($forms, $data, $validateStartDate, $originalShowStartDateTime, true, $data["add_show_instance_id"])) { - $service_show->createShowFromRepeatingInstance($data); + $service_show->editRepeatingShowInstance($data); $this->view->addNewShow = true; $this->view->newForm = $this->view->render('schedule/add-show-form.phtml'); diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 54ccd2ba6..9545fdb37 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -41,7 +41,7 @@ class Application_Service_ShowService $this->isUpdate = $isUpdate; } - public function createShowFromRepeatingInstance($showData) { + public function editRepeatingShowInstance($showData) { $service_user = new Application_Service_UserService(); $currentUser = $service_user->getCurrentUser(); @@ -108,9 +108,6 @@ class Application_Service_ShowService */ $this->setCcShowDays($showData); - // DO WE NEED THIS? - $this->setCcShowHosts($showData); - /* * We need to find the new show day rule we just created by passing * in the first show and start time in case multiple single @@ -196,8 +193,8 @@ class Application_Service_ShowService $this->deleteRebroadcastInstances(); - //$this->deleteCcShowDays(); $this->deleteCcShowHosts(); + if ($this->isRebroadcast) { //delete entry in cc_show_rebroadcast $this->deleteCcShowRebroadcasts();