From bdab294fce0085b99927aaa33aa5ba5f16bd4135 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 25 Feb 2013 09:15:03 -0500 Subject: [PATCH] Added comments to Schedule Service --- .../application/controllers/ScheduleController.php | 1 + airtime_mvc/application/models/Schedule.php | 7 +++---- airtime_mvc/application/services/ScheduleService.php | 11 ++++++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 9ca879918..ae91308e4 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -871,6 +871,7 @@ class ScheduleController extends Zend_Controller_Action $data[$j["name"]] = $j["value"]; } + // TODO: move this to js $data['add_show_hosts'] = $this->_getParam('hosts'); $data['add_show_day_check'] = $this->_getParam('days'); diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 2778074d2..36aedf96c 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -1220,10 +1220,9 @@ SQL; $controller->view->who = $formWho; $controller->view->style = $formStyle; $controller->view->live = $formLive; - - $controller->view->rr = $formRecord; - $controller->view->absoluteRebroadcast = $formAbsoluteRebroadcast; - $controller->view->rebroadcast = $formRebroadcast; + $controller->view->rr = $formRecord; + $controller->view->absoluteRebroadcast = $formAbsoluteRebroadcast; + $controller->view->rebroadcast = $formRebroadcast; //$controller->view->addNewShow = !$editShow; //$controller->view->form = $controller->view->render('schedule/add-show-form.phtml'); return false; diff --git a/airtime_mvc/application/services/ScheduleService.php b/airtime_mvc/application/services/ScheduleService.php index 983d1bd6f..f5f397561 100644 --- a/airtime_mvc/application/services/ScheduleService.php +++ b/airtime_mvc/application/services/ScheduleService.php @@ -2,6 +2,13 @@ class Application_Service_ScheduleService { +/* + * Form stuff begins here + * Typically I would keep form creation and validation + * in the controller but since shows require 9 forms, + * the controller will become too fat. + * Maybe we should create a special form show service? + */ /** * * @return array of schedule forms @@ -78,7 +85,9 @@ class Application_Service_ScheduleService { } - +/* + * Form stuff ends + */ /** * * Creates a new show if form data is valid