CC-5405: When editing a single show instance from a repeating series, should not create a new cc_show

Create a new cc_show_day rule instead of a new cc_show
This commit is contained in:
drigato 2013-11-28 17:17:00 -05:00
parent 4253608948
commit a465b5a770
6 changed files with 181 additions and 49 deletions

View file

@ -124,7 +124,11 @@ class Application_Service_ShowFormService
private function populateFormWhen($form)
{
$ccShowDay = $this->ccShow->getFirstCcShowDay();
if ($this->ccShow->isRepeating()) {
$ccShowDay = $this->ccShow->getFirstRepeatingCcShowDay();
} else {
$ccShowDay = $this->ccShow->getFirstCcShowDay();
}
$showStart = $ccShowDay->getLocalStartDateAndTime();
$showEnd = $ccShowDay->getLocalEndDateAndTime($showStart);
@ -198,7 +202,11 @@ class Application_Service_ShowFormService
*/
private function populateFormRepeats($form, $nextFutureShowStart)
{
$ccShowDays = $this->ccShow->getCcShowDays();
if ($this->ccShow->isRepeating()) {
$ccShowDays = $this->ccShow->getRepeatingCcShowDays();
} else {
$ccShowDays = $this->ccShow->getCcShowDayss();
}
$days = array();
foreach ($ccShowDays as $ccShowDay) {