]> git.mxchange.org Git - friendica.git/commitdiff
improve push_lang and pop_lang to do basically nothing if the new language is the...
authorFriendika <info@friendika.com>
Tue, 24 May 2011 03:37:36 +0000 (20:37 -0700)
committerFriendika <info@friendika.com>
Tue, 24 May 2011 03:37:36 +0000 (20:37 -0700)
include/pgettext.php

index 47242f7ba981289afc102acff5a7aeff5b90e43a..49f10073702f8b58e5995eec45bcc8a821bfa220 100644 (file)
@@ -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