[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Simplify FR loading prior to extension registration
jenkins-bot has submitted this change and it was merged. Change subject: Simplify FR loading prior to extension registration .. Simplify FR loading prior to extension registration Moving a lot of code back into FlaggedRevs.php Change-Id: Idcb938498b8d5d5cecede45534464915dbdacb8c --- M FlaggedRevs.config.php M FlaggedRevs.php M FlaggedRevs.setup.php M backend/FlaggedRevs.hooks.php M frontend/FlaggedRevsUI.setup.php D tests/FlaggedRevsSetupTest.php 6 files changed, 518 insertions(+), 609 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/FlaggedRevs.config.php b/FlaggedRevs.config.php index 6525e57..07f03b2 100644 --- a/FlaggedRevs.config.php +++ b/FlaggedRevs.config.php @@ -4,178 +4,7 @@ # IMPORTANT: DO NOT EDIT THIS FILE # When configuring globals, set them at LocalSettings.php instead -# This will only distinguish "checked", "quality", and unreviewed -# A small icon will show in the upper right hand corner -$wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready -# For visitors, only show tags/icons for unreviewed/outdated pages -$wgFlaggedRevsLowProfile = true; // @TODO: remove with new icon UI? -# Allowed namespaces of reviewable pages -$wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); -# Pages exempt from reviewing. No flagging UI will be shown for them. -$wgFlaggedRevsWhitelist = array(); -# $wgFlaggedRevsWhitelist = array( 'Main_Page' ); - -# Is a "stable version" used as the default display -# version for all pages in reviewable namespaces? -$wgFlaggedRevsOverride = true; -# Below are groups that see the current revision by default. -# This makes editing easier since the users always start off -# viewing the latest version of pages. -$wgFlaggedRevsExceptions = array( 'user' ); // @TODO: remove when ready (and expand pref) - -# Auto-review settings for edits/new pages: -# FR_AUTOREVIEW_NONE -# Don't auto-review any edits or new pages -# FR_AUTOREVIEW_CHANGES -# Auto-review the following types of edits (to existing pages): -# (a) changes directly to the stable version by users with 'autoreview'/'bot' -# (b) reversions to old reviewed versions by users with 'autoreview'/'bot' -# (c) self-reversions back to the stable version by any user -# FR_AUTOREVIEW_CREATION -# Auto-review new pages as minimally "checked" -# FR_AUTOREVIEW_CREATION_AND_CHANGES -# Combines FR_AUTOREVIEW_CHANGES and FR_AUTOREVIEW_CREATION -$wgFlaggedRevsAutoReview = FR_AUTOREVIEW_CREATION_AND_CHANGES; - -# Define the tags we can use to rate an article, number of levels, -# and set the minimum level to have it become a "quality" or "pristine" version. -# NOTE: When setting up new dimensions or levels, you will need to add some -# MediaWiki messages for the UI to show properly; any sysop can do this. -$wgFlaggedRevsTags = array( - 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ), - 'depth'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), - 'style'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), -); -# For each tag, define the highest tag level that is unlocked by -# having certain rights. For example, having 'review' rights may -# allow for "depth" to be rated up to second level. -# NOTE: Users cannot lower revision tags from a level they can't set. -# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels. -$wgFlaggedRevsTagsRestrictions = array( - 'accuracy' => array( 'review' => 1, 'autoreview' => 1 ), - 'depth'=> array( 'review' => 2, 'autoreview' => 2 ), - 'style'=> array( 'review' => 3, 'autoreview' => 3 ), -); -# For each tag, what is the highest level that it can be auto-reviewed to? -# $wgFlaggedRevsAutoReview must be enabled for this to apply. -$wgFlaggedRevsTagsAuto = array( - 'accuracy' => 1, 'depth' => 1, 'style' => 1 -); - -# Restriction levels for 'autoreview'/'review' rights. -# When a level is selected for a page, an edit made by a user -# will not be auto-reviewed if the user lacks the specified permission. -# Levels are set at the Stabilization special page. -$wgFlaggedRevsRestrictionLevels = array( '', 'sysop' ); -# Set this to use FlaggedRevs *only* as a protection-like mechanism. -# This will disable Stabilization and show the above restriction levels -# on the protection form of pages. Each level has the stable version shown by default. -# A "none" level will appear in the form as well, to disable the review process. -# Pages will only be reviewable if manually restricted to a level above "none". -$wgFlaggedRevsProtection = false; - -# Define our basic reviewer class of established editors (Editors) -$wgGroupPermissions['editor']['review']= true; -$wgGroupPermissions['editor']['autoreview']= true; -$wgGroupPermissions['editor']['autoconfirmed'] = true; -$wgGroupPermissions['editor']['editsemiprotected']
[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Simplify FR loading prior to extension registration
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/316197 Change subject: Simplify FR loading prior to extension registration .. Simplify FR loading prior to extension registration Moving a lot of code back into FlaggedRevs.php Change-Id: Idcb938498b8d5d5cecede45534464915dbdacb8c --- M FlaggedRevs.config.php M FlaggedRevs.php M FlaggedRevs.setup.php M backend/FlaggedRevs.hooks.php M frontend/FlaggedRevsUI.setup.php 5 files changed, 518 insertions(+), 585 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/97/316197/1 diff --git a/FlaggedRevs.config.php b/FlaggedRevs.config.php index 6525e57..07f03b2 100644 --- a/FlaggedRevs.config.php +++ b/FlaggedRevs.config.php @@ -4,178 +4,7 @@ # IMPORTANT: DO NOT EDIT THIS FILE # When configuring globals, set them at LocalSettings.php instead -# This will only distinguish "checked", "quality", and unreviewed -# A small icon will show in the upper right hand corner -$wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready -# For visitors, only show tags/icons for unreviewed/outdated pages -$wgFlaggedRevsLowProfile = true; // @TODO: remove with new icon UI? -# Allowed namespaces of reviewable pages -$wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); -# Pages exempt from reviewing. No flagging UI will be shown for them. -$wgFlaggedRevsWhitelist = array(); -# $wgFlaggedRevsWhitelist = array( 'Main_Page' ); - -# Is a "stable version" used as the default display -# version for all pages in reviewable namespaces? -$wgFlaggedRevsOverride = true; -# Below are groups that see the current revision by default. -# This makes editing easier since the users always start off -# viewing the latest version of pages. -$wgFlaggedRevsExceptions = array( 'user' ); // @TODO: remove when ready (and expand pref) - -# Auto-review settings for edits/new pages: -# FR_AUTOREVIEW_NONE -# Don't auto-review any edits or new pages -# FR_AUTOREVIEW_CHANGES -# Auto-review the following types of edits (to existing pages): -# (a) changes directly to the stable version by users with 'autoreview'/'bot' -# (b) reversions to old reviewed versions by users with 'autoreview'/'bot' -# (c) self-reversions back to the stable version by any user -# FR_AUTOREVIEW_CREATION -# Auto-review new pages as minimally "checked" -# FR_AUTOREVIEW_CREATION_AND_CHANGES -# Combines FR_AUTOREVIEW_CHANGES and FR_AUTOREVIEW_CREATION -$wgFlaggedRevsAutoReview = FR_AUTOREVIEW_CREATION_AND_CHANGES; - -# Define the tags we can use to rate an article, number of levels, -# and set the minimum level to have it become a "quality" or "pristine" version. -# NOTE: When setting up new dimensions or levels, you will need to add some -# MediaWiki messages for the UI to show properly; any sysop can do this. -$wgFlaggedRevsTags = array( - 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ), - 'depth'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), - 'style'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), -); -# For each tag, define the highest tag level that is unlocked by -# having certain rights. For example, having 'review' rights may -# allow for "depth" to be rated up to second level. -# NOTE: Users cannot lower revision tags from a level they can't set. -# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels. -$wgFlaggedRevsTagsRestrictions = array( - 'accuracy' => array( 'review' => 1, 'autoreview' => 1 ), - 'depth'=> array( 'review' => 2, 'autoreview' => 2 ), - 'style'=> array( 'review' => 3, 'autoreview' => 3 ), -); -# For each tag, what is the highest level that it can be auto-reviewed to? -# $wgFlaggedRevsAutoReview must be enabled for this to apply. -$wgFlaggedRevsTagsAuto = array( - 'accuracy' => 1, 'depth' => 1, 'style' => 1 -); - -# Restriction levels for 'autoreview'/'review' rights. -# When a level is selected for a page, an edit made by a user -# will not be auto-reviewed if the user lacks the specified permission. -# Levels are set at the Stabilization special page. -$wgFlaggedRevsRestrictionLevels = array( '', 'sysop' ); -# Set this to use FlaggedRevs *only* as a protection-like mechanism. -# This will disable Stabilization and show the above restriction levels -# on the protection form of pages. Each level has the stable version shown by default. -# A "none" level will appear in the form as well, to disable the review process. -# Pages will only be reviewable if manually restricted to a level above "none". -$wgFlaggedRevsProtection = false; - -# Define our basic reviewer class of established editors (Editors) -$wgGroupPermissions['editor']['review']= true; -$wgGroupPermissions['editor']['autoreview']= true; -$wgGroupPermissions['editor']['autoconfirmed'] = true;