Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/people_deactivated.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
});
Expand Down
4 changes: 2 additions & 2 deletions library/lib/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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];
Expand Down
5 changes: 3 additions & 2 deletions pdf/qr.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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];
}
}
Expand Down Expand Up @@ -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');
}
Expand Down
Loading