* @ingroup SpecialPage
*/
class ActiveUsersPager extends UsersPager {
-
/**
* @var FormOptions
*/
$self = $this->getTitle();
$limit = $this->mLimit ? Html::hidden( 'limit', $this->mLimit ) : '';
- $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); # Form tag
+ # Form tag
+ $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
$out .= Xml::fieldset( $this->msg( 'activeusers' )->text() ) . "\n";
$out .= Html::hidden( 'title', $self->getPrefixedDBkey() ) . $limit . "\n";
+ # Username field
$out .= Xml::inputLabel( $this->msg( 'activeusers-from' )->text(),
- 'username', 'offset', 20, $this->requestedUser, array( 'tabindex' => 1 ) ) . '<br />';# Username field
+ 'username', 'offset', 20, $this->requestedUser, array( 'tabindex' => 1 ) ) . '<br />';
$out .= Xml::checkLabel( $this->msg( 'activeusers-hidebots' )->text(),
'hidebots', 'hidebots', $this->opts->getValue( 'hidebots' ), array( 'tabindex' => 2 ) );
- $out .= Xml::checkLabel( $this->msg( 'activeusers-hidesysops' )->text(),
- 'hidesysops', 'hidesysops', $this->opts->getValue( 'hidesysops' ), array( 'tabindex' => 3 ) ) . '<br />';
-
- $out .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text(), array( 'tabindex' => 4 ) ) . "\n";# Submit button and form bottom
+ $out .= Xml::checkLabel(
+ $this->msg( 'activeusers-hidesysops' )->text(),
+ 'hidesysops',
+ 'hidesysops',
+ $this->opts->getValue( 'hidesysops' ),
+ array( 'tabindex' => 3 )
+ ) . '<br />';
+
+ # Submit button and form bottom
+ $out .= Xml::submitButton(
+ $this->msg( 'allpagessubmit' )->text(),
+ array( 'tabindex' => 4 )
+ ) . "\n";
$out .= Xml::closeElement( 'fieldset' );
$out .= Xml::closeElement( 'form' );
$this->getSkin()->setRelevantUser( $this->target );
}
- list( $this->previousTarget, /*...*/ ) = Block::parseTarget( $request->getVal( 'wpPreviousTarget' ) );
+ list( $this->previousTarget, /*...*/ ) =
+ Block::parseTarget( $request->getVal( 'wpPreviousTarget' ) );
$this->requestedHideUser = $request->getBool( 'wpHideUser' );
}
# Link to unblock the specified user, or to a blank unblock form
if ( $this->target instanceof User ) {
- $message = $this->msg( 'ipb-unblock-addr', wfEscapeWikiText( $this->target->getName() ) )->parse();
+ $message = $this->msg(
+ 'ipb-unblock-addr',
+ wfEscapeWikiText( $this->target->getName() )
+ )->parse();
$list = SpecialPage::getTitleFor( 'Unblock', $this->target->getName() );
} else {
$message = $this->msg( 'ipb-unblock' )->parse();
/**
* Determine the target of the block, and the type of target
- * TODO: should be in Block.php?
+ * @todo Should be in Block.php?
* @param string $par subpage parameter passed to setup, or data value from
* the HTMLForm
* @param WebRequest $request Optionally try and get data from a request too
# Can't watch a rangeblock
if ( $type != Block::TYPE_RANGE && $data['Watch'] ) {
- WatchAction::doWatch( Title::makeTitle( NS_USER, $target ), $performer, WatchedItem::IGNORE_USER_RIGHTS );
+ WatchAction::doWatch(
+ Title::makeTitle( NS_USER, $target ),
+ $performer,
+ WatchedItem::IGNORE_USER_RIGHTS
+ );
}
# Block constructor sanitizes certain block options on insert
* @ingroup SpecialPage
*/
class SpecialBlockList extends SpecialPage {
+ protected $target;
- protected $target, $options;
+ protected $options;
function __construct() {
parent::__construct( 'BlockList' );
foreach ( $otherBlockLink as $link ) {
$list .= Html::rawElement( 'li', array(), $link ) . "\n";
}
- $out->addHTML( Html::rawElement( 'ul', array( 'class' => 'mw-ipblocklist-otherblocks' ), $list ) . "\n" );
+ $out->addHTML( Html::rawElement(
+ 'ul',
+ array( 'class' => 'mw-ipblocklist-otherblocks' ),
+ $list
+ ) . "\n" );
}
}
}
// Let folks pick an explicit limit not from our list, as long as it's a real numbr.
- if ( !in_array( $value, $this->mParams['options'] ) && $value == intval( $value ) && $value > 0 ) {
+ if ( !in_array( $value, $this->mParams['options'] )
+ && $value == intval( $value )
+ && $value > 0
+ ) {
// This adds the explicitly requested limit value to the drop-down,
// then makes sure it's sorted correctly so when we output the list
// later, the custom option doesn't just show up last.
- $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] = intval( $value );
+ $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] =
+ intval( $value );
asort( $this->mParams['options'] );
}
* @ingroup SpecialPage
*/
class SpecialBookSources extends SpecialPage {
-
/**
* ISBN passed to the page, if any
*/
$this->getOutput()->addHTML( $this->makeForm() );
if ( strlen( $this->isbn ) > 0 ) {
if ( !self::isValidISBN( $this->isbn ) ) {
- $this->getOutput()->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>", 'booksources-invalid-isbn' );
+ $this->getOutput()->wrapWikiMsg(
+ "<div class=\"error\">\n$1\n</div>",
+ 'booksources-invalid-isbn'
+ );
}
$this->showList();
}
global $wgScript;
$form = Html::openElement( 'fieldset' ) . "\n";
- $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
+ $form .= Html::element(
+ 'legend',
+ array(),
+ $this->msg( 'booksources-search-legend' )->text()
+ ) . "\n";
$form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
$form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n";
- $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
+ $form .= '<p>' . Xml::inputLabel(
+ $this->msg( 'booksources-isbn' )->text(),
+ 'isbn',
+ 'isbn',
+ 20,
+ $this->isbn,
+ array( 'autofocus' => true )
+ );
$form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
$form .= Html::closeElement( 'form' ) . "\n";
$form .= Html::closeElement( 'fieldset' ) . "\n";
* @ingroup SpecialPage
*/
class BrokenRedirectsPage extends QueryPage {
-
function __construct( $name = 'BrokenRedirects' ) {
parent::__construct( $name );
}
);
}
- $out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()->pipeList( $links ) )->escaped();
+ $out .= $this->msg( 'parentheses' )->rawParams( $this->getLanguage()
+ ->pipeList( $links ) )->escaped();
$out .= " {$arr} {$to}";
return $out;
* @since 1.20
*/
abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper {
-
/**
* CacheHelper object to which we forward the non-SpecialPage specific caching work.
* Initialized in startCache.
* @param string|null $key
*/
public function addCachedHTML( $computeFunction, $args = array(), $key = null ) {
- $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ) );
+ $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue(
+ $computeFunction,
+ $args,
+ $key
+ ) );
}
/**
}
/**
- * Sets the time to live for the cache, in seconds or a unix timestamp indicating the point of expiry.
+ * Sets the time to live for the cache, in seconds or a unix timestamp
+ * indicating the point of expiry.
*
* @since 1.20
*
* @ingroup SpecialPage
*/
class SpecialChangeEmail extends UnlistedSpecialPage {
-
/**
* Users password
* @var string
$throttleCount = LoginForm::incLoginThrottle( $user->getName() );
if ( $throttleCount === true ) {
$lang = $this->getLanguage();
- $this->error( array( 'changeemail-throttled', $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] ) ) );
+ $this->error( array(
+ 'changeemail-throttled',
+ $lang->formatDuration( $wgPasswordAttemptThrottle['seconds'] )
+ ) );
return false;
}
global $wgRequirePasswordforEmailChange;
- if ( $wgRequirePasswordforEmailChange && !$user->checkTemporaryPassword( $pass ) && !$user->checkPassword( $pass ) ) {
+ if ( $wgRequirePasswordforEmailChange
+ && !$user->checkTemporaryPassword( $pass )
+ && !$user->checkPassword( $pass )
+ ) {
$this->error( 'wrongpassword' );
return false;
* @ingroup SpecialPage
*/
class SpecialChangePassword extends FormSpecialPage {
-
- protected $mUserName, $mDomain;
+ protected $mUserName;
+ protected $mDomain;
// Optional Wikitext Message to show above the password change form
protected $mPreTextMessage = null;
return false;
}
-
if ( $request->getCheck( 'wpCancel' ) ) {
$titleObj = Title::newFromText( $request->getVal( 'returnto' ) );
if ( !$titleObj instanceof Title ) {
# Show user names for /newbies as there may be different users.
# Note that we already excluded rows with hidden user names.
if ( $this->contribs == 'newbie' ) {
- $userlink = ' . . ' . $lang->getDirMark() . Linker::userLink( $rev->getUser(), $rev->getUserText() );
+ $userlink = ' . . ' . $lang->getDirMark()
+ . Linker::userLink( $rev->getUser(), $rev->getUserText() );
$userlink .= ' ' . $this->msg( 'parentheses' )->rawParams(
Linker::userTalkLink( $rev->getUser(), $rev->getUserText() ) )->escaped() . ' ';
} else {
*/
class SpecialCreateAccount extends SpecialRedirectToSpecial {
function __construct() {
- parent::__construct( 'CreateAccount', 'Userlogin', 'signup', array( 'returnto', 'returntoquery', 'uselang' ) );
+ parent::__construct(
+ 'CreateAccount',
+ 'Userlogin',
+ 'signup',
+ array( 'returnto', 'returntoquery', 'uselang' )
+ );
}
// No reason to hide this link on Special:Specialpages