[fix] More PHP8.1

This commit is contained in:
Solomon Peachy 2022-11-20 16:38:01 -05:00
parent 6dcfb0e752
commit 2d2fec03ea
5 changed files with 10 additions and 7 deletions

View file

@ -72,12 +72,12 @@ if (!$current_user_id || ($current_user_id=="all")) {
$sql_album_users_string = " and album.users = $current_user_id ";
}
$database = site_prolog();
$offset = pg_escape_string($database, isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
$order_by = $po_options['order_by'];
$database = site_prolog();
site_header($strings['generic_search']);
site_navigator(2);

View file

@ -27,6 +27,8 @@ include_once "include/search.php";
$search_data = isset($_REQUEST['keyword']) ? validate_search_string($_REQUEST['keyword']) : "";
$master = isset($_REQUEST['only_masters']);
$database = site_prolog();
$offset = pg_escape_string($database, isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
if ($offset && !is_numeric($offset)) {
$offset = 0;
@ -36,7 +38,6 @@ $arguments = array();
$order_by = $po_options['order_by'];
$database = site_prolog();
$keywords = extract_keywords($search_data, $po_options['search_enable_stemming']);

View file

@ -120,6 +120,8 @@ if ($search_data['end_date'] == 'null') $search_data['end_date'] = '';
$master = isset($_REQUEST['only_masters']);
$database = site_prolog();
$offset = pg_escape_string($database, isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
if ($offset && !is_numeric($offset)) {
$offset = 0;
@ -127,7 +129,6 @@ if ($offset && !is_numeric($offset)) {
$order_by = $po_options['order_by'];
$database = site_prolog();
site_header($strings['generic_search']);
site_navigator(2);

View file

@ -75,6 +75,8 @@ if (!$current_user_id || ($current_user_id=="all")) {
$sql_album_users_string = " and album.users = $current_user_id ";
}
$database = site_prolog();
$offset = pg_escape_string($database, isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
if ($offset && !is_numeric($offset)) {
$offset = 0;
@ -82,8 +84,6 @@ if ($offset && !is_numeric($offset)) {
$order_by = $po_options['order_by'];
$database = site_prolog();
site_header($strings['generic_search']);
site_navigator(2);

View file

@ -75,13 +75,14 @@ $current_user_id = isset($_REQUEST['current_user']) ? $_REQUEST['current_user']
if ($current_user_id == 'null')
$current_user_id = $po_user['id'];
$database = site_prolog();
$master = isset($_REQUEST['only_masters']);
$offset = pg_escape_string($database, isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
$order_by = $po_options['order_by'];
$database = site_prolog();
site_header($strings['generic_search']);