improve push_lang and pop_lang to do basically nothing if the new language is the same as existing
This commit is contained in:
parent
040fc247a0
commit
21769d7390
1 changed files with 7 additions and 0 deletions
|
@ -58,6 +58,9 @@ function push_lang($language) {
|
|||
|
||||
$a->langsave = $lang;
|
||||
|
||||
if($language === $lang)
|
||||
return;
|
||||
|
||||
if(isset($a->strings) && count($a->strings)) {
|
||||
$a->stringsave = $a->strings;
|
||||
}
|
||||
|
@ -68,6 +71,10 @@ function push_lang($language) {
|
|||
|
||||
function pop_lang() {
|
||||
global $lang, $a;
|
||||
|
||||
if($lang === $a->langsave)
|
||||
return;
|
||||
|
||||
if(isset($a->stringsave))
|
||||
$a->strings = $a->stringsave;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue