Move the parameter for the search.

This commit is contained in:
FusionPBX 2021-02-14 20:25:08 -07:00 committed by GitHub
parent 4f5722053e
commit 3f6ad8af74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -89,7 +89,6 @@
//add the search
if (isset($_GET["search"])) {
$search = strtolower($_GET["search"]);
$parameters['search'] = '%'.$search.'%';
}
//get the count
@ -103,6 +102,7 @@
$sql .= " or lower(remote_address) like :search ";
$sql .= " or lower(user_agent) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
@ -143,6 +143,7 @@
$sql .= " or lower(remote_address) like :search ";
$sql .= " or lower(user_agent) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, 'timestamp', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
@ -259,4 +260,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>