Use user from parser instead of global variable.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:37 +0000 (21:39 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:37 +0000 (21:39 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2781 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport_body.php

index 04d32e155f46a454906dec9a6ddcde2a68f475c6..deb2b61350ec230d7dc092c9515d2b5eb1faa0ec 100644 (file)
@@ -652,7 +652,7 @@ class WrReport {
        /// The current page name is taken.
        public static function bahnberichtformularParserHook($input, $args, $parser) {
                // Username
        /// The current page name is taken.
        public static function bahnberichtformularParserHook($input, $args, $parser) {
                // Username
-               global $wgUser;
+               $wgUser = $parser->getUser();
                $author_name = NULL;
                if ($wgUser->isLoggedIn()) {
                        $author_name = $wgUser->getRealName();
                $author_name = NULL;
                if ($wgUser->isLoggedIn()) {
                        $author_name = $wgUser->getRealName();