CC-5172 : errors from setting cues in waveform editor not handled properly
Conflicts: airtime_mvc/application/models/Playlist.php
This commit is contained in:
parent
02292569f9
commit
c57de650e8
3 changed files with 30 additions and 2 deletions
|
@ -383,6 +383,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->createUpdateResponse($obj);
|
||||
} else {
|
||||
$this->view->cue_error = $response["error"];
|
||||
$this->view->code = $response["type"];
|
||||
}
|
||||
} catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($e);
|
||||
|
|
|
@ -796,6 +796,7 @@ SQL;
|
|||
try {
|
||||
if (is_null($cueIn) && is_null($cueOut)) {
|
||||
$errArray["error"] = _("Cue in and cue out are null.");
|
||||
$errArray["type"] = self::CUE_ALL_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -826,6 +827,7 @@ SQL;
|
|||
$sql = "SELECT :cueIn::INTERVAL > :cueOut::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':cueOut'=>$cueOut), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue in to be larger than cue out.");
|
||||
$errArray["type"] = self::CUE_IN_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -833,6 +835,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be greater than file length.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -849,6 +852,7 @@ SQL;
|
|||
$sql = "SELECT :cueIn::INTERVAL > :oldCueOut::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':oldCueOut'=>$oldCueOut), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue in to be larger than cue out.");
|
||||
$errArray["type"] = self::CUE_IN_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -867,6 +871,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL < :oldCueIn::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be smaller than cue in.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
@ -874,6 +879,7 @@ SQL;
|
|||
$sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL";
|
||||
if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) {
|
||||
$errArray["error"] = _("Can't set cue out to be greater than file length.");
|
||||
$errArray["type"] = self::CUE_OUT_ERROR;
|
||||
|
||||
return $errArray;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue