if ( !strlen( $target ) ) {
$out->addHTML( $this->getForm() );
+
return;
}
$nt = Title::makeTitleSafe( NS_USER, $target );
if ( !$nt ) {
$out->addHTML( $this->getForm() );
+
return;
}
$userObj = User::newFromName( $nt->getText(), false );
if ( !$userObj ) {
$out->addHTML( $this->getForm() );
+
return;
}
$id = $userObj->getID();
$url = wfAppendQuery( wfScript( 'api' ), $apiParams );
$out->redirect( $url, '301' );
+
return;
}
$oldMsg = $this->msg( 'contribsub' );
if ( $oldMsg->exists() ) {
$linksWithParentheses = $this->msg( 'parentheses' )->rawParams( $links )->escaped();
+
return $oldMsg->rawParams( "$user $linksWithParentheses" );
}
);
}
}
+
# Block log link
$tools[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Log', 'block' ),
}
wfRunHooks( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
+
return $tools;
}
}
if ( !isset( $this->opts['year'] ) ) {
- $this->opts['year'] = '';
+ $this->opts['year'] = gmdate( 'Y' );
}
if ( !isset( $this->opts['month'] ) ) {
'class' => 'namespaceselector',
)
) . ' ' .
- Html::rawElement(
- 'span',
- array( 'style' => 'white-space: nowrap' ),
- Xml::checkLabel(
- $this->msg( 'invert' )->text(),
- 'nsInvert',
- 'nsInvert',
- $this->opts['nsInvert'],
- array(
- 'title' => $this->msg( 'tooltip-invert' )->text(),
- 'class' => 'mw-input'
- )
- ) . ' '
- ) .
- Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
- Xml::checkLabel(
- $this->msg( 'namespace_association' )->text(),
- 'associated',
- 'associated',
- $this->opts['associated'],
- array(
- 'title' => $this->msg( 'tooltip-namespace_association' )->text(),
- 'class' => 'mw-input'
- )
- ) . ' '
- )
+ Html::rawElement(
+ 'span',
+ array( 'style' => 'white-space: nowrap' ),
+ Xml::checkLabel(
+ $this->msg( 'invert' )->text(),
+ 'nsInvert',
+ 'nsInvert',
+ $this->opts['nsInvert'],
+ array(
+ 'title' => $this->msg( 'tooltip-invert' )->text(),
+ 'class' => 'mw-input'
+ )
+ ) . ' '
+ ) .
+ Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
+ Xml::checkLabel(
+ $this->msg( 'namespace_association' )->text(),
+ 'associated',
+ 'associated',
+ $this->opts['associated'],
+ array(
+ 'title' => $this->msg( 'tooltip-namespace_association' )->text(),
+ 'class' => 'mw-input'
+ )
+ ) . ' '
+ )
);
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
function getDefaultQuery() {
$query = parent::getDefaultQuery();
$query['target'] = $this->target;
+
return $query;
}
);
wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
+
return $queryInfo;
}
}
wfProfileOut( __METHOD__ );
+
return $ret;
}