From 2944d7d477500c3782890ee79154b4327b757aa8 Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 24 Mar 2026 11:54:44 +0100 Subject: [PATCH 1/2] Use identical timestamp Follow-up for #804 and #814 --- pdf/qr.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdf/qr.php b/pdf/qr.php index 322f66fc..21c447a6 100644 --- a/pdf/qr.php +++ b/pdf/qr.php @@ -37,6 +37,7 @@ function () { $_GET['count'] = count($labels); } + $now = date('Y-m-d H:i:s'); $box_ids_without_qr = []; for ($i = 0; $i < intval($_GET['count']); ++$i) { if (!($i % 2)) { @@ -85,7 +86,7 @@ function () { [$id, $hash] = generateQRIDForDB(); if ($labels[$i]) { - db_query('UPDATE stock SET qr_id = :qr_id, modified = NOW(), modified_by = :user WHERE id = :id', ['id' => $labels[$i], 'qr_id' => $id, 'user' => $_SESSION['user']['id']]); + db_query('UPDATE stock SET qr_id = :qr_id, modified = :now, modified_by = :user WHERE id = :id', ['id' => $labels[$i], 'qr_id' => $id, 'now' => $now, 'user' => $_SESSION['user']['id']]); $box_ids_without_qr[] = $labels[$i]; } } @@ -138,7 +139,7 @@ function () { // $pdf->Text(140, } } - simpleBulkSaveChangeHistory('stock', $box_ids_without_qr, 'New Qr-code assigned by pdf generation.'); + simpleBulkSaveChangeHistory('stock', $box_ids_without_qr, 'New Qr-code assigned by pdf generation.', $now); $pdf->Output('I'); } From adef99d8a417d67711249fe53440fb4ba567e039 Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 24 Mar 2026 12:07:25 +0100 Subject: [PATCH 2/2] Pass timestamp into listBulkRealDelete --- include/people_deactivated.php | 2 +- library/lib/list.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/people_deactivated.php b/include/people_deactivated.php index dd77061b..9478dba3 100644 --- a/include/people_deactivated.php +++ b/include/people_deactivated.php @@ -161,7 +161,7 @@ function () use (&$data) { } // Optimized by using bulk inserts and transactions over delete queries - [$success, $message, $redirect] = listBulkRealDelete($table, $ids); + [$success, $message, $redirect] = listBulkRealDelete($table, $ids, $now); return [$success, $message, $redirect]; }); diff --git a/library/lib/list.php b/library/lib/list.php index f8106d95..f24ba54c 100644 --- a/library/lib/list.php +++ b/library/lib/list.php @@ -91,7 +91,7 @@ function listBulkMove($table, $ids, $regardparent = true, $hook = '', $updatetra return [true, $return, false, $aftermove]; } -function listBulkRealDelete($table, $ids, $uri = false) +function listBulkRealDelete($table, $ids, $now = null) { global $translate, $action; @@ -108,7 +108,7 @@ function listBulkRealDelete($table, $ids, $uri = false) } } - simpleBulkSaveChangeHistory($table, $deletedIds, 'Record deleted without undelete'); + simpleBulkSaveChangeHistory($table, $deletedIds, 'Record deleted without undelete', $now); if ($count) { return [true, $translate['cms_list_deletesuccess'], true];