w/s diff. mostly eol w/s and using only tabs of width 4 to indent.
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 961f163..4823af6 100644 (file)
@@ -40,6 +40,7 @@ class SpecialContributions extends SpecialPage {
 
                $this->setHeaders();
                $this->outputHeader();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                $this->opts = array();
 
@@ -225,7 +226,7 @@ class SpecialContributions extends SpecialPage {
                // 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)" );
@@ -240,7 +241,6 @@ class SpecialContributions extends SpecialPage {
         * @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();
@@ -248,25 +248,20 @@ class SpecialContributions extends SpecialPage {
 
                $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' )
                                        );
                                }
@@ -289,7 +284,7 @@ class SpecialContributions extends SpecialPage {
                        array(),
                        array( 'user' => $username )
                );
-               
+
                # Other logs link
                $tools[] = $sk->linkKnown(
                        SpecialPage::getTitleFor( 'Log' ),
@@ -395,9 +390,9 @@ class SpecialContributions extends SpecialPage {
                        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' ) .