I18n.php
[Pman.Core] / I18n.php
index 55ece1e..bd87719 100644 (file)
--- a/I18n.php
+++ b/I18n.php
@@ -116,6 +116,8 @@ class Pman_Core_I18n extends Pman
         
         switch($s) {
             case 'Lang':
+                 
+                print_R($this->authUser);
                 $i->ltype = 'l';
                 $i->applyFilters($_REQUEST, $this->authUser, $this);
                 $this->jdata($i->toTransList('l',  $lbits[0]));
@@ -136,7 +138,29 @@ class Pman_Core_I18n extends Pman
             
             case 'Timezone':
                 $ar = DateTimeZone::listAbbreviations();
-                echo '<PRE>';print_R($ar);exit;
+                $ret = array();
+                $tza = array();
+                foreach($ar as $tl => $sar) {
+                    foreach($sar as $tz) {
+                        $tza[]  = $tz['timezone_id'];
+                    
+                    }
+                }
+                $tza= array_unique($tza);
+                sort($tza);
+                foreach($tza as $tz) {
+                    //filtering..
+                    if (empty($_REQUEST['q']) ||
+                            0 === strcasecmp(
+                                    substr($tz,0, strlen($_REQUEST['q'])),
+                                    $_REQUEST['q'])
+                    ) {
+                        $ret[] = array('tz' => $tz);
+                    }
+                    
+                }
+                $this->jdata($ret);
+