@@ -22,30 +22,27 @@ class SpecialPvXConvert extends SpecialPage {
22
22
*/
23
23
public function __construct () {
24
24
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 );
31
25
}
32
26
33
27
/**
34
28
* Main Execute for the Special Page
35
29
*
36
30
* @param $par - Not used, but expected to be there by mediawiki.
37
31
* @return void - echos to page.
32
+ * @throws MWException
38
33
*/
39
34
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 ' );
42
39
43
40
if ( $ build ) {
44
41
$ 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 == " );
49
46
$ out = "<p><textarea cols='80' rows='10' wrap='virtual'> " . $ rout . "</textarea></p> " ;
50
47
} else {
51
48
$ out = '<p>
@@ -56,8 +53,8 @@ public function execute( $par = null ) {
56
53
| Wilderness Survival | 12 + 1 + 3<br>
57
54
| Expertise | 12 + 1<br>
58
55
}}<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>
61
58
<p>Enter old style GuildWiki "Attributes and Skills" template:</p>
62
59
<form action=" ' . $ _SERVER ["PHP_SELF " ] . '" method="get">
63
60
<input name="title" type="hidden" value="Special:PvXconvert" />
@@ -69,7 +66,7 @@ public function execute( $par = null ) {
69
66
}
70
67
$ this ->setHeaders ();
71
68
72
- $ this -> output ->addHtml ( $ out );
69
+ $ output ->addHtml ( $ out );
73
70
}
74
71
75
72
/**
0 commit comments