From 57c1e76dc7a4a5aea39dc9852c8df08f8f621d35 Mon Sep 17 00:00:00 2001 From: drigato Date: Wed, 20 Aug 2014 16:35:59 -0400 Subject: [PATCH] Added criteria parameter to CcShow->getFutureInstanceIds so we can retrieve results from database instead of cache --- airtime_mvc/application/models/airtime/CcShow.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcShow.php b/airtime_mvc/application/models/airtime/CcShow.php index 666fdb2d9..fac6aee00 100644 --- a/airtime_mvc/application/models/airtime/CcShow.php +++ b/airtime_mvc/application/models/airtime/CcShow.php @@ -281,9 +281,16 @@ class CcShow extends BaseCcShow { return $instanceIds; } - public function getFutureInstanceIds() { + /* + * Returns cc_show_instance ids where the start time is greater than + * the current time + * + * If a Criteria object is passed in Propel will always fetch the + * results from the database and not return a cached collection + */ + public function getFutureInstanceIds($criteria = null) { $instanceIds = array(); - foreach ($this->getFutureCcShowInstancess() as $ccShowInstance) { + foreach ($this->getFutureCcShowInstancess($criteria) as $ccShowInstance) { $instanceIds[] = $ccShowInstance->getDbId(); } return $instanceIds;