Merge "Adding release note for category changes in watchlists"
[lhc/web/wiklou.git] / includes / changes / OldChangesList.php
index c9602cc..1bd78ca 100644 (file)
@@ -32,7 +32,6 @@ class OldChangesList extends ChangesList {
         * @return string|bool
         */
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
-               wfProfileIn( __METHOD__ );
 
                $classes = array();
                // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
@@ -56,14 +55,10 @@ class OldChangesList extends ChangesList {
                                $rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
                }
 
-               if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
-                       wfProfileOut( __METHOD__ );
-
+               if ( !Hooks::run( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
                        return false;
                }
 
-               wfProfileOut( __METHOD__ );
-
                $dateheader = ''; // $html now contains only <li>...</li>, for hooks' convenience.
                $this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
 
@@ -93,7 +88,9 @@ class OldChangesList extends ChangesList {
                } else {
                        $unpatrolled = $this->showAsUnpatrolled( $rc );
 
-                       $this->insertDiffHist( $html, $rc, $unpatrolled );
+                       if ( !$this->isCategorizationWithoutRevision( $rc ) ) {
+                               $this->insertDiffHist( $html, $rc, $unpatrolled );
+                       }
                        # M, N, b and ! (minor, new, bot and unpatrolled)
                        $html .= $this->recentChangesFlags(
                                array(
@@ -118,6 +115,8 @@ class OldChangesList extends ChangesList {
 
                if ( $rc->mAttribs['rc_type'] == RC_LOG ) {
                        $html .= $this->insertLogEntry( $rc );
+               } elseif ( $this->isCategorizationWithoutRevision( $rc ) ) {
+                       $html .= $this->insertComment( $rc );
                } else {
                        # User tool links
                        $this->insertUserRelatedLinks( $html, $rc );