[fix] Yet more fallout from the PHP8.1 stuff

master
Solomon Peachy 2022-11-20 21:48:23 -05:00
parent 133e21bc46
commit f7c0c14163
17 changed files with 22 additions and 22 deletions

View File

@ -21,7 +21,6 @@
include_once "include/config.php";
include_once "include/admin.php";
include_once "include/site.php";
;
include_once "include/common.php";
$database = site_prolog(PO_USER_TYPE_ADMIN);

View File

@ -20,9 +20,10 @@
include_once "include/config.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_CLIENT);
$album_id = pg_escape_string($database, $_REQUEST['album']);
$database = site_prolog(PO_USER_TYPE_CLIENT);
$go = TRUE;
/* Ensure mere users don't erase an album that isn't theirs! */

View File

@ -20,6 +20,8 @@
include_once "include/config.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_CLIENT);
$album_id = pg_escape_string($database, $_REQUEST['album']);
$album_name = pg_escape_string($database, $_REQUEST['album_caption']);
$album_description = pg_escape_string($database, $_REQUEST['album_description']);
@ -32,7 +34,6 @@ $keep_thumb = $_REQUEST['keep_thumb'];
if ($event != "null") $event = "'$event'";
$database = site_prolog(PO_USER_TYPE_CLIENT);
$go = TRUE;
/* Ensure mere users don't edit an album that isn't theirs! */

View File

@ -24,6 +24,8 @@ include_once "include/common.php";
include_once "include/site.php";
include_once "include/import.php";
$database = site_prolog(PO_USER_TYPE_USER);
$select_folder = pg_escape_string($database, $_REQUEST['select_folder']);
$select_album = pg_escape_string($database, $_REQUEST['select_album']);
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : FALSE;
@ -35,7 +37,6 @@ $set_generate_images = $_REQUEST['set_generate_images'];
$compress_pages = false; /* Explicitly disable it here */
set_time_limit(0); /* Explicitly disable timeouts here */
$database = site_prolog(PO_USER_TYPE_USER);
if (!sizeof($to_update) && ($set_generate_images != 't')) {
site_push_error($strings['errors_invalid_options']);

View File

@ -22,7 +22,6 @@ include_once "include/config.php";
include_once "include/profile.php";
include_once "include/calendar.php";
include_once "include/site.php";
;
function add_camera($database, $user_id,
$camera_type_id, $camera_manufacturer_id, $camera_model, $camera_variation,

View File

@ -21,7 +21,6 @@
include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
;
function add_film($database, $user_id, $film_type_id, $film_manufacturer_id,
$film_model, $film_iso, $film_format_id, $film_access_rights) {

View File

@ -21,9 +21,10 @@ include_once "include/config.php";
include_once "include/site.php";
include_once "include/import.php";
$database = site_prolog();
$return_path = isset($_REQUEST['return']) ? $_REQUEST['return'] : "";
$database = site_prolog();
$owner_id = isset($_REQUEST['user']) ? $_REQUEST['user'] : 0;
$destination_folder = pg_escape_string($database, isset($_REQUEST['destination_folder']) ? $_REQUEST['destination_folder'] : "");

View File

@ -20,10 +20,11 @@
include_once "include/config.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_USER);
$folder_id = pg_escape_string($database, $_REQUEST['folder']);
$parent_folder = $_REQUEST['parent'];
$database = site_prolog(PO_USER_TYPE_USER);
$go = TRUE;
/* Ensure mere users don't erase an folder that isn't theirs! */

View File

@ -20,6 +20,8 @@
include_once "include/config.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_USER);
$folder_id = pg_escape_string($database, $_REQUEST['folder']);
$folder_name = pg_escape_string($database, $_REQUEST['folder_caption']);
$folder_description = pg_escape_string($database, $_REQUEST['folder_description']);
@ -32,7 +34,6 @@ $keep_thumb = $_REQUEST['keep_thumb'];
if ($event != "null") $event = "'$event'";
$database = site_prolog(PO_USER_TYPE_USER);
/* Ensure mere users don't edit an folder that isn't theirs! */
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {

View File

@ -21,7 +21,6 @@
include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
;
$database = site_prolog(PO_USER_TYPE_USER);

View File

@ -21,10 +21,10 @@ include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
$location_id = pg_escape_string($database, $_REQUEST['location']);
$database = site_prolog(PO_USER_TYPE_USER);
$location_id = pg_escape_string($database, $_REQUEST['location']);
if ($location_id!="") {
/* Ensure the user owns it !*/
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {

View File

@ -21,6 +21,8 @@ include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_USER);
$location_id = $_REQUEST['location'];
$location_name = pg_escape_string($database, $_REQUEST['location_name']);
$location_city = pg_escape_string($database, $_REQUEST['location_city']);
@ -30,8 +32,6 @@ $location_latitude = pg_escape_string($database, parse_latitude($_REQUEST['loca
$location_longitude = pg_escape_string($database, parse_latitude($_REQUEST['location_longitude']));
$location_private = pg_escape_string($database, $_REQUEST['private']);
$database = site_prolog(PO_USER_TYPE_USER);
if ($location_id!="") {
/* Ensure the user owns it !*/
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {

View File

@ -21,7 +21,6 @@
include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
;
$database = site_prolog(PO_USER_TYPE_USER);

View File

@ -21,12 +21,11 @@
include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
;
$manufacturer_id = pg_escape_string($database, $_REQUEST['manufacturer']);
$database = site_prolog(PO_USER_TYPE_USER);
$manufacturer_id = pg_escape_string($database, $_REQUEST['manufacturer']);
if ($manufacturer_id!="") {
/* Ensure the user owns it !*/
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {

View File

@ -24,7 +24,7 @@ include_once "include/common.php";
$database = site_prolog(PO_USER_TYPE_USER);
$manufacturer_id=pg_escape_string($database, $_REQUEST['item']);
$manufacturer_id = pg_escape_string($database, $_REQUEST['item']);
/* Ensure the user owns it !*/
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {

View File

@ -22,12 +22,12 @@ include_once "include/config.php";
include_once "include/profile.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_USER);
$manufacturer_id = pg_escape_string($database, $_REQUEST['manufacturer']);
$manufacturer_name = pg_escape_string($database, $_REQUEST['manufacturer_name']);
$manufacturer_url = pg_escape_string($database, $_REQUEST['manufacturer_url']);
$database = site_prolog(PO_USER_TYPE_USER);
if (($manufacturer_id!="") && ($manufacturer_name!="")) {
if ($po_user['type'] != PO_USER_TYPE_ADMIN) {
$result = pg_fetch_row(pg_query($database, "select count(identifier) from manufacturer where identifier=$manufacturer_id and last_modifying_users=$po_user[id]"));

View File

@ -24,7 +24,7 @@ include_once "include/common.php";
$database = site_prolog(PO_USER_TYPE_USER);
$manufacturer_id=pg_escape_string($database, $_REQUEST['item']);
$manufacturer_id = pg_escape_string($database, $_REQUEST['item']);
$manufacturer = pg_fetch_row(pg_query($database, "select name, url, last_modifying_users from manufacturer where identifier=$manufacturer_id"));
/* Ensure the user owns it !*/