remove extra whitespace; testing commit notifications
[lhc/web/wiklou.git] / includes / ChangesList.php
index 43fd543..a336151 100644 (file)
@@ -1,10 +1,4 @@
 <?php
-/**
- * Contain class to show various lists of change:
- * - what's link here
- * - related changes
- * - recent changes
- */
 
 /**
  * @todo document
@@ -15,7 +9,7 @@ class RCCacheEntry extends RecentChange
        var $curlink , $difflink, $lastlink , $usertalklink , $versionlink ;
        var $userlink, $timestamp, $watched;
 
-       function newFromParent( $rc ) {
+       static function newFromParent( $rc ) {
                $rc2 = new RCCacheEntry;
                $rc2->mAttribs = $rc->mAttribs;
                $rc2->mExtra = $rc->mExtra;
@@ -24,6 +18,10 @@ class RCCacheEntry extends RecentChange
 } ;
 
 /**
+ * Class to show various lists of changes:
+ * - what links here
+ * - related changes
+ * - recent changes
  */
 class ChangesList {
        # Called by history lists and recent changes
@@ -499,18 +497,19 @@ class EnhancedChangesList extends ChangesList {
 
                        $r .= ') . . ';
 
-                       # Character difference
-                       $chardiff = $rcObj->getCharacterDifference( $block[ count( $block ) - 1 ]->mAttribs['rc_old_len'],
-                                       $block[0]->mAttribs['rc_new_len'] );
-                       if( $chardiff == '' ) {
-                               $r .= ' (';
-                       } else {
-                               $r .= ' ' . $chardiff. ' . . (';
-                       }
-                       
+                       if( $wgRCShowChangedSize ) {
+                               # Character difference
+                               $chardiff = $rcObj->getCharacterDifference( $block[ count( $block ) - 1 ]->mAttribs['rc_old_len'],
+                                               $block[0]->mAttribs['rc_new_len'] );
+                               if( $chardiff == '' ) {
+                                       $r .= ' (';
+                               } else {
+                                       $r .= ' ' . $chardiff. ' . . ';
+                               }
+                       }       
 
                        # History
-                       $r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
+                       $r .= '(' . $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
                                $this->message['history'], $curIdEq.'&action=history' );
                        $r .= ')';
                }