Initialize $wgParser to avoid error messages.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:39 +0000 (21:39 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 20 Nov 2018 21:39:39 +0000 (21:39 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrreport/trunk@2783 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrreport_body.php

index 4b645c97dd195a44ff2e41c646a702f2fbf0288b..9e853003d07a55e574ad51695fa24a12ede792e1 100644 (file)
@@ -1150,6 +1150,7 @@ class SpecialWrReport extends SpecialPage {
                $output = $this->getOutput();
        
                global $wgParser;
                $output = $this->getOutput();
        
                global $wgParser;
+               $output->addWikiText(''); // this is necessary because otherwise $wgParser is not properly initialized
 
                $output->addModules('ext.wrreport');
                $this->setHeaders();
 
                $output->addModules('ext.wrreport');
                $this->setHeaders();
@@ -1179,7 +1180,6 @@ class SpecialWrReport extends SpecialPage {
                        $rows = wrReportGetReports($conditions);
                        if (count($rows) == 0) $output->addHTML(wfMessage('wrreport-reports-none')->text());
                        else {
                        $rows = wrReportGetReports($conditions);
                        if (count($rows) == 0) $output->addHTML(wfMessage('wrreport-reports-none')->text());
                        else {
-                               $output->addWikiText(''); // this is necessary because otherwise $wgParser is not properly initialized but $wgParser is needed in the next line
                                $output->addHTML(wrReportTableRender($rows, WRREPORT_DETAIL, wrReportUserMayDelete(), $wgParser));
                        }
                }
                                $output->addHTML(wrReportTableRender($rows, WRREPORT_DETAIL, wrReportUserMayDelete(), $wgParser));
                        }
                }