From d0d5a9e6ed594b8ddb295945a58f20bdd7ea338f Mon Sep 17 00:00:00 2001 From: Rastislav Chynoransky Date: Thu, 16 Jan 2025 10:22:51 +0700 Subject: [PATCH] [import] remove spaces from ID --- app/Importers/UpmImporter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Importers/UpmImporter.php b/app/Importers/UpmImporter.php index 590bb75b1..2d73815dc 100644 --- a/app/Importers/UpmImporter.php +++ b/app/Importers/UpmImporter.php @@ -64,6 +64,7 @@ protected function init() protected function getItemId(array $record) { return 'CZE:UPM.' . str($record['ID']) + ->replace(' ', '') ->explode('_') ->transform(fn ($part) => str($part) ->replaceMatches('/\W/', '-') @@ -75,6 +76,7 @@ protected function getItemId(array $record) protected function getItemImageFilenameFormat(array $record): string { return str($record['ID']) + ->replace(' ', '') ->explode('_') ->transform(fn ($part) => '0*' . preg_quote($part)) ->join('_') . '(_.*)?';