Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
f4591f825f
|
@ -447,7 +447,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
} catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($e);
|
||||
} catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound($type);
|
||||
$this->playlistNotFound($type, true);
|
||||
} catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
|
|
|
@ -164,35 +164,14 @@ class Application_Model_Datatables
|
|||
$totalRows = $r->fetchColumn(0);
|
||||
|
||||
if (isset($sqlTotalDisplayRows)) {
|
||||
$stmt = $con->prepare($sqlTotalDisplayRows);
|
||||
foreach($params as $param=>&$value) {
|
||||
$stmt->bindParam(":$param", $value);
|
||||
}
|
||||
if ($stmt->execute()) {
|
||||
$totalDisplayRows = $stmt->fetchColumn(0);
|
||||
} else {
|
||||
$msg = implode(',', $stmt->errorInfo());
|
||||
throw new Exception("Error: $msg");
|
||||
}
|
||||
$totalDisplayRows = Application_Common_Database::prepareAndExecute($sqlTotalDisplayRows, $params, 'column');
|
||||
} else {
|
||||
$totalDisplayRows = $totalRows;
|
||||
}
|
||||
|
||||
//TODO
|
||||
if ($needToBind) {
|
||||
$stmt = $con->prepare($sql);
|
||||
|
||||
foreach($params as $param=>&$value) {
|
||||
$stmt->bindParam(":$param", $value);
|
||||
}
|
||||
|
||||
if ($stmt->execute()) {
|
||||
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
||||
$results = $stmt->fetchAll();
|
||||
} else {
|
||||
$msg = implode(',', $stmt->errorInfo());
|
||||
throw new Exception("Error: $msg");
|
||||
}
|
||||
$results = Application_Common_Database::prepareAndExecute($sql, $params);
|
||||
} else {
|
||||
$stmt = $con->query($sql);
|
||||
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
||||
|
|
|
@ -632,6 +632,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
{format: "json", data: criteria, name: block_name, description: block_desc, obj_id: obj_id, type: obj_type, modified: lastMod},
|
||||
function(data){
|
||||
var json = $.parseJSON(data);
|
||||
if (json.error !== undefined) {
|
||||
alert(json.error);
|
||||
}
|
||||
AIRTIME.playlist.fnOpenPlaylist(json);
|
||||
setModified(json.modified);
|
||||
if (obj_type == "block") {
|
||||
callback(data, "save");
|
||||
|
|
Loading…
Reference in New Issue