[geeklog-cvs] geeklog: Cosmetics

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Sep 20 04:50:27 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/01eed07e51e9
changeset: 7328:01eed07e51e9
user:      Dirk Haun <dirk at haun-online.de>
date:      Sat Sep 19 22:42:31 2009 +0200
description:
Cosmetics

diffstat:

 public_html/usersettings.php |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (28 lines):

diff -r 55608273b965 -r 01eed07e51e9 public_html/usersettings.php
--- a/public_html/usersettings.php	Sat Sep 19 17:58:30 2009 +0200
+++ b/public_html/usersettings.php	Sat Sep 19 22:42:31 2009 +0200
@@ -532,20 +532,18 @@
 
     $T = $GLOBALS['_DATE_TIMEZONE_DATA'];
 
-    while ($tDetails = current($T)) {
-        $tzcode = htmlspecialchars(key($T));
+    foreach ($T as $tzid => $tDetails) {
+        $tzcode = str_replace('_', ' ', $tzid);
+        $tzcode = htmlspecialchars($tzcode);
         $selection .= '<option value="' . $tzcode . '"';
         if ($timezone == $tzcode) {
-                $selection .= ' selected="selected"';
-        } else {
-                $selection .= '';
+            $selection .= ' selected="selected"';
         }
         $hours = $tDetails['offset'] / (3600 * 1000);
         if ($hours > 0) {
             $hours = "+$hours";
         }
         $selection .= ">$hours, {$tDetails['shortname']} ($tzcode)</option>" . LB;
-        next($T);
     }
     $selection .= '</select>';
     $preferences->set_var ('timezone_selector', $selection);



More information about the geeklog-cvs mailing list