* (bug 2894) Enhanced Recent Changes link fixes
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 23 Nov 2005 18:44:32 +0000 (18:44 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 23 Nov 2005 18:44:32 +0000 (18:44 +0000)
Patch from P. K. CHAN:
http://bugzilla.wikimedia.org/attachment.cgi?id=1091

plus additional fix:
http://bugzilla.wikimedia.org/attachment.cgi?id=1092

RELEASE-NOTES
includes/ChangesList.php

index 38f0ff1..cc5880a 100644 (file)
@@ -243,6 +243,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 3996) Fix text for new entries in RC RSS/Atom feed
 * (bug 3886) Update for Portuguese language (pt)
 * (bug 4020) Update namespaces for ms
+* (bug 2894) Enhanced Recent Changes link fixes
 
 
 === Caveats ===
index 50ef66a..6d90e57 100644 (file)
@@ -427,16 +427,17 @@ class EnhancedChangesList extends ChangesList {
                } else {
                        $rcIdQuery = '';
                }
-               $query = $curIdEq."&diff=$rc_this_oldid&oldid=$rc_last_oldid";
+               $querycur = $curIdEq."&diff=0&oldid=$rc_this_oldid";
+               $querydiff = $curIdEq."&diff=$rc_this_oldid&oldid=$rc_last_oldid";
                $aprops = ' tabindex="'.$baseRC->counter.'"';
-               $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['cur'], $query, '' ,'' , $aprops );
+               $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['cur'], $querycur, '' ,'' , $aprops );
                if( $rc_type == RC_NEW || $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
                        if( $rc_type != RC_NEW ) {
                                $curLink = $this->message['cur'];
                        }
                        $diffLink = $this->message['diff'];
                } else {
-                       $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['diff'], $query . $rcIdQuery, '' ,'' , $aprops );
+                       $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['diff'], $querydiff, '' ,'' , $aprops );
                }
 
                # Make "last" link
@@ -594,8 +595,8 @@ class EnhancedChangesList extends ChangesList {
                        $r .= '&nbsp;</tt>' ;
 
                        $o = '' ;
-                       if ( $rc_last_oldid != 0 ) {
-                               $o = 'oldid='.$rc_last_oldid ;
+                       if ( $rc_this_oldid != 0 ) {
+                               $o = 'oldid='.$rc_this_oldid ;
                        }
                        if ( $rc_type == RC_LOG ) {
                                $link = $rcObj->timestamp;