From 6c877fecb5374905d3f49663c68c20416a847e0e Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 12 Apr 2022 13:47:55 +0200 Subject: Commit --- app/genealogy/search/dept/data.json/index.php | 39 --------------------------- 1 file changed, 39 deletions(-) delete mode 100644 app/genealogy/search/dept/data.json/index.php (limited to 'app/genealogy/search/dept/data.json') diff --git a/app/genealogy/search/dept/data.json/index.php b/app/genealogy/search/dept/data.json/index.php deleted file mode 100644 index fb27645..0000000 --- a/app/genealogy/search/dept/data.json/index.php +++ /dev/null @@ -1,39 +0,0 @@ - $person) { - if (isset($person["birth"]["place"]) && isset($person["birth"]["place"]["dept"])) { - if (isset($counts[$person["birth"]["place"]["dept"]])) { - $counts[$person["birth"]["place"]["dept"]]++; - } else { - $counts[$person["birth"]["place"]["dept"]] = 1; - } - if (!in_array($person["birth"]["place"]["dept"], $names)) { - $names[] = $person["birth"]["place"]["dept"]; - } - } -} - -foreach ($names as $name) { - $arr[] = [ - 'name' => $name, - 'occurrences' => $counts[$name] . " personne" . ($counts[$name] > 1 ? "s" : "") - ]; -} - -echo(json_encode($arr)); \ No newline at end of file -- cgit