CC-3153: When cancelling a show that is currently on-air, the show-instance is not removed.
-fixed
This commit is contained in:
parent
162f11022b
commit
73c0408315
3 changed files with 11 additions and 13 deletions
|
@ -106,7 +106,7 @@ class Application_Model_Show {
|
|||
}
|
||||
|
||||
//remove everything about this show.
|
||||
public function deleteShow()
|
||||
public function delete()
|
||||
{
|
||||
//usually we hide the show-instance, but in this case we are deleting the show template
|
||||
//so delete all show-instances as well.
|
||||
|
|
|
@ -435,10 +435,10 @@ class Application_Model_ShowInstance {
|
|||
$this->updateScheduledTime();
|
||||
}
|
||||
|
||||
public function deleteShow()
|
||||
public function delete()
|
||||
{
|
||||
global $CC_DBC;
|
||||
|
||||
|
||||
// see if it was recording show
|
||||
$recording = $this->isRecorded();
|
||||
// get show id
|
||||
|
@ -446,10 +446,9 @@ class Application_Model_ShowInstance {
|
|||
|
||||
$show = $this->getShow();
|
||||
|
||||
$current_timestamp = gmdate("Y-m-d H:i");
|
||||
|
||||
if ($current_timestamp < $this->getShowInstanceStart()) {
|
||||
$current_timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
if ($current_timestamp <= $this->getShowInstanceEnd()) {
|
||||
if ($show->isRepeating()) {
|
||||
|
||||
CcShowInstancesQuery::create()
|
||||
|
@ -486,8 +485,7 @@ class Application_Model_ShowInstance {
|
|||
}
|
||||
}
|
||||
else {
|
||||
|
||||
$show->deleteShow();
|
||||
$show->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue