Replace OutputPage::addWikiText() with OutputPage::addWikiTextAsInterface().
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Jun 2021 21:03:28 +0000 (23:03 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Jun 2021 21:03:28 +0000 (23:03 +0200)
wrreport_body.php

index 0b3f2f958ad6b0b9a818b45a19a266a1647c785f..fbc9ed3d9fcfe0ef23b59134a1cf2d3fc425610c 100644 (file)
@@ -1201,7 +1201,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->addWikiTextAsInterface(''); // this is necessary because otherwise $wgParser is not properly initialized
 
                $output->addModules('ext.wrreport');
                $this->setHeaders();
 
                $output->addModules('ext.wrreport');
                $this->setHeaders();
@@ -1219,7 +1219,7 @@ class SpecialWrReport extends SpecialPage {
 
                // Show error message
                if ($errorMsg || $action == 'showerror') {
 
                // Show error message
                if ($errorMsg || $action == 'showerror') {
-                       $output->addWikiText('<div class="errorbox">' . $errorMsg . "</div>\n");
+                       $output->addWikiTextAsInterface('<div class="errorbox">' . $errorMsg . "</div>\n");
                        if ($action == 'showerror') return;
                }
 
                        if ($action == 'showerror') return;
                }
 
@@ -1297,7 +1297,7 @@ class SpecialWrReport extends SpecialPage {
                                wrRecacheRegions();
 
                                // Show success message
                                wrRecacheRegions();
 
                                // Show success message
-                               $output->addWikiText(wfMessage('wrreport-deletereport-success', '[[' . $row['page_title'] . '#' . wfMessage('wrreport-reports-sectionname')->text() . '|' . $row['page_title'] . ']]')->text());
+                               $output->addWikiTextAsInterface(wfMessage('wrreport-deletereport-success', '[[' . $row['page_title'] . '#' . wfMessage('wrreport-reports-sectionname')->text() . '|' . $row['page_title'] . ']]')->text());
                        }
                        if ($action == 'deletepreview') {
                                $output->addWikiMsg('wrreport-deletereport-preview-before');
                        }
                        if ($action == 'deletepreview') {
                                $output->addWikiMsg('wrreport-deletereport-preview-before');
@@ -1437,7 +1437,7 @@ class SpecialWrReport extends SpecialPage {
                                wrUpdateWrReportCacheTable($page_id);
 
                                // Show success message
                                wrUpdateWrReportCacheTable($page_id);
 
                                // Show success message
-                               $output->addWikiText(wfMessage('wrreport-newreport-success', '[[' . $page_title . '#' . wfMessage('wrreport-reports-sectionname')->text() . '|' . $page_title . ']]')->text());
+                               $output->addWikiTextAsInterface(wfMessage('wrreport-newreport-success', '[[' . $page_title . '#' . wfMessage('wrreport-reports-sectionname')->text() . '|' . $page_title . ']]')->text());
                                // We could redirect to result with the following line but we don't want to.
                                // $output->redirect($title->getFullURL() . '#' . wfMessage('wrreport-reports-sectionname')->text());
                        }
                                // We could redirect to result with the following line but we don't want to.
                                // $output->redirect($title->getFullURL() . '#' . wfMessage('wrreport-reports-sectionname')->text());
                        }