Fix: set ImageExtension after downloading item images in saveWizard

downloadItemImage() saved files to disk but never updated the DB column,
so items appeared to have no images despite files existing on disk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-03-15 01:57:39 -07:00
parent 280394f5e0
commit 5d34d8378b

View file

@ -667,6 +667,7 @@ try {
if (!is_dir($itemsDir)) mkdir($itemsDir, 0755, true);
if (downloadItemImage($menuItemID, $itemImageUrl, $itemsDir)) {
$totalImages++;
$pdo->prepare("UPDATE Items SET ImageExtension = 'jpg' WHERE ID = ?")->execute([$menuItemID]);
}
}
}