CC-733 : broadcast logs

adding time range selection for the log history.
This commit is contained in:
Naomi Aro 2012-03-12 11:47:25 +01:00
parent 7c63387dd5
commit 20db8d6fdf
8 changed files with 276 additions and 101 deletions

View file

@ -51,16 +51,27 @@ class Application_Model_Datatables {
$orderby[] = "id";
$orderby = join("," , $orderby);
// End Order By clause
$displayLength = intval($data["iDisplayLength"]);
if (count($where) > 0) {
$where = join(" AND ", $where);
$sql = $selectorCount." FROM ".$fromTable." WHERE ".$where;
$sqlTotalDisplayRows = $sql;
$sql = $selectorRows." FROM ".$fromTable." WHERE ".$where." ORDER BY ".$orderby." OFFSET ".$data["iDisplayStart"]." LIMIT ".$data["iDisplayLength"];
$sql = $selectorRows." FROM ".$fromTable." WHERE ".$where." ORDER BY ".$orderby;
//limit the results returned.
if ($displayLength !== -1) {
$sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength;
}
}
else {
$sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby." OFFSET ".$data["iDisplayStart"]." LIMIT ".$data["iDisplayLength"];
$sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby;
//limit the results returned.
if ($displayLength !== -1) {
$sql .= " OFFSET ".$data["iDisplayStart"]." LIMIT ".$displayLength;
}
}
try {