* @param $file String: file which is included by execute(). It is also constructed from $name by default
* @param $includable Bool: whether the page can be included in normal pages
*/
- public function __construct( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) {
+ public function __construct(
+ $name = '', $restriction = '', $listed = true,
+ $function = false, $file = 'default', $includable = false
+ ) {
$this->init( $name, $restriction, $listed, $function, $file, $includable );
}
$msg = $summaryMessageKey;
}
if ( !wfMessage( $msg )->isBlank() and ! $this->including() ) {
- $this->getOutput()->wrapWikiMsg( "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg );
+ $this->getOutput()->wrapWikiMsg(
+ "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg );
}
}
* @see wfMessage
*/
public function msg( /* $args */ ) {
- return call_user_func_array( 'wfMessage', func_get_args() )->title( $this->getFullTitle() );
+ return call_user_func_array( 'wfMessage',
+ func_get_args() )->title( $this->getFullTitle() );
}
/**
$form = new HTMLForm( $this->fields, $this->getContext() );
$form->setSubmitCallback( array( $this, 'onSubmit' ) );
$form->setWrapperLegend( wfMessage( strtolower( $this->getName() ) . '-legend' ) );
- $form->addHeaderText( wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() );
+ $form->addHeaderText(
+ wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() );
// Retain query parameters (uselang etc)
- $params = array_diff_key( $this->getRequest()->getQueryValues(), array( 'title' => null ) );
+ $params = array_diff_key(
+ $this->getRequest()->getQueryValues(), array( 'title' => null ) );
$form->addHiddenField( 'redirectparams', wfArrayToCGI( $params ) );
$form->addPreText( $this->preText() );
*/
class IncludableSpecialPage extends SpecialPage
{
- function __construct( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) {
+ function __construct(
+ $name, $restriction = '', $listed = true, $function = false, $file = 'default'
+ ) {
parent::__construct( $name, $restriction, $listed, $function, $file, true );
}
}
abstract class SpecialRedirectToSpecial extends RedirectSpecialPage {
-
var $redirName, $redirSubpage;
- function __construct( $name, $redirName, $redirSubpage = false, $allowedRedirectParams = array(), $addedRedirectParams = array() ) {
+ function __construct(
+ $name, $redirName, $redirSubpage = false,
+ $allowedRedirectParams = array(), $addedRedirectParams = array()
+ ) {
parent::__construct( $name );
$this->redirName = $redirName;
$this->redirSubpage = $redirSubpage;
}
function getRedirect( $subpage ) {
- global $wgUser;
if ( strval( $subpage ) !== '' ) {
- return Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $subpage );
+ return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage );
} else {
- return Title::makeTitle( NS_USER, $wgUser->getName() );
+ return Title::makeTitle( NS_USER, $this->getUser()->getName() );
}
}
}
}
function getRedirect( $subpage ) {
- global $wgUser;
if ( strval( $subpage ) !== '' ) {
- return Title::makeTitle( NS_USER_TALK, $wgUser->getName() . '/' . $subpage );
+ return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage );
} else {
- return Title::makeTitle( NS_USER_TALK, $wgUser->getName() );
+ return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() );
}
}
}
}
function getRedirect( $subpage ) {
- global $wgUser;
- return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() );
+ return SpecialPage::getTitleFor( 'Contributions', $this->getUser()->getName() );
}
}
}
function getRedirect( $subpage ) {
- global $wgUser;
- return SpecialPage::getTitleFor( 'Listfiles', $wgUser->getName() );
+ return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() );
}
}