From db2d4fcbc792848564655bec566c588936fecf85 Mon Sep 17 00:00:00 2001 From: Kim Taylor Date: Tue, 24 Sep 2024 15:01:44 +1000 Subject: [PATCH] Don't keep appending .json to image field. --- csv-generic/gen-generic.php | 1 + 1 file changed, 1 insertion(+) diff --git a/csv-generic/gen-generic.php b/csv-generic/gen-generic.php index e492dcd..58295d1 100644 --- a/csv-generic/gen-generic.php +++ b/csv-generic/gen-generic.php @@ -78,6 +78,7 @@ foreach ($lga_list as $lga) { foreach ($lga_candidates as $candidate) { /* Add extension to photo hash */ foreach ($dir_files as $file) { + if (preg_match("/\.json$/", $file)) continue; if (strstr($file, $candidate['Photo'])) { $candidate['Photo'] = $file; }