Gerrit Patch Uploader has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303165

Change subject: Remove curid from diff and history links on watch list and 
recent changes
......................................................................

Remove curid from diff and history links on watch list and recent changes

The curid parameter is not necessary because it is redundant to the title 
parameter
or not relevant when an oldid or diff parameter is present.

Bug: T140915
Bug: T140916
Change-Id: If7bd749b867a435cab7c2ac255e17fb2c6fcf77b
---
M includes/changes/ChangesList.php
M includes/changes/EnhancedChangesList.php
M includes/changes/RCCacheEntryFactory.php
3 files changed, 0 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/303165/1

diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php
index 77038ed..2211ea6 100644
--- a/includes/changes/ChangesList.php
+++ b/includes/changes/ChangesList.php
@@ -371,7 +371,6 @@
                        $diffLink = $this->message['diff'];
                } else {
                        $query = [
-                               'curid' => $rc->mAttribs['rc_cur_id'],
                                'diff' => $rc->mAttribs['rc_this_oldid'],
                                'oldid' => $rc->mAttribs['rc_last_oldid']
                        ];
@@ -393,7 +392,6 @@
                                new HtmlArmor( $this->message['hist'] ),
                                [],
                                [
-                                       'curid' => $rc->mAttribs['rc_cur_id'],
                                        'action' => 'history'
                                ]
                        );
diff --git a/includes/changes/EnhancedChangesList.php 
b/includes/changes/EnhancedChangesList.php
index d3a414b..91bf040 100644
--- a/includes/changes/EnhancedChangesList.php
+++ b/includes/changes/EnhancedChangesList.php
@@ -183,8 +183,6 @@
 
                # Collate list of users
                $userlinks = [];
-               # Other properties
-               $curId = 0;
                # Some catalyst variables...
                $namehidden = true;
                $allLogs = true;
@@ -219,11 +217,6 @@
                        if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
                                $allLogs = false;
                        }
-                       # Get the latest entry with a page_id and oldid
-                       # since logs may not have these.
-                       if ( !$curId && $rcObj->mAttribs['rc_cur_id'] ) {
-                               $curId = $rcObj->mAttribs['rc_cur_id'];
-                       }
 
                        $userlinks[$u]++;
                }
@@ -253,8 +246,6 @@
                } else {
                        $articleLink = $this->getArticleLink( $block[0], 
$block[0]->unpatrolled, $block[0]->watched );
                }
-
-               $queryParams['curid'] = $curId;
 
                # Sub-entries
                $lines = [];
@@ -588,8 +579,6 @@
         */
        protected function recentChangesBlockLine( $rcObj ) {
                $data = [];
-
-               $query['curid'] = $rcObj->mAttribs['rc_cur_id'];
 
                $type = $rcObj->mAttribs['rc_type'];
                $logType = $rcObj->mAttribs['rc_log_type'];
diff --git a/includes/changes/RCCacheEntryFactory.php 
b/includes/changes/RCCacheEntryFactory.php
index 2c5c8b1..3c30b05 100644
--- a/includes/changes/RCCacheEntryFactory.php
+++ b/includes/changes/RCCacheEntryFactory.php
@@ -164,7 +164,6 @@
         */
        private function buildCurQueryParams( RecentChange $recentChange ) {
                return [
-                       'curid' => $recentChange->mAttribs['rc_cur_id'],
                        'diff' => 0,
                        'oldid' => $recentChange->mAttribs['rc_this_oldid']
                ];
@@ -199,7 +198,6 @@
         */
        private function buildDiffQueryParams( RecentChange $recentChange ) {
                return [
-                       'curid' => $recentChange->mAttribs['rc_cur_id'],
                        'diff' => $recentChange->mAttribs['rc_this_oldid'],
                        'oldid' => $recentChange->mAttribs['rc_last_oldid']
                ];

-- 
To view, visit https://gerrit.wikimedia.org/r/303165
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7bd749b867a435cab7c2ac255e17fb2c6fcf77b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com>
Gerrit-Reviewer: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to