foreach($opts as $k=>$v) {
if ($v == '*') { // everything..
- self::$cfg[$k] = $i->availableCodes($k);
+ self::$cfg[$k] = $i->availableCodes($k, false);
continue;
}
self::$cfg[$k] = is_array($v) ? $v : explode(',', $v);
$this->whereAdd("lval LIKE '". $this->escape($q['query']['name']). "%'");
}
+
+ if (!empty($q['_filtered']) && !empty($this->ltype)) {
+ $cfg = $this->cfg();
+ $filter = $cfg[$this->ltype];
+ $this->whereAddIn('lkey', $filter, 'string');
+
+
+ }
}
function translate($inlang,$ltype,$kval)
// returns a list of all countries/languages etc.. (with '*')
- function availableCodes($t)
+ function availableCodes($t, $filtered = true)
{
$ret = array();
$cfg = $this->cfg();
$ret[] = '**';
break;
}
- if (!empty($cfg[$t]) && is_array($cfg[$t])) {
+
+
+
+ if ($filtered && !empty($cfg[$t]) && is_array($cfg[$t])) {
// then there is a filter. - we should include all of them, even if they are not relivatn??
return $cfg[$t]; //array_intersect($cfg[$t], $ret);
{
$cfg = $this->cfg();
- print_r($cfg);
+ //print_r($cfg);
if ($ltype === false) {
// trigger all builds.
//DB_DataObject::debugLevel(1);