Fix: Kritische JS Variablen und PHP Scopes korrigiert
All checks were successful
Docker Build & Push / build-and-push (push) Successful in 36s

This commit is contained in:
Gemini
2026-05-15 17:40:30 +00:00
parent 07ded9398a
commit 7f02633c87
2 changed files with 1 additions and 15 deletions

View File

@@ -336,6 +336,7 @@ $conn->close();
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
const bulkSelectedArticles = new Set();
const articlesData = <?php echo json_encode($articles); ?>;
const currentUserId = <?php echo $current_user_id; ?>;
const currentUserHouseholdId = <?php echo json_encode($current_user_household_id); ?>;

View File

@@ -147,21 +147,6 @@ elseif (isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id
}
}
// AKTION: BARCODE GENERIEREN
elseif (isset($_GET['action']) && $_GET['action'] == 'generate_barcode' && isset($_GET['id'])) {
$location_id = intval($_GET['id']);
$token = bin2hex(random_bytes(16));
$stmt_token = $conn->prepare("UPDATE storage_locations SET public_token = ? WHERE id = ? AND user_id IN ($placeholders)");
$all_params = array_merge([$token, $location_id], $household_member_ids);
$all_types = 'si' . $types;
$stmt_token->bind_param($all_types, ...$all_params);
$stmt_token->execute();
$stmt_token->close();
header("Location: storage_locations.php");
exit;
}
// Lade alle Orte des Haushalts
$sql = "SELECT sl.id, sl.name, sl.parent_id, sl.user_id, sl.public_token FROM storage_locations sl WHERE sl.user_id IN ($placeholders) ORDER BY sl.parent_id ASC, sl.name ASC";
$stmt_load = $conn->prepare($sql);