* Concept for diff-based compression using the new xdiff beta. Acheives massively...
[lhc/web/wiklou.git] / includes / ChangesList.php
index ba7710e..41d2039 100644 (file)
@@ -121,7 +121,7 @@ class ChangesList {
 
                # "[[x]] moved to [[y]]"
                $msg = ( $rc->mAttribs['rc_type'] == RC_MOVE ) ? '1movedto2' : '1movedto2_redir';
-               $s .= wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no', '', '', '', 'class="mw-redirect"' ),
+               $s .= wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
                        $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
        }
 
@@ -130,7 +130,6 @@ class ChangesList {
 
                # Make date header if necessary
                $date = $wgLang->date( $rc_timestamp, true, true );
-               $s = '';
                if( $date != $this->lastdate ) {
                        if( '' != $this->lastdate ) {
                                $s .= "</ul>\n";
@@ -201,11 +200,11 @@ class ChangesList {
        protected function insertTimestamp(&$s, $rc) {
                global $wgLang;
                # Timestamp
-               $s .= $this->message['semicolon-separator'] . ' ' . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
+               $s .= $this->message['semicolon-separator'] . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
        }
 
        /** Insert links to user page, user talk page and eventually a blocking link */
-       protected function insertUserRelatedLinks(&$s, &$rc) {
+       public function insertUserRelatedLinks(&$s, &$rc) {
                if ( $this->isDeleted($rc,Revision::DELETED_USER) ) {
                   $s .= ' <span class="history-deleted">' . wfMsgHtml('rev-deleted-user') . '</span>';
                } else {
@@ -319,9 +318,10 @@ class OldChangesList extends ChangesList {
                # Should patrol-related stuff be shown?
                $unpatrolled = $wgUser->useRCPatrol() && $rc_patrolled == 0;
 
-               $this->insertDateHeader($s,$rc_timestamp);
+               $dateheader = ""; // $s now contains only <li>...</li>, for hooks' convenience.
+               $this->insertDateHeader($dateheader,$rc_timestamp);
 
-               $s .= '<li>';
+               $s = '';
 
                // Moved pages
                if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
@@ -372,12 +372,14 @@ class OldChangesList extends ChangesList {
                        $s .= ' ' . wfMsg('number_of_watching_users_RCview',  $wgContLang->formatNum($rc->numberofWatchingusers));
                }
 
-               $s .= "</li>\n";
+               wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) );
+               
+               $s = "<li>$s</li>\n";
 
                wfProfileOut( $fname.'-rest' );
 
                wfProfileOut( $fname );
-               return $s;
+               return $dateheader . $s;
        }
 }
 
@@ -587,12 +589,12 @@ class EnhancedChangesList extends ChangesList {
                        $text = $userlink;
                        $text .= $wgContLang->getDirMark();
                        if( $count > 1 ) {
-                               $text .= ' ('.$count.'&times;)';
+                               $text .= ' (' . $wgLang->formatNum( $count ) . '×)';
                        }
                        array_push( $users, $text );
                }
 
-               $users = ' <span class="changedby">[' . implode( $this->message['semicolon-separator'] . ' ', $users ) . ']</span>';
+               $users = ' <span class="changedby">[' . implode( $this->message['semicolon-separator'], $users ) . ']</span>';
 
                # Arrow
                $rci = 'RCI'.$this->rcCacheIndex;
@@ -712,7 +714,7 @@ class EnhancedChangesList extends ChangesList {
                        if ( !$rc_type == RC_LOG || $rc_type == RC_NEW ) {
                                $r .= ' (';
                                $r .= $rcObj->curlink;
-                               $r .= $this->message['semicolon-separator'] . ' ';
+                               $r .= $this->message['semicolon-separator'];
                                $r .= $rcObj->lastlink;
                                $r .= ')';
                        }
@@ -837,7 +839,7 @@ class EnhancedChangesList extends ChangesList {
 
                # Diff and hist links
                if ( $rc_type != RC_LOG ) {
-                  $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator'] . ' ';
+                  $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator'];
                   $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' ) . ')';
                }
                $r .= ' . . ';