$this->setHeaders();
$this->outputHeader();
+ $wgOut->addModuleStyles( 'mediawiki.special' );
$this->opts = array();
$this->opts['contribs'] = 'newbie';
}
- $this->opts['deletedOnly'] = $wgRequest->getCheck( 'deletedOnly' );
+ $this->opts['deletedOnly'] = $wgRequest->getBool( 'deletedOnly' );
if( !strlen( $target ) ) {
$wgOut->addHTML( $this->getForm() );
$this->opts['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
$this->opts['target'] = $target;
- $this->opts['topOnly'] = $wgRequest->getCheck( 'topOnly' );
+ $this->opts['topOnly'] = $wgRequest->getBool( 'topOnly' );
$nt = Title::makeTitleSafe( NS_USER, $target );
if( !$nt ) {
// languages that want to put the "for" bit right after $user but before
// $links. If 'contribsub' is around, use it for reverse compatibility,
// otherwise use 'contribsub2'.
- if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
+ if( wfEmptyMsg( 'contribsub' ) ) {
return wfMsgHtml( 'contribsub2', $user, $links );
} else {
return wfMsgHtml( 'contribsub', "$user ($links)" );
* @param $subject User: The viewing user ($wgUser is still checked in some cases, like userrights page!!)
*/
public static function getUserLinks( Title $userpage, Title $talkpage, User $target, User $subject ) {
- global $wgSysopUserBans;
$sk = $subject->getSkin();
$id = $target->getId();
$tools[] = $sk->link( $talkpage, wfMsgHtml( 'sp-contributions-talk' ) );
- if( ( $id !== null && $wgSysopUserBans ) || ( $id === null && IP::isIPAddress( $username ) ) ) {
+ if( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) {
if( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
if ( $target->isBlocked() ) {
$tools[] = $sk->linkKnown( # Change block link
- SpecialPage::getTitleFor( 'Blockip', $username ),
+ SpecialPage::getTitleFor( 'Block', $username ),
wfMsgHtml( 'change-blocklink' )
);
$tools[] = $sk->linkKnown( # Unblock link
- SpecialPage::getTitleFor( 'Ipblocklist' ),
- wfMsgHtml( 'unblocklink' ),
- array(),
- array(
- 'action' => 'unblock',
- 'ip' => $username
- )
+ SpecialPage::getTitleFor( 'Unblock', $username ),
+ wfMsgHtml( 'unblocklink' )
);
} else { # User is not blocked
$tools[] = $sk->linkKnown( # Block link
- SpecialPage::getTitleFor( 'Blockip', $username ),
+ SpecialPage::getTitleFor( 'Block', $username ),
wfMsgHtml( 'blocklink' )
);
}
array(),
array( 'user' => $username )
);
-
+
# Other logs link
$tools[] = $sk->linkKnown(
SpecialPage::getTitleFor( 'Log' ),
Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' .
Xml::submitButton( wfMsg( 'sp-contributions-submit' ) )
- ) . ' ';
+ ) . ' ';
$explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
- if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
+ if( !wfEmptyMsg( 'sp-contributions-explain' ) ) {
$f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
}
$f .= Xml::closeElement('fieldset' ) .
}
}
+ /**
+ * @param $revision Revision
+ * @return string
+ */
protected function feedItemAuthor( $revision ) {
return $revision->getUserText();
}
+ /**
+ * @param $revision Revision
+ * @return string
+ */
protected function feedItemDesc( $revision ) {
if( $revision ) {
return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .