Index: trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.php |
— | — | @@ -17,9 +17,10 @@ |
18 | 18 | } |
19 | 19 | |
20 | 20 | $wgExtensionCredits[ 'specialpage' ][ ] = array( |
| 21 | + 'path' => __FILE__, |
21 | 22 | 'name' => 'FundraiserLandingPage', |
22 | 23 | 'author' => 'Peter Gehres', |
23 | | - 'url' => '', |
| 24 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:FundraiserLandingPage', |
24 | 25 | 'description' => '', |
25 | 26 | 'descriptionmsg' => '', |
26 | 27 | 'version' => '1.0.0', |
Index: trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.body.php |
— | — | @@ -12,30 +12,31 @@ |
13 | 13 | } |
14 | 14 | |
15 | 15 | function execute( $par ) { |
16 | | - global $wgRequest, $wgOut, $wgFundraiserLPDefaults; |
| 16 | + global $wgFundraiserLPDefaults; |
17 | 17 | |
| 18 | + $request = $this->getRequest(); |
18 | 19 | $this->setHeaders(); |
19 | 20 | |
20 | 21 | # load the querystring variables |
21 | | - $values = $wgRequest->getValues(); |
| 22 | + $values = $request->getValues(); |
22 | 23 | |
23 | 24 | # clear output variable to be safe |
24 | | - $output = ""; |
| 25 | + $output = ''; |
25 | 26 | |
26 | 27 | # get the required variables to use for the landing page |
27 | 28 | # (escaping with both htmlspecialchars and wfEscapeWikiText since the |
28 | 29 | # parameters are intending to reference templates) |
29 | | - $template = wfEscapeWikiText( htmlspecialchars( $wgRequest->getText( 'template', $wgFundraiserLPDefaults[ 'template' ] ) ) ); |
30 | | - $appeal = wfEscapeWikiText( htmlspecialchars( $wgRequest->getText( 'appeal', $wgFundraiserLPDefaults[ 'appeal' ] ) ) ); |
31 | | - $form = wfEscapeWikiText( htmlspecialchars( $wgRequest->getText( 'form', $wgFundraiserLPDefaults[ 'form' ] ) ) ); |
| 30 | + $template = wfEscapeWikiText( htmlspecialchars( $request->getText( 'template', $wgFundraiserLPDefaults[ 'template' ] ) ) ); |
| 31 | + $appeal = wfEscapeWikiText( htmlspecialchars( $request->getText( 'appeal', $wgFundraiserLPDefaults[ 'appeal' ] ) ) ); |
| 32 | + $form = wfEscapeWikiText( htmlspecialchars( $request->getText( 'form', $wgFundraiserLPDefaults[ 'form' ] ) ) ); |
32 | 33 | |
33 | 34 | # begin generating the template call |
34 | 35 | $output .= "{{ $template\n| appeal = $appeal\n| form = $form\n"; |
35 | 36 | |
36 | 37 | # add any parameters passed in the querystring |
37 | | - foreach ( $values as $k=>$v){ |
| 38 | + foreach ( $values as $k=>$v ) { |
38 | 39 | # skip the required variables |
39 | | - if ( $k == "template" || $k == "appeal" || $k == "form" ){ |
| 40 | + if ( $k == "template" || $k == "appeal" || $k == "form" ) { |
40 | 41 | continue; |
41 | 42 | } |
42 | 43 | # get the variables name and value |
— | — | @@ -48,6 +49,6 @@ |
49 | 50 | $output .= "}}"; |
50 | 51 | |
51 | 52 | # print the output to the page |
52 | | - $wgOut->addWikiText( $output ); |
| 53 | + $this->getOutput()->addWikiText( $output ); |
53 | 54 | } |
54 | 55 | } |
\ No newline at end of file |