Merge "Fixed a path issue in NoLocalSettings"
[lhc/web/wiklou.git] / includes / changes / EnhancedChangesList.php
index 82e36d9..2cee726 100644 (file)
@@ -34,6 +34,7 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * @param IContextSource|Skin $obj
+        * @throws MWException
         */
        public function __construct( $obj ) {
                if ( $obj instanceof Skin ) {
@@ -88,7 +89,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string
         */
        public function recentChangesLine( &$baseRC, $watched = false ) {
-               wfProfileIn( __METHOD__ );
 
                $date = $this->getLanguage()->userDate(
                        $baseRC->mAttribs['rc_timestamp'],
@@ -109,8 +109,6 @@ class EnhancedChangesList extends ChangesList {
                $cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched );
                $this->addCacheEntry( $cacheEntry );
 
-               wfProfileOut( __METHOD__ );
-
                return $ret;
        }
 
@@ -160,9 +158,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string
         */
        protected function recentChangesBlockGroup( $block ) {
-               global $wgRCShowChangedSize;
-
-               wfProfileIn( __METHOD__ );
 
                # Add the namespace and title of the block as part of the class
                $classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
@@ -191,6 +186,7 @@ class EnhancedChangesList extends ChangesList {
                $namehidden = true;
                $allLogs = true;
                $oldid = '';
+               $RCShowChangedSize = $this->getConfig()->get( 'RCShowChangedSize' );
                foreach ( $block as $rcObj ) {
                        $oldid = $rcObj->mAttribs['rc_last_oldid'];
                        if ( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
@@ -364,7 +360,7 @@ class EnhancedChangesList extends ChangesList {
                $r .= ' <span class="mw-changeslist-separator">. .</span> ';
 
                # Character difference (does not apply if only log items)
-               if ( $wgRCShowChangedSize && !$allLogs ) {
+               if ( $RCShowChangedSize && !$allLogs ) {
                        $last = 0;
                        $first = count( $block ) - 1;
                        # Some events (like logs) have an "empty" size, so we need to skip those...
@@ -442,7 +438,7 @@ class EnhancedChangesList extends ChangesList {
                        $r .= ' <span class="mw-changeslist-separator">. .</span> ';
 
                        # Character diff
-                       if ( $wgRCShowChangedSize ) {
+                       if ( $RCShowChangedSize ) {
                                $cd = $this->formatCharacterDifference( $rcObj );
                                if ( $cd !== '' ) {
                                        $r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
@@ -469,8 +465,6 @@ class EnhancedChangesList extends ChangesList {
 
                $this->rcCacheIndex++;
 
-               wfProfileOut( __METHOD__ );
-
                return $r;
        }
 
@@ -481,9 +475,6 @@ class EnhancedChangesList extends ChangesList {
         * @return string A HTML formatted line (generated using $r)
         */
        protected function recentChangesBlockLine( $rcObj ) {
-               global $wgRCShowChangedSize;
-
-               wfProfileIn( __METHOD__ );
                $query['curid'] = $rcObj->mAttribs['rc_cur_id'];
 
                $type = $rcObj->mAttribs['rc_type'];
@@ -533,7 +524,7 @@ class EnhancedChangesList extends ChangesList {
                }
                $r .= ' <span class="mw-changeslist-separator">. .</span> ';
                # Character diff
-               if ( $wgRCShowChangedSize ) {
+               if ( $this->getConfig()->get( 'RCShowChangedSize' ) ) {
                        $cd = $this->formatCharacterDifference( $rcObj );
                        if ( $cd !== '' ) {
                                $r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
@@ -555,8 +546,6 @@ class EnhancedChangesList extends ChangesList {
 
                $r .= "</td></tr></table>\n";
 
-               wfProfileOut( __METHOD__ );
-
                return $r;
        }
 
@@ -571,8 +560,6 @@ class EnhancedChangesList extends ChangesList {
                        return '';
                }
 
-               wfProfileIn( __METHOD__ );
-
                $blockOut = '';
                foreach ( $this->rc_cache as $block ) {
                        if ( count( $block ) < 2 ) {
@@ -582,8 +569,6 @@ class EnhancedChangesList extends ChangesList {
                        }
                }
 
-               wfProfileOut( __METHOD__ );
-
                return '<div>' . $blockOut . '</div>';
        }