USE INDEX -> DB::useIndexClause()
[lhc/web/wiklou.git] / includes / ChangesList.php
index b739835..887e6e1 100644 (file)
@@ -1,14 +1,23 @@
 <?php
+/**
+ * @package MediaWiki
+ */
 
+/**
+ * @package MediaWiki
+ */
 class ChangesList {
        # Called by history lists and recent changes
        #
 
+       /** @todo document */
        function ChangesList( &$skin ) {
                $this->skin =& $skin;
        }
        
-       # Returns text for the start of the tabular part of RC
+       /** 
+        * Returns text for the start of the tabular part of RC
+        */
        function beginRecentChangesList() {
                $this->rc_cache = array() ;
                $this->rcMoveIndex = 0;
@@ -47,7 +56,7 @@ class ChangesList {
                $r .= '<tt>' ;
 
                if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
-                       $r .= '&nbsp;&nbsp;';
+                       $r .= '&nbsp;&nbsp;&nbsp;';
                } else {
                        # M, N and !
                        $M = wfMsg( 'minoreditletter' );
@@ -301,10 +310,11 @@ class ChangesList {
 
 
        function recentChangesLineOld( &$rc, $watched = false ) {
+               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol,
+                       $wgOnlySysopsCanPatrol, $wgSysopUserBans;
+
                $fname = 'Skin::recentChangesLineOld';
                wfProfileIn( $fname );
-               
-               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
 
                static $message;
                if( !isset( $message ) ) {
@@ -420,7 +430,7 @@ class ChangesList {
                }
                # Block link
                $blockLink='';
-               if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
+               if ( ( $wgSysopUserBans || 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
                        $blockLinkPage = Title::makeTitle( NS_SPECIAL, 'Blockip' );
                        $blockLink = $this->skin->makeKnownLinkObj( $blockLinkPage,
                                $message['blocklink'], 'ip='.$rc_user_text );
@@ -450,8 +460,8 @@ class ChangesList {
        }
 
        function recentChangesLineNew( &$baseRC, $watched = false ) {
-               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds;
-               global $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
+               global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds,
+                       $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans;
                
                static $message;
                if( !isset( $message ) ) {
@@ -556,7 +566,7 @@ class ChangesList {
                $userTalkLink = $this->skin->makeLinkObj( $userTalkPage, $talkname );
 
                global $wgDisableAnonTalk;
-               if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
+               if ( ( $wgSysopUserBans || 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
                        $blockPage =& Title::makeTitle( NS_SPECIAL, 'Blockip' );
                        $blockLink = $this->skin->makeKnownLinkObj( $blockPage,
                                $message['blocklink'], 'ip='.$rc_user_text );
@@ -586,6 +596,4 @@ class ChangesList {
        }
 
 }
-
-
-?>
+?>
\ No newline at end of file