Fixed changing the start date on a non-repeating show
This commit is contained in:
parent
78d34a6d16
commit
8ad866c2a2
|
@ -20,6 +20,7 @@ class Application_Service_ShowService
|
||||||
private $localShowStartHour;
|
private $localShowStartHour;
|
||||||
private $localShowStartMin;
|
private $localShowStartMin;
|
||||||
private $origCcShowDay;
|
private $origCcShowDay;
|
||||||
|
private $origShowRepeatStatus;
|
||||||
private $instanceIdsForScheduleUpdates;
|
private $instanceIdsForScheduleUpdates;
|
||||||
|
|
||||||
public function __construct($showId=null, $showData=null, $isUpdate=false)
|
public function __construct($showId=null, $showData=null, $isUpdate=false)
|
||||||
|
@ -158,8 +159,10 @@ class Application_Service_ShowService
|
||||||
{
|
{
|
||||||
if ($this->ccShow->isRepeating()) {
|
if ($this->ccShow->isRepeating()) {
|
||||||
$this->origCcShowDay = clone $this->ccShow->getFirstRepeatingCcShowDay();
|
$this->origCcShowDay = clone $this->ccShow->getFirstRepeatingCcShowDay();
|
||||||
|
$this->origShowRepeatStatus = true;
|
||||||
} else {
|
} else {
|
||||||
$this->origCcShowDay = clone $this->ccShow->getFirstCcShowDay();
|
$this->origCcShowDay = clone $this->ccShow->getFirstCcShowDay();
|
||||||
|
$this->origShowRepeatStatus = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->oldShowTimezone = $this->origCcShowDay->getDbTimezone();
|
$this->oldShowTimezone = $this->origCcShowDay->getDbTimezone();
|
||||||
|
@ -1565,6 +1568,10 @@ SQL;
|
||||||
if ($this->origCcShowDay->getDbRepeatType() == 2 ||
|
if ($this->origCcShowDay->getDbRepeatType() == 2 ||
|
||||||
$this->origCcShowDay->getDbRepeatType() == 3) {
|
$this->origCcShowDay->getDbRepeatType() == 3) {
|
||||||
$day = null;
|
$day = null;
|
||||||
|
} else if (!$this->origShowRepeatStatus) {
|
||||||
|
//keep current show day to use for updating cc_show_day rule
|
||||||
|
$keepDay = $day;
|
||||||
|
$day = $this->origCcShowDay->getDbDay();
|
||||||
}
|
}
|
||||||
$showDay = CcShowDaysQuery::create()
|
$showDay = CcShowDaysQuery::create()
|
||||||
->filterByDbShowId($showId)
|
->filterByDbShowId($showId)
|
||||||
|
@ -1577,6 +1584,10 @@ SQL;
|
||||||
//type has changed
|
//type has changed
|
||||||
$showDay = new CcShowDays();
|
$showDay = new CcShowDays();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($keepDay)) {
|
||||||
|
$day = $keepDay;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$showDay = new CcShowDays();
|
$showDay = new CcShowDays();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue