switch($s) {
case 'Lang':
+
+
$i->ltype = 'l';
$i->applyFilters($_REQUEST, $this->authUser, $this);
- $this->jdata($i->toTransList('l', $lbits[0]));
+ $this->jdata($i->toTransList('l', implode('_',$lbits)));
break;
case 'Country':
$i->ltype = 'c';
$i->applyFilters($_REQUEST, $this->authUser, $this);
- $this->jdata($i->toTransList('c', $lbits[0]));
+ $this->jdata($i->toTransList('c', implode('_',$lbits)));
break;
case 'Currency':
$i->ltype = 'm';
$i->applyFilters($_REQUEST, $this->authUser, $this);
- $this->jdata($i->toTransList('m', $lbits[0]));
+ $this->jdata($i->toTransList('m', implode('_',$lbits)));
break;
case 'Timezone':
$tza= array_unique($tza);
sort($tza);
foreach($tza as $tz) {
- $ret[] = array('tz' => $tz);
+ //filtering..
+ if (empty($_REQUEST['q']) ||
+ 0 === strcasecmp(
+ substr($tz,0, strlen($_REQUEST['q'])),
+ $_REQUEST['q'])
+ ) {
+ $ret[] = array('tz' => $tz);
+ }
+
}
$this->jdata($ret);
if (!empty($_REQUEST['debug'])) {
DB_DataObject::debugLevel(1);
}
+
$i = DB_DataObject::Factory('I18n');
- $i->buildDb();
+ $i->buildDB();
$i = DB_DataObject::Factory('I18n');
$ar = array();
foreach($langs as $lang)
{
- $rlang = array_shift(explode('_', strtoupper($lang)));
+ //$rlang = array_shift(explode('_', strtoupper($lang)));
+ $rlang = array_shift(explode('_', $lang));
$ar[$lang] = array();
$i = DB_DataObject::Factory('I18n');
/**
* translate (used by database building);
* usage :
- * require_once 'Pman/Core/I18N.php';
+ * require_once 'Pman/Core/I18n.php';
* $x = new Pman_Core_I18N();
* $x->translate($this->authuser, 'c', 'US');
* @param au - auth User
}
$target = ini_get('session.save_path').'/eurofxref-daily.xml';
if (!file_exists($target) || filemtime($target) < (time() - 60*60*24)) {
- $f = file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
+ // this may fail...
+ $f = @file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
if (!strlen($f)) {
+ $target = dirname(__FILE__).'eurofxref-daily.xml';
+
return false;
}
file_put_contents($target,$f);