Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351165 )

Change subject: RC Filters: Last revision filter group
......................................................................

RC Filters: Last revision filter group

New filter group to show changes related to the last
revision of a page or show changes on previous revisions.

Bug: T163561
Change-Id: Ifc376a34bbe564714285894f93ffb80aa82f5fdf
---
M includes/specialpage/ChangesListSpecialPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 47 insertions(+), 0 deletions(-)


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

diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 3aafc94..bc241e0 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -255,6 +255,43 @@
                        // reviewStatus (conditional)
 
                        [
+                               'name' => 'lastRevision',
+                               'title' => 'rcfilters-filtergroup-lastRevision',
+                               'class' => ChangesListBooleanFilterGroup::class,
+                               'priority' => -7,
+                               'filters' => [
+                                       [
+                                               'name' => 'hidelastrevision',
+                                               'label' => 
'rcfilters-filter-lastrevision-label',
+                                               'description' => 
'rcfilters-filter-lastrevision-description',
+                                               'default' => false,
+                                               'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
+                                                       &$query_options, 
&$join_conds ) {
+                                                       $conds[] = 
'rc_this_oldid <> page_latest';
+                                               },
+                                               'cssClassSuffix' => 'last',
+                                               'isRowApplicableCallable' => 
function ( $ctx, $rc ) {
+                                                       return 
$rc->getAttribute( 'rc_this_oldid' ) === $rc->getAttribute( 'page_latest' );
+                                               }
+                                       ],
+                                       [
+                                               'name' => 
'hidepreviousrevisions',
+                                               'label' => 
'rcfilters-filter-previousrevision-label',
+                                               'description' => 
'rcfilters-filter-previousrevision-description',
+                                               'default' => false,
+                                               'queryCallable' => function ( 
$specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds,
+                                                       &$query_options, 
&$join_conds ) {
+                                                       $conds[] = 
'rc_this_oldid = page_latest';
+                                               },
+                                               'cssClassSuffix' => 'previous',
+                                               'isRowApplicableCallable' => 
function ( $ctx, $rc ) {
+                                                       return 
$rc->getAttribute( 'rc_this_oldid' ) !== $rc->getAttribute( 'page_latest' );
+                                               }
+                                       ]
+                               ]
+                       ],
+
+                       [
                                'name' => 'significance',
                                'title' => 'rcfilters-filtergroup-significance',
                                'class' => ChangesListBooleanFilterGroup::class,
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 5913bcb..3f5b881 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1427,6 +1427,11 @@
        "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor 
edits\" filter conflicts with one or more Type of Change filters, because 
certain types of change cannot be designated as \"minor.\" The conflicting 
filters are marked in the Active Filters area, above.",
        "rcfilters-hideminor-conflicts-typeofchange": "Certain types of change 
cannot be designated as \"minor,\" so this filter conflicts with the following 
Type of Change filters: $1",
        "rcfilters-typeofchange-conflicts-hideminor": "This Type of Change 
filter conflicts with the \"Minor Edits\" filter. Certain types of change 
cannot be designated as \"minor.\"",
+       "rcfilters-filtergroup-lastRevision": "Last revision",
+       "rcfilters-filter-lastrevision-label": "Last revision",
+       "rcfilters-filter-lastrevision-description": "The most recent change to 
a page.",
+       "rcfilters-filter-previousrevision-label": "Earlier revisions",
+       "rcfilters-filter-previousrevision-description": "All changes that are 
not the most recent change to a page.",
        "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since 
<strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
        "rclistfromreset": "Reset date selection",
        "rclistfrom": "Show new changes starting from $2, $3",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 2039b1e..4339f3d 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1615,6 +1615,11 @@
        "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor 
edits\" filter is conflicting with one or more Type of Change filters, because 
certain types of change cannot be designated as \"minor.\" The conflicting 
filters are marked in the Active Filters area, above.\n\n\"Type of Change\" is 
{{msg-mw|Rcfilters-filtergroup-changetype}}.",
        "rcfilters-hideminor-conflicts-typeofchange": "Tooltip shown when 
hovering over the Minor edits tag, when a Type of Change filter is also 
selected.\n\n\"Minor edits\" is 
{{msg-mw|rcfilters-filter-minor-label}}.\n\n\"Type of change\" is 
{{msg-mw|rcfilters-filtergroup-changetype}}.\n\nThis indicates that no results 
will be shown.  Parameters:\n* $1 - Comma-separated string of selected Type of 
Change filters, e.g. \"Category, Logged Actions\"\n* $2 - Count of selected 
User Experience Level filters, for PLURAL",
        "rcfilters-typeofchange-conflicts-hideminor": "Tooltip shown when 
hovering over a Type of change filter tag, when the Minor edits filter is also 
selected.\n\n\"Minor edits\" is 
{{msg-mw|rcfilters-filter-minor-label}}.\n\n\"Type of change\" is 
{{msg-mw|rcfilters-filtergroup-changetype}}.\n\nThis indicates that no results 
will be shown.",
+       "rcfilters-filtergroup-lastRevision": "Title for the filter group for 
last revision",
+       "rcfilters-filter-lastrevision-label": "Title for the filter for 
showing changes on last revision of a page.",
+       "rcfilters-filter-lastrevision-description": "Description for the 
filter for showing changes on last revision of a page.",
+       "rcfilters-filter-previousrevision-label": "Title for the filter for 
showing changes on previous revisions of a page.",
+       "rcfilters-filter-previousrevision-description": "Description for the 
filter for showing changes on previous revisions of a page.",
        "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] 
when viewing recentchanges from some specific time.\n\nThe corresponding 
message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of 
changes that are displayed\n* $2 - (Optional) a date and time\n* $3 - a date\n* 
$4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
        "rclistfromreset": "Used on [[Special:RecentChanges]] to reset a 
selection of a certain date range.",
        "rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - 
(Currently not use) date and time. The date and the time adds to the rclistfrom 
description.\n* $2 - time. The time adds to the rclistfrom link description 
(with split of date and time).\n* $3 - date. The date adds to the rclistfrom 
link description (with split of date and time).\n\nThe corresponding message is 
{{msg-mw|Rcnotefrom}}.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc376a34bbe564714285894f93ffb80aa82f5fdf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson <sbis...@wikimedia.org>

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

Reply via email to