// TODO: softened the check for cutover. Once we determine
// that it is safe, we should complete the transition by
// removing the "edittime" clause.
- $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' ) && is_null( $this->edittime ) );
+ $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' )
+ && is_null( $this->edittime ) );
}
if ( $this->incompleteForm ) {
# If the form is incomplete, force to preview.
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$wgOut->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n$1\n</div>",
array( 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) ) );
- } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) { # Show log extract if the user is currently blocked
+ } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
+ # Show log extract if the user is currently blocked
LogEventsList::showLogExtract(
$wgOut,
'block',
if ( $title instanceof Title && $title->exists() && $title->userCan( 'read' ) ) {
global $wgOut;
// Added using template syntax, to take <noinclude>'s into account.
- $wgOut->addWikiTextTitleTidy( '<div class="mw-editintro">{{:' . $title->getFullText() . '}}</div>', $this->mTitle );
+ $wgOut->addWikiTextTitleTidy(
+ '<div class="mw-editintro">{{:' . $title->getFullText() . '}}</div>',
+ $this->mTitle
+ );
return true;
}
}
$moduleStyles[] = 'user.groups';
// Per-user custom styles
- if ( $this->getConfig()->get( 'AllowUserCss' ) && $this->getTitle()->isCssSubpage() && $this->userCanPreview() ) {
+ if ( $this->getConfig()->get( 'AllowUserCss' ) && $this->getTitle()->isCssSubpage()
+ && $this->userCanPreview()
+ ) {
// We're on a preview of a CSS subpage
// Exclude this page from the user module in case it's in there (bug 26283)
$link = $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_STYLES, false,
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$outputPage->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n\$1\n</div>",
array( 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) ) );
- } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) { # Show log extract if the user is currently blocked
+ } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
+ # Show log extract if the user is currently blocked
LogEventsList::showLogExtract(
$outputPage,
'block',
: 'revision-info';
$outputPage = $this->getContext()->getOutput();
- $outputPage->addSubtitle( "<div id=\"mw-{$infomsg}\">" . wfMessage( $infomsg,
- $td )->rawParams( $userlinks )->params( $revision->getID(), $tddate,
- $tdtime, $revision->getUserText() )->rawParams( Linker::revComment( $revision, true, true ) )->parse() . "</div>" );
+ $outputPage->addSubtitle( "<div id=\"mw-{$infomsg}\">" .
+ wfMessage( $infomsg, $td )
+ ->rawParams( $userlinks )
+ ->params( $revision->getID(), $tddate, $tdtime, $revision->getUserText() )
+ ->rawParams( Linker::revComment( $revision, true, true ) )
+ ->parse() .
+ "</div>"
+ );
$lnk = $current
? wfMessage( 'currentrevisionlink' )->escaped()
if ( $hasHistory ) {
$title = $this->getTitle();
- // The following can use the real revision count as this is only being shown for users that can delete
- // this page.
- // This, as a side-effect, also makes sure that the following query isn't being run for pages with a
- // larger history, unless the user has the 'bigdelete' right (and is about to delete this page).
+ // The following can use the real revision count as this is only being shown for users
+ // that can delete this page.
+ // This, as a side-effect, also makes sure that the following query isn't being run for
+ // pages with a larger history, unless the user has the 'bigdelete' right
+ // (and is about to delete this page).
$dbr = wfGetDB( DB_SLAVE );
$revisions = $edits = (int)$dbr->selectField(
'revision',
);
// @todo FIXME: i18n issue/patchwork message
- $this->getContext()->getOutput()->addHTML( '<strong class="mw-delete-warning-revisions">' .
+ $this->getContext()->getOutput()->addHTML(
+ '<strong class="mw-delete-warning-revisions">' .
wfMessage( 'historywarning' )->numParams( $revisions )->parse() .
wfMessage( 'word-separator' )->plain() . Linker::linkKnown( $title,
wfMessage( 'history' )->escaped(),
return;
}
- $options['limit'] = $request->getInt( 'limit', $this->getConfig()->get( 'QueryPageDefaultLimit' ) );
+ $options['limit'] = $request->getInt( 'limit',
+ $this->getConfig()->get( 'QueryPageDefaultLimit' ) );
$options['target'] = $target;
$userObj = User::newFromName( $target, false );
private function buildRemoveLine( $title ) {
$link = Linker::link( $title );
- $tools['talk'] = Linker::link( $title->getTalkPage(), $this->msg( 'talkpagelinktext' )->escaped() );
+ $tools['talk'] = Linker::link(
+ $title->getTalkPage(),
+ $this->msg( 'talkpagelinktext' )->escaped()
+ );
if ( $title->exists() ) {
$tools['history'] = Linker::linkKnown(
} else {
return false;
}
- } elseif ( $this->getConfig()->get( 'MiserMode' ) && $this->mShowAll /* && mUserName === null */ ) {
+ } elseif ( $this->getConfig()->get( 'MiserMode' )
+ && $this->mShowAll /* && mUserName === null */
+ ) {
// no oi_timestamp index, so only alphabetical sorting in this case.
if ( $field === 'img_name' ) {
return true;
}
function undelete() {
- if ( $this->getConfig()->get( 'UploadMaintenance' ) && $this->mTargetObj->getNamespace() == NS_FILE ) {
+ if ( $this->getConfig()->get( 'UploadMaintenance' )
+ && $this->mTargetObj->getNamespace() == NS_FILE
+ ) {
throw new ErrorPageError( 'undelete-error', 'filedelete-maintenance' );
}
);
}
- protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) {
+ protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options,
+ &$join_conds, $opts
+ ) {
return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
&& wfRunHooks(
'SpecialWatchlistQuery',
$updated = false;
}
- if ( $this->getConfig()->get( 'RCShowWatchingUsers' ) && $user->getOption( 'shownumberswatching' ) ) {
+ if ( $this->getConfig()->get( 'RCShowWatchingUsers' )
+ && $user->getOption( 'shownumberswatching' )
+ ) {
$rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
'COUNT(*)',
array(
$form .= $this->msg( 'nowatchlist' )->parse() . "\n";
} else {
$form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
- if ( $this->getConfig()->get( 'EnotifWatchlist' ) && $user->getOption( 'enotifwatchlistpages' ) ) {
+ if ( $this->getConfig()->get( 'EnotifWatchlist' )
+ && $user->getOption( 'enotifwatchlistpages' )
+ ) {
$form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
}
if ( $showUpdatedMarker ) {
$this->setTitle( NS_USER );
$this->setUserPerm( '' );
- $this->assertEquals( array( array( 'badaccess-group0' ), array( 'namespaceprotected', 'User', 'bogus' ) ),
+ $this->assertEquals( array( array( 'badaccess-group0' ),
+ array( 'namespaceprotected', 'User', 'bogus' ) ),
$this->title->getUserPermissionsErrors( 'bogus', $this->user ) );
$this->setTitle( NS_MEDIAWIKI );
$this->assertEquals( false,
$this->title->userCan( 'bogus', $this->user ) );
- $this->assertEquals( array( array( "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ),
+ $this->assertEquals( array(
+ array( "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ),
array( "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ),
array( "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ) ),
$this->title->getUserPermissionsErrors( 'bogus', $this->user ) );
'value2898',
'value2975'
);
- $this->assertEquals( $eFalsePositives, $falsePositives, "Correct number of false positives found." );
+ $this->assertEquals( $eFalsePositives, $falsePositives,
+ "Correct number of false positives found." );
}
protected function tearDown() {