From 1735d52781fcf298ffa381352c5b3c0946400489 Mon Sep 17 00:00:00 2001 From: Kim Taylor Date: Fri, 11 Apr 2025 21:21:42 +1000 Subject: [PATCH] Update division page generation. --- make-council-pages.sh | 2 +- php-template/template.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/make-council-pages.sh b/make-council-pages.sh index e694f7c..c9c4b54 100755 --- a/make-council-pages.sh +++ b/make-council-pages.sh @@ -23,7 +23,7 @@ function create_or_update_page() { media_inputs+=("$file") fi done - for file in "$DATA_PATH"/*.{jpeg,jpg,png,gif}.json; do + for file in "$DATA_PATH"/../*.{jpeg,jpg,png,gif}.json; do if test -f "$file"; then media_inputs+=("$file") fi diff --git a/php-template/template.php b/php-template/template.php index 52c6098..3f4e545 100644 --- a/php-template/template.php +++ b/php-template/template.php @@ -114,20 +114,20 @@ if (isset($config["survey"])) { strtolower($candidate[$propertyOnCandidate]) === strtolower($groupName); }); - usort($groupCandidates, function($a, $b) { + usort($candidates, function($a, $b) { if ($a == $b) { return 0; } return (((int) $a['Rating']) < ((int) $b['Rating'])) ? 1 : -1; }); - if (count($groupCandidates) > 0): + if (count($candidates) > 0): ?>