[evolvis-commits] r18376: small-fixes pending merges:↵ Thorsten Glaser 2012-04-24 more efficient

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Apr 24 18:04:45 CEST 2012


Author: mirabilos
Date: 2012-04-24 18:04:43 +0200 (Tue, 24 Apr 2012)
New Revision: 18376

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/timezones.php
Log:
small-fixes pending merges:
  Thorsten Glaser 2012-04-24 more efficient

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/timezones.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/timezones.php	2012-04-24 14:35:09 UTC (rev 18375)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/timezones.php	2012-04-24 16:04:43 UTC (rev 18376)
@@ -39,23 +39,23 @@
 			$TZs[] = $j;
 		}
 	}
-	$j = true;
-	while ($j) {
+	do {
 		sort($TZs);
 		$i = count($TZs);
-		$j = false;
+		$j = array();
 		while ($i-- > 0) {
 			if (is_dir("/usr/share/zoneinfo/" . $TZs[$i])) {
 				foreach (ls("/usr/share/zoneinfo/" . $TZs[$i])
-				    as $j) {
-					$TZs[] = $TZs[$i] . "/" . $j;
+				    as $k) {
+					$TZs[] = $TZs[$i] . "/" . $k;
 				}
-				unset($TZs[$i]);
-				$j = true;
-				break;
+				$j[] = $i;
 			}
 		}
-	}
+		foreach ($j as $i) {
+			unset($TZs[$i]);
+		}
+	} while ($j);
 	sort($TZs);
 }
 



More information about the evolvis-commits mailing list