remove global $lang var in templates. can't work as intended
This commit is contained in:
parent
ae024edbf9
commit
8d93eefea8
1 changed files with 1 additions and 18 deletions
|
@ -160,25 +160,8 @@
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _get_lang(){
|
|
||||||
if ($this->lang!=null) return $this->lang;
|
|
||||||
|
|
||||||
$a = get_app();
|
|
||||||
$this->lang=array();
|
|
||||||
if(is_array($a->strings) && count($a->strings)) {
|
|
||||||
foreach ($a->strings as $k=>$v){
|
|
||||||
$k = preg_replace("/[^a-z0-9-]/", "", str_replace(" ","-", strtolower($k)));
|
|
||||||
$this->lang[$k] = $v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $this->lang;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function replace($s, $r) {
|
public function replace($s, $r) {
|
||||||
if (!x($r,'$lang')){
|
|
||||||
$r['$lang'] = &$this->_get_lang();
|
|
||||||
}
|
|
||||||
$this->r = $r;
|
$this->r = $r;
|
||||||
$this->search = array();
|
$this->search = array();
|
||||||
$this->replace = array();
|
$this->replace = array();
|
||||||
|
|
Loading…
Reference in a new issue