cc-2362: upload to soundcloud with the wrong name after show rename.
-make sure to remove all rebroadcasts of recorded shows when editing.
This commit is contained in:
parent
ebf7dd0e0d
commit
1de4777de3
|
@ -313,6 +313,26 @@ class Show {
|
||||||
$CC_DBC->query($sql);
|
$CC_DBC->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all future rebroadcast instances of the current
|
||||||
|
* show object from the show_instances table.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function deleteAllRebroadcasts(){
|
||||||
|
global $CC_DBC;
|
||||||
|
|
||||||
|
$date = new DateHelper;
|
||||||
|
$timestamp = $date->getTimestamp();
|
||||||
|
|
||||||
|
$showId = $this->getId();
|
||||||
|
$sql = "DELETE FROM cc_show_instances"
|
||||||
|
." WHERE starts > TIMESTAMP '$timestamp'"
|
||||||
|
." AND show_id = $showId"
|
||||||
|
." AND rebroadcast = 1";
|
||||||
|
|
||||||
|
$CC_DBC->query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes all show instances of current show after a
|
* Deletes all show instances of current show after a
|
||||||
* certain date.
|
* certain date.
|
||||||
|
@ -568,6 +588,14 @@ class Show {
|
||||||
$this->updateDurationTime($p_data);
|
$this->updateDurationTime($p_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($isRecorded){
|
||||||
|
//delete all rebroadcasts. They will simply be recreated later
|
||||||
|
//in the execution of this PHP script. This simplifies having to
|
||||||
|
//reason about whether we should keep individual rebroadcasts or
|
||||||
|
//delete them or move them around etc.
|
||||||
|
$this->deleteAllRebroadcasts();
|
||||||
|
}
|
||||||
|
|
||||||
if ($p_data['add_show_repeats']){
|
if ($p_data['add_show_repeats']){
|
||||||
if (($repeatType == 1 || $repeatType == 2) &&
|
if (($repeatType == 1 || $repeatType == 2) &&
|
||||||
$p_data['add_show_start_date'] != $this->getStartDate()){
|
$p_data['add_show_start_date'] != $this->getStartDate()){
|
||||||
|
|
Loading…
Reference in New Issue