From 0f3c1914e1b332c8b7856933cddee7087de6e60c Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Tue, 4 Nov 2014 18:38:31 -0500 Subject: [PATCH] CC-5948 - Fixed bug where user couldn't edit repeating instances of a show while another instance was playing --- airtime_mvc/application/services/ShowFormService.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 882d22c44..74124421f 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -412,11 +412,9 @@ class Application_Service_ShowFormService $ccShowInstance = CcShowInstancesQuery::create() ->filterByDbShowId($this->ccShow->getDbId()) ->filterByDbModifiedInstance(false) - ->filterByDbEnds(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN) - ->orderByDbStarts() - ->limit(1) + ->filterByDbStarts(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN) ->findOne(); - + $starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC")); $ends = new DateTime($ccShowInstance->getDbEnds(), new DateTimeZone("UTC")); $showTimezone = $this->ccShow->getFirstCcShowDay()->getDbTimezone(); @@ -427,6 +425,7 @@ class Application_Service_ShowFormService return array($starts, $ends); } + /** * * Validates show forms