[GRASS-SVN] r30249 - grass-web/trunk

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 19 05:22:42 EST 2008


Author: neteler
Date: 2008-02-19 05:22:41 -0500 (Tue, 19 Feb 2008)
New Revision: 30249

Modified:
   grass-web/trunk/index.php
Log:
try to work around some funky bug on http://mirror.aarnet.edu.au/pub/grass/index.php

Modified: grass-web/trunk/index.php
===================================================================
--- grass-web/trunk/index.php	2008-02-19 03:32:47 UTC (rev 30248)
+++ grass-web/trunk/index.php	2008-02-19 10:22:41 UTC (rev 30249)
@@ -48,20 +48,18 @@
   $file_contents = curl_exec($ch);
   curl_close($ch);
   if (!$file_contents) {
-     echo "<font size=\"-1\"><i>You are at an official GRASS site (other
-                   <a href=\"mirrors.php\">mirror sites</a>)<br>";
-  }
-  else {
+     echo "<font size=\"-1\"><i>You are at an official GRASS site (other <a href=\"mirrors.php\">mirror sites</a>)<br>";
+  } else {
       // e.g.: "Country: UNITED STATES (US) City: San Diego, CA"
       $MYSTATETMP = explode(":", $file_contents);
       $MYSTATETMP2 = explode(")", $MYSTATETMP[1]);
       $MYSTATE = $MYSTATETMP2[0] . ")";
-      if ($MYIP == "198.202.74.219")
+      if ($MYIP == "198.202.74.219") {
 	echo "<font size=\"-1\"><i>You are at the official GRASS site in $MYSTATE
                    (<a href=\"mirrors.php\">mirror sites</a>)<br>";
-      else
-	echo "<font size=\"-1\"><i>You are at a GRASS mirror site in $MYSTATE (other
-                   <a href=\"mirrors.php\">mirror sites</a>)<br>";
+      } else {
+	echo "<font size=\"-1\"><i>You are at a GRASS mirror site in $MYSTATE (other <a href=\"mirrors.php\">mirror sites</a>)<br>";
+      }
   }
 } elseif (function_exists('fopen') && allow_url_fopen ) {
      $MYIP = $_SERVER['SERVER_ADDR'];
@@ -69,8 +67,7 @@
      if (!$file) {
          echo "<font size=\"-1\"><i>You are at an official GRASS site (other
                    <a href=\"mirrors.php\">mirror sites</a>)<br>";
-     }
-     else {
+     } else {
 	 $line = fgets ($file, 34);
 	 $MYSTATETMP = explode(":", $line);
 	 $MYSTATE = $MYSTATETMP[1];



More information about the grass-commit mailing list