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

Change subject: Make the preference for the "r" flag on the RC page also 
control highlighting
......................................................................

Make the preference for the "r" flag on the RC page also control highlighting

And disable it when the RCFilters beta feature is enabled.

Bug: T163025
Change-Id: I988f6641773dcec27ff9bb01861c1491348d332f
---
M i18n/en.json
M includes/Hooks.php
2 files changed, 6 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/54/349354/1

diff --git a/i18n/en.json b/i18n/en.json
index e5012ec..65ad058 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,7 @@
        "ores-help-damaging-pref": "Sets the level of probability at which the 
system flags edits with an \"{{int:ores-damaging-letter}}\" to indicate they 
\"need review\" on Recent Changes, Watchlist and Contributions. Also sets the 
threshold for \"Show only likely problem edits\".",
        "ores-hide-nondamaging-filter": "Hide probably good edits",
        "ores-pref-damaging": "ORES sensitivity",
-       "ores-pref-damaging-flag": "Mark likely problem edits with an 
\"{{int:ores-damaging-letter}}\" for \"needs review\" (to set the level at 
which edits are marked, use the \"{{int:ores-pref-damaging}}\" setting in the 
Watchlist preferences)",
+       "ores-pref-damaging-flag": "Highlight likely problem edits with colors 
and an \"{{int:ores-damaging-letter}}\" for \"needs review\" (to set the level 
at which edits are marked, use the \"{{int:ores-pref-damaging}}\" setting in 
the Watchlist preferences)",
        "ores-rcfilters-whats-this-link-text": "Learn more",
        "ores-rcfilters-ores-conflicts-logactions-global": "The \"Logged 
actions\" filter conflicts with one or more Contribution Quality or User Intent 
filters. Quality and Intent predictions are not available for logged actions. 
The conflicting filters are marked in the Active Filters area, above.",
        "ores-rcfilters-logactions-conflicts-ores": "This filter conflicts with 
one or more Contribution Quality or User Intent filters. Quality and Intent 
predictions are not available for logged actions.",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index f017a38..69be77e 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -698,9 +698,10 @@
                        'section' => 'rc/advancedrc',
                        'label-message' => 'ores-pref-rc-hidenondamaging',
                ];
-               // Hide RC pref if enhanced filters are enabled
+               // Hide RC prefs if enhanced filters are enabled
                if ( $user->getBoolOption( 'rcenhancedfilters' ) ) {
                        $wgHiddenPrefs[] = 'oresRCHideNonDamaging';
+                       $wgHiddenPrefs[] = 'ores-damaging-flag-rc';
                }
        }
 
@@ -793,11 +794,9 @@
         * @return boolean Whether highlights should be shown
         */
        private static function isHighlightEnabled( IContextSource $context ) {
-               global $wgOresExtensionStatus;
-               return $wgOresExtensionStatus === 'beta' || (
-                       !self::isRCPage( $context ) &&
-                       $context->getUser()->getBoolOption( 'oresHighlight' )
-               );
+               // Was previously controlled by different preferences than the 
"r", but they're currently
+               // the same.
+               return self::isDamagingFlagEnabled( $context );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I988f6641773dcec27ff9bb01861c1491348d332f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to