Replace Function sanitizeInput() with just escapeSql() and update all instances throughout

This commit is contained in:
johnnyq
2026-07-14 17:17:50 -04:00
parent 7bc47a58fe
commit b57ddc0e5c
148 changed files with 1945 additions and 1945 deletions

View File

@@ -51,8 +51,8 @@ if (isset($_GET['archive_category'])) {
// Get Category Name and Type for logging
$sql = mysqli_query($mysqli,"SELECT category_name, category_type FROM categories WHERE category_id = $category_id");
$row = mysqli_fetch_assoc($sql);
$category_name = sanitizeInput($row['category_name']);
$category_type = sanitizeInput($row['category_type']);
$category_name = escapeSql($row['category_name']);
$category_type = escapeSql($row['category_type']);
mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NOW() WHERE category_id = $category_id");
@@ -73,8 +73,8 @@ if (isset($_GET['restore_category'])) {
// Get Category Name and Type for logging
$sql = mysqli_query($mysqli,"SELECT category_name, category_type FROM categories WHERE category_id = $category_id");
$row = mysqli_fetch_assoc($sql);
$category_name = sanitizeInput($row['category_name']);
$category_type = sanitizeInput($row['category_type']);
$category_name = escapeSql($row['category_name']);
$category_type = escapeSql($row['category_type']);
mysqli_query($mysqli,"UPDATE categories SET category_archived_at = NULL WHERE category_id = $category_id");
@@ -95,8 +95,8 @@ if (isset($_GET['delete_category'])) {
// Get Category Name and Type for logging
$sql = mysqli_query($mysqli,"SELECT category_name, category_type FROM categories WHERE category_id = $category_id");
$row = mysqli_fetch_assoc($sql);
$category_name = sanitizeInput($row['category_name']);
$category_type = sanitizeInput($row['category_type']);
$category_name = escapeSql($row['category_name']);
$category_type = escapeSql($row['category_type']);
mysqli_query($mysqli,"DELETE FROM categories WHERE category_id = $category_id");