CC-5902: Linked Shows -> Replace content check assumes content of shows have the same number of tracks
Conflicts: airtime_mvc/application/services/SchedulerService.php
This commit is contained in:
parent
afc3d981e8
commit
ee52c7692c
|
@ -333,22 +333,32 @@ class Application_Service_SchedulerService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function replaceInstanceContentCheck($currentShowStamp, $showStamp)
|
private static function replaceInstanceContentCheck($currentShowStamp, $showStamp, $instance_id)
|
||||||
{
|
{
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
foreach ($showStamp as $item) {
|
$erraseShow = false;
|
||||||
if ($item["file_id"] != $currentShowStamp[$counter]["file_id"] ||
|
if (count($currentShowStamp) != count($showStamp)) {
|
||||||
$item["stream_id"] != $currentShowStamp[$counter]["stream_id"]) {
|
$erraseShow = true;
|
||||||
/*CcScheduleQuery::create()
|
} else {
|
||||||
->filterByDbInstanceId($ccShowInstance->getDbId())
|
foreach ($showStamp as $item) {
|
||||||
->delete();*/
|
if ($item["file_id"] != $currentShowStamp[$counter]["file_id"] ||
|
||||||
$delete_sql = "DELETE FROM cc_schedule ".
|
$item["stream_id"] != $currentShowStamp[$counter]["stream_id"]) {
|
||||||
"WHERE instance_id = {$currentShowStamp[$counter]["instance_id"]}";
|
$erraseShow = true;
|
||||||
Application_Common_Database::prepareAndExecute(
|
break;
|
||||||
$delete_sql, array(), Application_Common_Database::EXECUTE);
|
/*CcScheduleQuery::create()
|
||||||
return true;
|
->filterByDbInstanceId($ccShowInstance->getDbId())
|
||||||
}
|
->delete();*/
|
||||||
$counter += 1;
|
}
|
||||||
|
$counter += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($erraseShow) {
|
||||||
|
$delete_sql = "DELETE FROM cc_schedule ".
|
||||||
|
"WHERE instance_id = {$instance_id}";
|
||||||
|
Application_Common_Database::prepareAndExecute(
|
||||||
|
$delete_sql, array(), Application_Common_Database::EXECUTE);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we get here, the content in the show instance is the same
|
/* If we get here, the content in the show instance is the same
|
||||||
|
|
Loading…
Reference in New Issue