Poprawka botto bar i wersje językowe

This commit is contained in:
2026-09-25 17:39:44 +02:00
parent 3056eb6c3d
commit a381ad09d8
21 changed files with 770 additions and 428 deletions
+10 -7
View File
@@ -19,14 +19,17 @@ function resolveGuestQueueTableId(string $tableId, string $qrHash): string
{
global $conn;
if ($tableId === '' && $qrHash !== '' && isset($conn)) {
$resolved = getTableNameByHash($conn, $qrHash);
if ($resolved !== '') {
$tableId = $resolved;
}
// Wymagamy prawidłowego hasha QR — samo tableId (łatwe do odgadnięcia) nie wystarczy.
if ($qrHash === '' || !isset($conn)) {
return '';
}
return trim($tableId);
$resolved = getTableNameByHash($conn, $qrHash);
if ($resolved === '') {
return '';
}
return trim($resolved);
}
function hasPendingGuestAction(PDO $pdo, string $tableId, string $messageType): bool
@@ -285,7 +288,7 @@ if ($tableId === '') {
http_response_code(422);
echo json_encode([
'status' => 'error',
'message' => 'tableId is required',
'message' => 'Valid qrHash is required',
], JSON_UNESCAPED_UNICODE);
exit;
}