cc-2351: updating a bi-weekly repeating show is incorrect
-fixed
This commit is contained in:
parent
e969baee1c
commit
19e52e81b5
|
@ -572,6 +572,16 @@ class Show {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($p_data['add_show_repeats']){
|
if ($p_data['add_show_repeats']){
|
||||||
|
if (($repeatType == 1 || $repeatType == 2) &&
|
||||||
|
$p_data['add_show_start_date'] != $p_show->getStartDate()){
|
||||||
|
|
||||||
|
//start date has changed when repeat type is bi-weekly or monthly.
|
||||||
|
//This screws up the repeating positions of show instances, so lets
|
||||||
|
//just delete them for now.
|
||||||
|
|
||||||
|
$p_show->deleteAllInstances();
|
||||||
|
}
|
||||||
|
|
||||||
if ($p_data['add_show_start_date'] != $p_show->getStartDate()
|
if ($p_data['add_show_start_date'] != $p_show->getStartDate()
|
||||||
|| $p_data['add_show_start_time'] != $p_show->getStartTime()){
|
|| $p_data['add_show_start_time'] != $p_show->getStartTime()){
|
||||||
//start date/time has changed
|
//start date/time has changed
|
||||||
|
@ -584,12 +594,11 @@ class Show {
|
||||||
|
|
||||||
$p_show->updateStartDateTime($p_data, $p_endDate);
|
$p_show->updateStartDateTime($p_data, $p_endDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($repeatType != $p_show->getRepeatType()){
|
if ($repeatType != $p_show->getRepeatType()){
|
||||||
//repeat type changed.
|
//repeat type changed.
|
||||||
$p_show->deleteAllInstances();
|
$p_show->deleteAllInstances();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
//repeat type is the same, check if the days of the week are the same
|
//repeat type is the same, check if the days of the week are the same
|
||||||
$repeatingDaysChanged = false;
|
$repeatingDaysChanged = false;
|
||||||
$showDaysArray = $p_show->getShowDays();
|
$showDaysArray = $p_show->getShowDays();
|
||||||
|
|
Loading…
Reference in New Issue