diff www/loc.php @ 2032:d9c15f7ae4c4

Add defines for continent list array index constants and use them.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 Jan 2019 01:27:14 +0200
parents 135b2b595e2c
children 57ecb49d7b4a
line wrap: on
line diff
--- a/www/loc.php	Tue Jan 22 15:40:17 2019 +0200
+++ b/www/loc.php	Sat Jan 26 01:27:14 2019 +0200
@@ -172,8 +172,8 @@
 
 if (isset($setName) && isset($continentList[$setName]))
 {
-  $mtitle .= $continentList[$setName][0].
-    ($continentList[$setName][3] ? " in " : " continent in ");
+  $mtitle .= $continentList[$setName][CTI_NAME].
+    ($continentList[$setName][CTI_SPECIAL] ? " in " : " continent in ");
 }
 
 mpPrintPageHeader($pageTitle." - Locations",
@@ -204,7 +204,7 @@
 printTitleLink($applyFilter, $filterID, $showCoders, "All&nbsp;continents", "", "all");
 foreach ($continentList as $continent => $data)
 {
-  if ($data[4])
+  if ($data[CTI_HAS_MAP])
     printTitleLink($applyFilter, $filterID, $showCoders, $data[0], $continent, $continent);
 }
 printTitleLink($applyFilter, $filterID, $showCoders, "Special", "special", "special");
@@ -320,7 +320,7 @@
       echo
         "  <div class=\"locCell ".$iv["continent"]."\">".
         "<div class=\"locHeader\">".
-        "<span class=\"locTitle\">".mpGetMapLink($iv, $continentList[$iv["continent"]][4])."</span>";
+        "<span class=\"locTitle\">".mpGetMapLink($iv, $continentList[$iv["continent"]][CTI_HAS_MAP])."</span>";
 
       // If either freeform desc or URL field are set, we add those
       if (isset($iv["url"]) || isset($iv["freeform"]))