mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
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:
@@ -50,7 +50,6 @@
|
||||
$_GET['show'] = 'false';
|
||||
}
|
||||
|
||||
|
||||
//get post or get variables from http
|
||||
if (count($_REQUEST) > 0) {
|
||||
$cdr_id = $_REQUEST["cdr_id"] ?? '';
|
||||
@@ -119,6 +118,14 @@
|
||||
$leg = 'a';
|
||||
}
|
||||
|
||||
//set the export_format
|
||||
if (isset($_REQUEST['export_format'])) {
|
||||
$export_format = $_REQUEST['export_format'];
|
||||
}
|
||||
else {
|
||||
$export_format = '';
|
||||
}
|
||||
|
||||
//validate the order
|
||||
switch ($order) {
|
||||
case 'asc':
|
||||
@@ -577,7 +584,7 @@
|
||||
if (!empty($order_by)) {
|
||||
$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) {
|
||||
$sql .= " limit :limit offset 0 \n";
|
||||
$parameters['limit'] = $_SESSION['cdr']['limit']['numeric'];
|
||||
|
||||
Reference in New Issue
Block a user