Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | |
50 | 50 | # Level constants... |
51 | 51 | if ( !defined( 'FR_SIGHTED' ) ) |
52 | | - define( 'FR_SIGHTED', 0 ); |
| 52 | + define( 'FR_SIGHTED', 0 ); // "basic"/"checked" |
53 | 53 | if ( !defined( 'FR_QUALITY' ) ) |
54 | 54 | define( 'FR_QUALITY', 1 ); |
55 | 55 | if ( !defined( 'FR_PRISTINE' ) ) |
— | — | @@ -82,8 +82,7 @@ |
83 | 83 | |
84 | 84 | # Allowed namespaces of reviewable pages |
85 | 85 | $wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); |
86 | | - |
87 | | -# Pages exempt from reviewing |
| 86 | +# Pages exempt from reviewing. No flagging UI will be shown for them. |
88 | 87 | $wgFlaggedRevsWhitelist = array(); |
89 | 88 | # $wgFlaggedRevsWhitelist = array( 'Main_Page' ); |
90 | 89 | |
— | — | @@ -96,18 +95,18 @@ |
97 | 96 | # FR_QUALITY : "pristine" = "quality" > "sighted" |
98 | 97 | # FR_SIGHTED : "pristine" = "quality" = "sighted" |
99 | 98 | $wgFlaggedRevsPrecedence = FR_QUALITY; |
100 | | -# Revision tagging can slow development... |
101 | | -# For example, the main user base may become complacent, perhaps treat flagged |
102 | | -# pages as "done", or just be too lazy to click "current". We may just want non-user |
103 | | -# visitors to see reviewed pages by default. |
104 | 99 | # Below are groups that see the current revision by default. |
| 100 | +# This makes editing easier since the users always start off |
| 101 | +# viewing the latest version of pages. |
105 | 102 | $wgFlaggedRevsExceptions = array( 'user' ); |
106 | 103 | |
107 | 104 | # Can users make comments that will show up below flagged revisions? |
108 | 105 | $wgFlaggedRevsComments = false; |
109 | | -# Allow auto-review edits directly to the stable version by reviewers? |
| 106 | +# Auto-review edits that are: |
| 107 | +# (a) directly to the stable version by users with 'autoreview'/'bot' |
| 108 | +# (b) self-reversions back to the stable version by any user |
110 | 109 | $wgFlaggedRevsAutoReview = true; |
111 | | -# Auto-review new pages with the minimal level? |
| 110 | +# If $wgFlaggedRevsAutoReview, auto-review new pages as minimally "sighted"? |
112 | 111 | $wgFlaggedRevsAutoReviewNew = true; |
113 | 112 | |
114 | 113 | # Define the tags we can use to rate an article, number of levels, |
— | — | @@ -119,13 +118,11 @@ |
120 | 119 | 'depth' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
121 | 120 | 'style' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
122 | 121 | ); |
123 | | - |
124 | 122 | # For each tag, define the highest tag level that is unlocked by |
125 | 123 | # having certain rights. For example, having 'review' rights may |
126 | 124 | # allow for "depth" to be rated up to second level. |
127 | | -# NOTE: Users cannot lower tags from a level they can't set. |
128 | | -# NOTE: Users with 'validate' can do anything regardless. |
129 | | -# This is mainly for custom, less experienced, groups |
| 125 | +# NOTE: Users cannot lower revision tags from a level they can't set. |
| 126 | +# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels. |
130 | 127 | $wgFlagRestrictions = array( |
131 | 128 | 'accuracy' => array( 'review' => 1, 'autoreview' => 1 ), |
132 | 129 | 'depth' => array( 'review' => 2, 'autoreview' => 2 ), |
— | — | @@ -139,7 +136,7 @@ |
140 | 137 | |
141 | 138 | # Restriction levels for 'autoreview'/'review' rights. |
142 | 139 | # When a level is selected for a page, an edit made by a user |
143 | | -# requires approval unless that user has the specified permission. |
| 140 | +# will not be auto-reviewed if the user lacks the specified permission. |
144 | 141 | # Levels are set at the Stabilization special page. |
145 | 142 | $wgFlaggedRevsRestrictionLevels = array( '', 'sysop' ); |
146 | 143 | # Set this to use FlaggedRevs *only* as a protection-like mechanism. |
— | — | @@ -150,33 +147,13 @@ |
151 | 148 | # NOTE: The stable version precedence cannot be configured per page with this. |
152 | 149 | $wgFlaggedRevsProtection = false; |
153 | 150 | |
154 | | -# URL location for flaggedrevs.css and flaggedrevs.js |
155 | | -# Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath |
156 | | -$wgFlaggedRevsStylePath = '$wgScriptPath/extensions/FlaggedRevs/client'; |
157 | | - |
158 | | -# Define our basic reviewer class |
| 151 | +# Define our basic reviewer class of established editors (Editors) |
159 | 152 | $wgGroupPermissions['editor']['review'] = true; |
160 | 153 | $wgGroupPermissions['editor']['autoreview'] = true; |
161 | 154 | $wgGroupPermissions['editor']['autoconfirmed'] = true; |
162 | 155 | $wgGroupPermissions['editor']['unreviewedpages'] = true; |
163 | 156 | $wgGroupPermissions['editor']['patrolmarks'] = true; |
164 | 157 | |
165 | | -# Defines extra rights for advanced reviewer class |
166 | | -$wgGroupPermissions['reviewer']['validate'] = true; |
167 | | -# Let this stand alone just in case... |
168 | | -$wgGroupPermissions['reviewer']['review'] = true; |
169 | | -$wgGroupPermissions['reviewer']['autoreview'] = true; |
170 | | -$wgGroupPermissions['reviewer']['autoconfirmed'] = true; |
171 | | -$wgGroupPermissions['reviewer']['unreviewedpages'] = true; |
172 | | -$wgGroupPermissions['reviewer']['patrolmarks'] = true; |
173 | | - |
174 | | -# Sysops have their edits autoreviewed |
175 | | -$wgGroupPermissions['sysop']['autoreview'] = true; |
176 | | -# Stable version selection and default page revision selection can be set per page. |
177 | | -$wgGroupPermissions['sysop']['stablesettings'] = true; |
178 | | -# Sysops can always move stable pages |
179 | | -$wgGroupPermissions['sysop']['movestable'] = true; |
180 | | - |
181 | 158 | # Define when users get automatically promoted to Editors. Set as false to disable. |
182 | 159 | # 'spacing' and 'benchmarks' require edits to be spread out. Users must have X (benchmark) |
183 | 160 | # edits Y (spacing) days apart. |
— | — | @@ -219,6 +196,22 @@ |
220 | 197 | ); |
221 | 198 | */ |
222 | 199 | |
| 200 | +# Defines extra rights for advanced reviewer class (Reviewers) |
| 201 | +$wgGroupPermissions['reviewer']['validate'] = true; |
| 202 | +# Let this stand alone just in case... |
| 203 | +$wgGroupPermissions['reviewer']['review'] = true; |
| 204 | +$wgGroupPermissions['reviewer']['autoreview'] = true; |
| 205 | +$wgGroupPermissions['reviewer']['autoconfirmed'] = true; |
| 206 | +$wgGroupPermissions['reviewer']['unreviewedpages'] = true; |
| 207 | +$wgGroupPermissions['reviewer']['patrolmarks'] = true; |
| 208 | + |
| 209 | +# Sysops have their edits autoreviewed |
| 210 | +$wgGroupPermissions['sysop']['autoreview'] = true; |
| 211 | +# Stable version selection and default page revision selection can be set per page. |
| 212 | +$wgGroupPermissions['sysop']['stablesettings'] = true; |
| 213 | +# Sysops can always move stable pages |
| 214 | +$wgGroupPermissions['sysop']['movestable'] = true; |
| 215 | + |
223 | 216 | # Special:Userrights settings |
224 | 217 | # # Basic rights for Sysops |
225 | 218 | $wgAddGroups['sysop'][] = 'editor'; |
— | — | @@ -227,6 +220,10 @@ |
228 | 221 | $wgAddGroups['bureaucrat'][] = 'reviewer'; |
229 | 222 | $wgRemoveGroups['bureaucrat'][] = 'reviewer'; |
230 | 223 | |
| 224 | +# URL location for flaggedrevs.css and flaggedrevs.js |
| 225 | +# Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath |
| 226 | +$wgFlaggedRevsStylePath = '$wgScriptPath/extensions/FlaggedRevs/client'; |
| 227 | + |
231 | 228 | # Show reviews in recentchanges? Disabled by default, often spammy... |
232 | 229 | $wgFlaggedRevsLogInRC = false; |
233 | 230 | # Show automatic promotions to Editor in RC? Disabled by default, often spammy... |
— | — | @@ -236,12 +233,13 @@ |
237 | 234 | $wgFlaggedRevsOversightAge = 30 * 24 * 3600; |
238 | 235 | |
239 | 236 | # Flagged revisions are always visible to users with rights below. |
240 | | -# Use '*' for non-user accounts. |
| 237 | +# Use '*' for non-user accounts. This is for read-restricted wikis. |
241 | 238 | $wgFlaggedRevsVisible = array(); |
242 | 239 | # If $wgFlaggedRevsVisible is populated, it is applied to talk pages too |
243 | 240 | $wgFlaggedRevsTalkVisible = true; |
244 | 241 | |
245 | | -# How long before Special:ValidationStatistics is updated |
| 242 | +# How long before Special:ValidationStatistics is updated. |
| 243 | +# Set to false to disable (perhaps using a cron job instead). |
246 | 244 | $wgFlaggedRevsStatsAge = 2 * 3600; // 2 hours |
247 | 245 | |
248 | 246 | # How to handle templates and files used in stable versions: |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -94,6 +94,11 @@ |
95 | 95 | self::$reviewNamespaces = $wgFlaggedRevsNamespaces; |
96 | 96 | # Note: reviewable *pages* override patrollable ones |
97 | 97 | self::$patrolNamespaces = $wgFlaggedRevsPatrolNamespaces; |
| 98 | + # !$wgFlaggedRevsAutoReview => !$wgFlaggedRevsAutoReviewNew |
| 99 | + global $wgFlaggedRevsAutoReview, $wgFlaggedRevsAutoReviewNew; |
| 100 | + if ( !$wgFlaggedRevsAutoReview ) { |
| 101 | + $wgFlaggedRevsAutoReviewNew = false; |
| 102 | + } |
98 | 103 | } |
99 | 104 | |
100 | 105 | # ################ Basic config accessors ################# |
— | — | @@ -139,7 +144,6 @@ |
140 | 145 | |
141 | 146 | /** |
142 | 147 | * Allow auto-review edits directly to the stable version by reviewers? |
143 | | - * (1 to allow auto-sighting; 2 for auto-quality; 3 for auto-pristine) |
144 | 148 | * @returns bool |
145 | 149 | */ |
146 | 150 | public static function autoReviewEdits() { |
— | — | @@ -148,6 +152,16 @@ |
149 | 153 | } |
150 | 154 | |
151 | 155 | /** |
| 156 | + * Auto-review new pages with the minimal level? |
| 157 | + * @returns bool |
| 158 | + */ |
| 159 | + public static function autoReviewNewPages() { |
| 160 | + global $wgFlaggedRevsAutoReviewNew; |
| 161 | + self::load(); |
| 162 | + return (bool)$wgFlaggedRevsAutoReviewNew; |
| 163 | + } |
| 164 | + |
| 165 | + /** |
152 | 166 | * Get the maximum level that $tag can be autoreviewed to |
153 | 167 | * @param string $tag |
154 | 168 | * @returns int |
— | — | @@ -166,15 +180,6 @@ |
167 | 181 | } |
168 | 182 | |
169 | 183 | /** |
170 | | - * Auto-review new pages with the minimal level? |
171 | | - * @returns bool |
172 | | - */ |
173 | | - public static function autoReviewNewPages() { |
174 | | - global $wgFlaggedRevsAutoReviewNew; |
175 | | - return (bool)$wgFlaggedRevsAutoReviewNew; |
176 | | - } |
177 | | - |
178 | | - /** |
179 | 184 | * Is a "stable version" used as the default display |
180 | 185 | * version for all pages in reviewable namespaces? |
181 | 186 | * @returns bool |