Set the export_format
To prevent null and prevent unintended behavior set an empty string to as the default export format.
This commit is contained in:
parent
9dc8bcf7e9
commit
590faa4e83
|
|
@ -50,7 +50,6 @@
|
||||||
$_GET['show'] = 'false';
|
$_GET['show'] = 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//get post or get variables from http
|
//get post or get variables from http
|
||||||
if (count($_REQUEST) > 0) {
|
if (count($_REQUEST) > 0) {
|
||||||
$cdr_id = $_REQUEST["cdr_id"] ?? '';
|
$cdr_id = $_REQUEST["cdr_id"] ?? '';
|
||||||
|
|
@ -119,6 +118,14 @@
|
||||||
$leg = 'a';
|
$leg = 'a';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//set the export_format
|
||||||
|
if (isset($_REQUEST['export_format'])) {
|
||||||
|
$export_format = $_REQUEST['export_format'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$export_format = '';
|
||||||
|
}
|
||||||
|
|
||||||
//validate the order
|
//validate the order
|
||||||
switch ($order) {
|
switch ($order) {
|
||||||
case 'asc':
|
case 'asc':
|
||||||
|
|
@ -577,7 +584,7 @@
|
||||||
if (!empty($order_by)) {
|
if (!empty($order_by)) {
|
||||||
$sql .= order_by($order_by, $order);
|
$sql .= order_by($order_by, $order);
|
||||||
}
|
}
|
||||||
if (isset($_REQUEST['export_format']) && $_REQUEST['export_format'] !== "csv" && $_REQUEST['export_format'] !== "pdf") {
|
if ($export_format !== "csv" && $export_format !== "pdf") {
|
||||||
if ($rows_per_page == 0) {
|
if ($rows_per_page == 0) {
|
||||||
$sql .= " limit :limit offset 0 \n";
|
$sql .= " limit :limit offset 0 \n";
|
||||||
$parameters['limit'] = $_SESSION['cdr']['limit']['numeric'];
|
$parameters['limit'] = $_SESSION['cdr']['limit']['numeric'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue