User Logs - Paging Broken with Search
This commit is contained in:
parent
f2aba2251f
commit
e83885c722
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2021
|
||||
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
|
|
@ -89,6 +89,7 @@
|
|||
//add the search
|
||||
if (isset($_GET["search"])) {
|
||||
$search = strtolower($_GET["search"]);
|
||||
$search = htmlspecialchars($search);
|
||||
}
|
||||
|
||||
//get the count
|
||||
|
|
@ -117,8 +118,8 @@
|
|||
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = $search ? "&search=".$search : null;
|
||||
$param = ($_GET['show'] == 'all' && permission_exists('user_log_all')) ? "&show=all" : null;
|
||||
$param = $search ? "search=".$search : null;
|
||||
$param .= ($_GET['show'] == 'all' && permission_exists('user_log_all')) ? "&show=all" : null;
|
||||
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
|
|
@ -190,7 +191,7 @@
|
|||
echo " <input type='hidden' name='show' value='all'>\n";
|
||||
}
|
||||
else {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all&search='.$search]);
|
||||
}
|
||||
}
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
|
||||
|
|
|
|||
Loading…
Reference in New Issue