diff options
author | Friendika <info@friendika.com> | 2011-05-23 20:37:36 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-23 20:37:36 -0700 |
commit | 21769d7390a0bcfb5c74e53c05867ab52a54448b (patch) | |
tree | cc12e8d8e71da55611cbd9eaabcd08bdd1e0812a | |
parent | 040fc247a0caa51e0d4da4169980dc32e80ee804 (diff) | |
download | volse-hubzilla-21769d7390a0bcfb5c74e53c05867ab52a54448b.tar.gz volse-hubzilla-21769d7390a0bcfb5c74e53c05867ab52a54448b.tar.bz2 volse-hubzilla-21769d7390a0bcfb5c74e53c05867ab52a54448b.zip |
improve push_lang and pop_lang to do basically nothing if the new language is the same as existing
-rw-r--r-- | include/pgettext.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/pgettext.php b/include/pgettext.php index 47242f7ba..49f100737 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -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 |