From 3b33f556528399ac64ae6e6380b13f0a8e9bacb0 Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 15 Apr 2015 10:48:31 -0400 Subject: [PATCH] Fixed a repeating show bug If the first instance has already started or ended we were getting the wrong next instance because the result set was not ordered --- airtime_mvc/application/services/ShowFormService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index 94cc0068a..5a17932b2 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -402,6 +402,7 @@ class Application_Service_ShowFormService ->filterByDbShowId($this->ccShow->getDbId()) ->filterByDbModifiedInstance(false) ->filterByDbStarts(gmdate("Y-m-d H:i:s"), Criteria::GREATER_THAN) + ->orderByDbStarts() ->findOne(); $starts = new DateTime($ccShowInstance->getDbStarts(), new DateTimeZone("UTC"));