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();
|
$showId = $this->getId();
|
||||||
|
|
||||||
$sql = "SELECT starts FROM cc_show_instances "
|
$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";
|
."ORDER BY starts";
|
||||||
|
|
||||||
|
Logging::log($sql);
|
||||||
|
|
||||||
$rebroadcasts = $CC_DBC->GetAll($sql);
|
$rebroadcasts = $CC_DBC->GetAll($sql);
|
||||||
|
|
||||||
$rebroadcastsLocal = array();
|
$rebroadcastsLocal = array();
|
||||||
|
@ -415,8 +417,7 @@ class Application_Model_Show {
|
||||||
public function deleteAllInstances(){
|
public function deleteAllInstances(){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
$sql = "DELETE FROM cc_show_instances"
|
||||||
|
@ -433,8 +434,7 @@ class Application_Model_Show {
|
||||||
public function deleteAllRebroadcasts(){
|
public function deleteAllRebroadcasts(){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
$sql = "DELETE FROM cc_show_instances"
|
||||||
|
@ -457,8 +457,7 @@ class Application_Model_Show {
|
||||||
public function removeAllInstancesFromDate($p_date=null){
|
public function removeAllInstancesFromDate($p_date=null){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
if(is_null($p_date)) {
|
if(is_null($p_date)) {
|
||||||
$date = new Application_Model_DateHelper;
|
$date = new Application_Model_DateHelper;
|
||||||
|
@ -490,8 +489,7 @@ class Application_Model_Show {
|
||||||
public function removeAllInstancesBeforeDate($p_date){
|
public function removeAllInstancesBeforeDate($p_date){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances "
|
$sql = "DELETE FROM cc_show_instances "
|
||||||
|
|
|
@ -180,7 +180,7 @@ function setAddShowEvents() {
|
||||||
|
|
||||||
form.find("#add_show_start_time").timepicker({
|
form.find("#add_show_start_time").timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
defaultTime: '00:00',
|
defaultTime: '00:00'
|
||||||
});
|
});
|
||||||
form.find("#add_show_end_time").timepicker({
|
form.find("#add_show_end_time").timepicker({
|
||||||
amPmText: ['', '']
|
amPmText: ['', '']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue