CC-2227: Repeating weekday show -> Add weekend -> first weekend after show does not have new shows
-Should be fixed
This commit is contained in:
parent
0320c9a136
commit
3e560bb082
1 changed files with 4 additions and 11 deletions
|
@ -283,6 +283,7 @@ class Show {
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "SELECT last_show FROM cc_show_days"
|
$sql = "SELECT last_show FROM cc_show_days"
|
||||||
." WHERE show_id = $showId";
|
." WHERE show_id = $showId";
|
||||||
|
." ORDER BY last_show DESC";
|
||||||
|
|
||||||
$endDate = $CC_DBC->GetOne($sql);
|
$endDate = $CC_DBC->GetOne($sql);
|
||||||
|
|
||||||
|
@ -367,7 +368,8 @@ class Show {
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "SELECT first_show FROM cc_show_days"
|
$sql = "SELECT first_show FROM cc_show_days"
|
||||||
." WHERE show_id = $showId";
|
." WHERE show_id = $showId"
|
||||||
|
." ORDER BY first_show";
|
||||||
|
|
||||||
$firstDate = $CC_DBC->GetOne($sql);
|
$firstDate = $CC_DBC->GetOne($sql);
|
||||||
|
|
||||||
|
@ -661,16 +663,7 @@ class Show {
|
||||||
$showId = $ccShow->getDbId();
|
$showId = $ccShow->getDbId();
|
||||||
$show = new Show($showId);
|
$show = new Show($showId);
|
||||||
|
|
||||||
//If show is a new show (not updated), then get
|
$isRecorded = ($data['add_show_record']) ? 1 : 0;
|
||||||
//isRecorded from POST data. Otherwise get it from
|
|
||||||
//the database since the user is not allowed to
|
|
||||||
//update this option.
|
|
||||||
if ($data['add_show_id'] == -1){
|
|
||||||
$isRecorded = ($data['add_show_record']) ? 1 : 0;
|
|
||||||
} else {
|
|
||||||
$isRecorded = $show->isRecorded();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($data['add_show_id'] != -1){
|
if ($data['add_show_id'] != -1){
|
||||||
Show::deletePossiblyInvalidInstances($data, $show, $endDate, $isRecorded, $repeatType);
|
Show::deletePossiblyInvalidInstances($data, $show, $endDate, $isRecorded, $repeatType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue