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()
|
public function isRepeating()
|
||||||
{
|
{
|
||||||
//get ALL cc_show_day entries
|
//get all cc_show_day entries that are repeating
|
||||||
$ccShowDays = CcShowDaysQuery::create()
|
$ccShowDays = CcShowDaysQuery::create()
|
||||||
->filterByDbShowId($this->id)
|
->filterByDbShowId($this->id)
|
||||||
|
->filterByDbRepeatType(0, Criteria::GREATER_EQUAL)
|
||||||
->find();
|
->find();
|
||||||
|
|
||||||
foreach ($ccShowDays as $day) {
|
if (!$ccShowDays->isEmpty()) {
|
||||||
if ($day->getDbRepeatType() >= 0) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue