http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99807
Revision: 99807
Author: johnduhart
Date: 2011-10-14 21:18:17 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
Use the context, Luke
Also some spacing and extension credit tweaks
Modified Paths:
--------------
trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.body.php
trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.php
Modified: trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.body.php
===================================================================
--- trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.body.php
2011-10-14 21:17:49 UTC (rev 99806)
+++ trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.body.php
2011-10-14 21:18:17 UTC (rev 99807)
@@ -12,30 +12,31 @@
}
function execute( $par ) {
- global $wgRequest, $wgOut, $wgFundraiserLPDefaults;
+ global $wgFundraiserLPDefaults;
+ $request = $this->getRequest();
$this->setHeaders();
# load the querystring variables
- $values = $wgRequest->getValues();
+ $values = $request->getValues();
# clear output variable to be safe
- $output = "";
+ $output = '';
# get the required variables to use for the landing page
# (escaping with both htmlspecialchars and wfEscapeWikiText
since the
# parameters are intending to reference templates)
- $template = wfEscapeWikiText( htmlspecialchars(
$wgRequest->getText( 'template', $wgFundraiserLPDefaults[ 'template' ] ) ) );
- $appeal = wfEscapeWikiText( htmlspecialchars(
$wgRequest->getText( 'appeal', $wgFundraiserLPDefaults[ 'appeal' ] ) ) );
- $form = wfEscapeWikiText( htmlspecialchars(
$wgRequest->getText( 'form', $wgFundraiserLPDefaults[ 'form' ] ) ) );
+ $template = wfEscapeWikiText( htmlspecialchars(
$request->getText( 'template', $wgFundraiserLPDefaults[ 'template' ] ) ) );
+ $appeal = wfEscapeWikiText( htmlspecialchars(
$request->getText( 'appeal', $wgFundraiserLPDefaults[ 'appeal' ] ) ) );
+ $form = wfEscapeWikiText( htmlspecialchars( $request->getText(
'form', $wgFundraiserLPDefaults[ 'form' ] ) ) );
# begin generating the template call
$output .= "{{ $template\n| appeal = $appeal\n| form = $form\n";
# add any parameters passed in the querystring
- foreach ( $values as $k=>$v){
+ foreach ( $values as $k=>$v ) {
# skip the required variables
- if ( $k == "template" || $k == "appeal" || $k == "form"
){
+ if ( $k == "template" || $k == "appeal" || $k == "form"
) {
continue;
}
# get the variables name and value
@@ -48,6 +49,6 @@
$output .= "}}";
# print the output to the page
- $wgOut->addWikiText( $output );
+ $this->getOutput()->addWikiText( $output );
}
}
\ No newline at end of file
Modified: trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.php
===================================================================
--- trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.php
2011-10-14 21:17:49 UTC (rev 99806)
+++ trunk/extensions/FundraiserLandingPage/FundraiserLandingPage.php
2011-10-14 21:18:17 UTC (rev 99807)
@@ -17,9 +17,10 @@
}
$wgExtensionCredits[ 'specialpage' ][ ] = array(
+ 'path' => __FILE__,
'name' => 'FundraiserLandingPage',
'author' => 'Peter Gehres',
- 'url' => '',
+ 'url' =>
'http://www.mediawiki.org/wiki/Extension:FundraiserLandingPage',
'description' => '',
'descriptionmsg' => '',
'version' => '1.0.0',
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs