From 1c2a307d34b46c75f319512bcc687cbf579d02aa 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 c1f164c34..fb58e7e6f 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -430,6 +430,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"));