From 9e23d8b9022244d45ba667fe03f261211d55ae38 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 13 Apr 2011 11:23:58 -0400 Subject: [PATCH] CC-1805: Ability to edit a show Fixed bug for single-show instances. --- VERSION | 3 ++- application/controllers/ScheduleController.php | 2 +- application/models/Shows.php | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 27f9cd322..be6fbdd24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1,2 @@ -1.8.0 +PRODUCT_ID=Airtime +PRODUCT_RELEASE=1.8.0 diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 703805bf4..f713dc8cd 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -246,7 +246,7 @@ class ScheduleController extends Zend_Controller_Action if ($user->isAdmin()) { $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/edit-show/format/json/id/'.$id, - 'callback' => 'window["beginEditShow"]'), 'title' => 'Edit This Instance'); + 'callback' => 'window["beginEditShow"]'), 'title' => 'Edit Show'); //$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/cancel-show'.$params, // 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Edit This Instance and All Following'); $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/delete-show'.$params, diff --git a/application/models/Shows.php b/application/models/Shows.php index 2ce25283c..6be170dd9 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -188,6 +188,10 @@ class Show { ."AND record = 1"; $baseDate = $CC_DBC->GetOne($sql); + if (is_null($baseDate)){ + return array(); + } + $sql = "SELECT date(DATE '$baseDate' + day_offset::INTERVAL) as start_date, start_time FROM cc_show_rebroadcast " ."WHERE show_id = $showId " ."ORDER BY start_date";