CC-3084: After canceling a repeating show that is being played currently, the progress bar is still going at the top
Deleted show was being returned because we don't delete it from database if it's repeating, nor do we check if it's modified when querying the db. Fixed by checking modified_instance column; only return it if modified_instance != TRUE
This commit is contained in:
parent
5222fe71a5
commit
f03b875e06
1 changed files with 6 additions and 1 deletions
|
@ -1545,7 +1545,8 @@ class Application_Model_Show {
|
|||
." FROM $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] s"
|
||||
." WHERE si.show_id = s.id"
|
||||
." AND si.starts <= TIMESTAMP '$timeNow'"
|
||||
." AND si.ends > TIMESTAMP '$timeNow'";
|
||||
." AND si.ends > TIMESTAMP '$timeNow'"
|
||||
." AND modified_instance != TRUE";
|
||||
|
||||
// Convert back to local timezone
|
||||
$rows = $CC_DBC->GetAll($sql);
|
||||
|
@ -1583,6 +1584,7 @@ class Application_Model_Show {
|
|||
." WHERE si.show_id = s.id"
|
||||
." AND si.starts >= TIMESTAMP '$timeStart'"
|
||||
." AND si.starts < TIMESTAMP $timeEnd"
|
||||
." AND modified_instance != TRUE"
|
||||
." ORDER BY si.starts";
|
||||
|
||||
// defaults to retrieve all shows within the interval if $limit not set
|
||||
|
@ -1605,6 +1607,9 @@ class Application_Model_Show {
|
|||
public static function ConvertToLocalTimeZone(&$rows, $columnsToConvert) {
|
||||
$timezone = date_default_timezone_get();
|
||||
|
||||
if (!is_array($rows)) {
|
||||
return;
|
||||
}
|
||||
foreach($rows as &$row) {
|
||||
foreach($columnsToConvert as $column) {
|
||||
$row[$column] = Application_Model_DateHelper::ConvertToLocalDateTimeString($row[$column]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue