Skip to content

Commit

Permalink
As generated by #c8777
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Gneady committed Sep 13, 2021
1 parent 700f4a6 commit 7e5f4dc
Show file tree
Hide file tree
Showing 38 changed files with 699 additions and 348 deletions.
2 changes: 1 addition & 1 deletion app/admin/ajax-maintenance-mode.php
Expand Up @@ -5,7 +5,7 @@

if(!csrf_token(true)) exit;

$status = $_REQUEST['status'];
$status = Request::val('status');
if($status == 'on') maintenance_mode(true);
if($status == 'off') maintenance_mode(false);

11 changes: 4 additions & 7 deletions app/admin/getUsers.php
Expand Up @@ -25,17 +25,14 @@
// how many results to return per call, in case of json output
$results_per_page = 50;

$id = false;
if(isset($_REQUEST['id'])) $id = from_utf8($_REQUEST['id']);
$id = from_utf8(Request::val('id'));
$search_term = from_utf8(Request::val('s'));

$search_term = false;
if(isset($_REQUEST['s'])) $search_term = from_utf8($_REQUEST['s']);

$page = intval($_REQUEST['p']);
$page = intval(Request::val('p'));
if($page < 1) $page = 1;
$skip = $results_per_page * ($page - 1);

$table_name = $_REQUEST['t'];
$table_name = Request::val('t');
if(!in_array($table_name, array_keys(getTableList()))) {
/* invalid table */
echo '{"results":[{"id":"","text":"Invalid table"}],"more":false,"elapsed":0}';
Expand Down

0 comments on commit 7e5f4dc

Please sign in to comment.