CC-5405: When editing a single show instance from a repeating series, should not create a new cc_show
Refactored cc_show->isRepeating() function
This commit is contained in:
parent
b78fa994f7
commit
463d286ac5
|
@ -95,15 +95,14 @@ class CcShow extends BaseCcShow {
|
|||
*/
|
||||
public function isRepeating()
|
||||
{
|
||||
//get ALL cc_show_day entries
|
||||
//get all cc_show_day entries that are repeating
|
||||
$ccShowDays = CcShowDaysQuery::create()
|
||||
->filterByDbShowId($this->id)
|
||||
->filterByDbRepeatType(0, Criteria::GREATER_EQUAL)
|
||||
->find();
|
||||
|
||||
foreach ($ccShowDays as $day) {
|
||||
if ($day->getDbRepeatType() >= 0) {
|
||||
return true;
|
||||
}
|
||||
if (!$ccShowDays->isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue