]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5976 from MrPetovan/bug/5975-add-missing-l10n-poplang
authorMichael Vogel <icarus@dabo.de>
Sun, 21 Oct 2018 07:40:49 +0000 (09:40 +0200)
committerGitHub <noreply@github.com>
Sun, 21 Oct 2018 07:40:49 +0000 (09:40 +0200)
Add missing L10n::popLang calls

include/enotify.php
src/Database/DBStructure.php

index 6d8cef87947194eea4f23aeb15e68be772cf0d99..5665f485f457f7754fee59570f82a689abac87d1 100644 (file)
@@ -134,6 +134,7 @@ function notification($params)
                $thread = Item::selectFirstThreadForUser($params['uid'] ,['ignored'], ['iid' => $parent_id]);
                if (DBA::isResult($thread) && $thread["ignored"]) {
                        logger("Thread ".$parent_id." will be ignored", LOGGER_DEBUG);
+                       L10n::popLang();
                        return;
                }
 
@@ -628,6 +629,7 @@ function notification($params)
                        '$content_allowed'      => $content_allowed,
                ]);
 
+               L10n::popLang();
                // use the Emailer class to send the message
                return Emailer::send(
                        [
@@ -643,6 +645,7 @@ function notification($params)
                );
        }
 
+       L10n::popLang();
        return false;
 }
 
index f8fc1651c140ece8dffd8385f65097bdf1561638..50566dc877c00bdd35d8f28859107321f44ba3c1 100644 (file)
@@ -77,10 +77,9 @@ class DBStructure
                                The friendica developers released update %s recently,
                                but when I tried to install it, something went terribly wrong.
                                This needs to be fixed soon and I can't do it alone. Please contact a
-                               friendica developer if you can not help me on your own. My database might be invalid."));
-                       $body = L10n::t("The error message is\n[pre]%s[/pre]");
-                       $preamble = sprintf($preamble, $update_id);
-                       $body = sprintf($body, $error_message);
+                               friendica developer if you can not help me on your own. My database might be invalid.",
+                               $update_id));
+                       $body = L10n::t("The error message is\n[pre]%s[/pre]", $error_message);
 
                        notification([
                                'uid'      => $admin['uid'],
@@ -90,6 +89,7 @@ class DBStructure
                                'body'     => $body,
                                'language' => $lang]
                        );
+                       L10n::popLang();
                }
 
                //try the logger