Skip to content

Commit c10b83c

Browse files
committed
PLATFORM-6983 Fix PvXConvert
1 parent 71c3c9b commit c10b83c

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

specials/SpecialPvXConvert.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,27 @@ class SpecialPvXConvert extends SpecialPage {
2222
*/
2323
public function __construct() {
2424
parent::__construct( 'PvXConvert' );
25-
26-
$this->wgRequest = $this->getRequest();
27-
$this->wgUser = $this->getUser();
28-
$this->output = $this->getOutput();
29-
30-
$this->DB = wfGetDB( DB_PRIMARY );
3125
}
3226

3327
/**
3428
* Main Execute for the Special Page
3529
*
3630
* @param $par - Not used, but expected to be there by mediawiki.
3731
* @return void - echos to page.
32+
* @throws MWException
3833
*/
3934
public function execute( $par = null ) {
40-
$name = $this->wgRequest->getText( 'wpName' );
41-
$build = $this->wgRequest->getText( 'wpBuild' );
35+
$request = $this->getRequest();
36+
$output = $this->getOutput();
37+
$name = $request->getText( 'wpName' );
38+
$build = $request->getText( 'wpBuild' );
4239

4340
if ( $build ) {
4441
$rout = $this->formatBuild( $build, $name );
45-
$this->output->addWikiText( "== Preview ==" );
46-
$this->output->addWikiText( $rout );
47-
$this->output->addHtml( "<br>" );
48-
$this->output->addWikiText( "== PvXcode ==" );
42+
$output->addWikiTextAsContent( "== Preview ==" );
43+
$output->addWikiTextAsContent( $rout );
44+
$output->addHtml( "<br>" );
45+
$output->addWikiTextAsContent( "== PvXcode ==" );
4946
$out = "<p><textarea cols='80' rows='10' wrap='virtual'>" . $rout . "</textarea></p>";
5047
} else {
5148
$out = '<p>
@@ -56,8 +53,8 @@ public function execute( $par = null ) {
5653
&nbsp;&nbsp;|&nbsp;Wilderness&nbsp;Survival&nbsp;|&nbsp;12&nbsp;+&nbsp;1&nbsp;+&nbsp;3<br>
5754
&nbsp;&nbsp;|&nbsp;Expertise&nbsp;|&nbsp;12&nbsp;+&nbsp;1<br>
5855
}}<br>
59-
{{skill bar|Echo|Dust Trap|Barbed Trap|Flame Trap|Trappers Speed|
60-
Troll Unguent|Whirling Defense|Resurrection Signet}}</code>
56+
{{skill bar|Echo|Dust Trap|Barbed Trap|Flame Trap|Trappers Speed|Troll
57+
Unguent|Whirling Defense|Resurrection Signet}}</code>
6158
<p>Enter old style GuildWiki &quot;Attributes and Skills&quot; template:</p>
6259
<form action="' . $_SERVER["PHP_SELF"] . '" method="get">
6360
<input name="title" type="hidden" value="Special:PvXconvert" />
@@ -69,7 +66,7 @@ public function execute( $par = null ) {
6966
}
7067
$this->setHeaders();
7168

72-
$this->output->addHtml( $out );
69+
$output->addHtml( $out );
7370
}
7471

7572
/**

0 commit comments

Comments
 (0)