CC-3256 : Recorded/repeated/rebroadcast is invalid after show update
only the original rebroadcasts are left when toggling the repeat option.
This commit is contained in:
parent
1b3433e7a8
commit
a69be24831
2 changed files with 8 additions and 10 deletions
|
@ -298,9 +298,11 @@ class Application_Model_Show {
|
|||
$showId = $this->getId();
|
||||
|
||||
$sql = "SELECT starts FROM cc_show_instances "
|
||||
."WHERE show_id = $showId AND rebroadcast = 1 "
|
||||
."WHERE instance_id = (SELECT id FROM cc_show_instances WHERE show_id = $showId ORDER BY starts LIMIT 1) AND rebroadcast = 1 "
|
||||
."ORDER BY starts";
|
||||
|
||||
Logging::log($sql);
|
||||
|
||||
$rebroadcasts = $CC_DBC->GetAll($sql);
|
||||
|
||||
$rebroadcastsLocal = array();
|
||||
|
@ -415,8 +417,7 @@ class Application_Model_Show {
|
|||
public function deleteAllInstances(){
|
||||
global $CC_DBC;
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timestamp = $date->getTimestamp();
|
||||
$timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
$showId = $this->getId();
|
||||
$sql = "DELETE FROM cc_show_instances"
|
||||
|
@ -433,8 +434,7 @@ class Application_Model_Show {
|
|||
public function deleteAllRebroadcasts(){
|
||||
global $CC_DBC;
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timestamp = $date->getTimestamp();
|
||||
$timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
$showId = $this->getId();
|
||||
$sql = "DELETE FROM cc_show_instances"
|
||||
|
@ -457,8 +457,7 @@ class Application_Model_Show {
|
|||
public function removeAllInstancesFromDate($p_date=null){
|
||||
global $CC_DBC;
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timestamp = $date->getTimestamp();
|
||||
$timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
if(is_null($p_date)) {
|
||||
$date = new Application_Model_DateHelper;
|
||||
|
@ -490,8 +489,7 @@ class Application_Model_Show {
|
|||
public function removeAllInstancesBeforeDate($p_date){
|
||||
global $CC_DBC;
|
||||
|
||||
$date = new Application_Model_DateHelper;
|
||||
$timestamp = $date->getTimestamp();
|
||||
$timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
$showId = $this->getId();
|
||||
$sql = "DELETE FROM cc_show_instances "
|
||||
|
|
|
@ -180,7 +180,7 @@ function setAddShowEvents() {
|
|||
|
||||
form.find("#add_show_start_time").timepicker({
|
||||
amPmText: ['', ''],
|
||||
defaultTime: '00:00',
|
||||
defaultTime: '00:00'
|
||||
});
|
||||
form.find("#add_show_end_time").timepicker({
|
||||
amPmText: ['', '']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue