CC-3174 : showbuilder
make sure the scheduled item still exists, if not throw an error.
This commit is contained in:
parent
b5f510de85
commit
31abc21aaa
|
@ -138,6 +138,9 @@ class Application_Model_Scheduler {
|
||||||
|
|
||||||
if ($id !== 0) {
|
if ($id !== 0) {
|
||||||
$schedItem = CcScheduleQuery::create()->findPK($id, $this->con);
|
$schedItem = CcScheduleQuery::create()->findPK($id, $this->con);
|
||||||
|
if (is_null($schedItem)) {
|
||||||
|
throw new OutDatedScheduleException("The schedule you're viewing is out of date!");
|
||||||
|
}
|
||||||
$instance = $schedItem->getCcShowInstances($this->con);
|
$instance = $schedItem->getCcShowInstances($this->con);
|
||||||
if (intval($schedule["instance"]) !== $instance->getDbId()) {
|
if (intval($schedule["instance"]) !== $instance->getDbId()) {
|
||||||
throw new OutDatedScheduleException("The schedule you're viewing is out of date!");
|
throw new OutDatedScheduleException("The schedule you're viewing is out of date!");
|
||||||
|
@ -248,7 +251,7 @@ class Application_Model_Scheduler {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
foreach($mediaItems as $media) {
|
foreach ($mediaItems as $media) {
|
||||||
Logging::log("Media Id ".$media["id"]);
|
Logging::log("Media Id ".$media["id"]);
|
||||||
Logging::log("Type ".$media["type"]);
|
Logging::log("Type ".$media["type"]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue