Index: trunk/extensions/FlaggedRevs/FlaggedRevsDefines.php |
— | — | @@ -1,43 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | -* Defines global constants, some of which are used in LocalSettings.php |
5 | | -*/ |
6 | | - |
7 | | -# Query SELECT parameters... |
8 | | -define( 'FR_FOR_UPDATE', 1 ); |
9 | | -define( 'FR_MASTER', 2 ); |
10 | | - |
11 | | -# Review tier constants... |
12 | | -define( 'FR_CHECKED', 0 ); // "basic"/"checked" |
13 | | -define( 'FR_QUALITY', 1 ); |
14 | | -define( 'FR_PRISTINE', 2 ); |
15 | | - |
16 | | -# Inclusion (templates/files) settings |
17 | | -define( 'FR_INCLUDES_CURRENT', 0 ); |
18 | | -define( 'FR_INCLUDES_FREEZE', 1 ); |
19 | | -define( 'FR_INCLUDES_STABLE', 2 ); |
20 | | - |
21 | | -# Autoreview settings for priviledged users |
22 | | -define( 'FR_AUTOREVIEW_NONE', 0 ); |
23 | | -define( 'FR_AUTOREVIEW_CHANGES', 1 ); |
24 | | -define( 'FR_AUTOREVIEW_CREATION', 2 ); |
25 | | -define( 'FR_AUTOREVIEW_CREATION_AND_CHANGES', FR_AUTOREVIEW_CHANGES | FR_AUTOREVIEW_CREATION ); |
26 | | - |
27 | | -# User preference for showing stable versions |
28 | | -define( 'FR_SHOW_STABLE_DEFAULT', 0 ); // b/c with "false" |
29 | | -define( 'FR_SHOW_STABLE_ALWAYS', 1 ); // b/c with "true" |
30 | | -define( 'FR_SHOW_STABLE_NEVER', 2 ); |
31 | | - |
32 | | -# Autopromote conds (F=70,R=82) |
33 | | -# @TODO: move these 6 to core |
34 | | -define( 'APCOND_FR_EDITSUMMARYCOUNT', 70821 ); |
35 | | -define( 'APCOND_FR_NEVERBOCKED', 70822 ); |
36 | | -define( 'APCOND_FR_UNIQUEPAGECOUNT', 70823 ); |
37 | | -define( 'APCOND_FR_CONTENTEDITCOUNT', 70824 ); |
38 | | -define( 'APCOND_FR_USERPAGEBYTES', 70825 ); |
39 | | -define( 'APCOND_FR_EDITCOUNT', 70826 ); |
40 | | - |
41 | | -define( 'APCOND_FR_EDITSPACING', 70827 ); |
42 | | -define( 'APCOND_FR_CHECKEDEDITCOUNT', 70828 ); |
43 | | -define( 'APCOND_FR_MAXREVERTEDEDITRATIO', 70829 ); |
44 | | -define( 'APCOND_FR_NEVERDEMOTED', 70830 ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -32,180 +32,11 @@ |
33 | 33 | ); |
34 | 34 | |
35 | 35 | # Load global constants |
36 | | -require( "FlaggedRevsDefines.php" ); |
| 36 | +require( "FlaggedRevs.defines.php" ); |
37 | 37 | |
38 | | -# ######## Configuration variables ######## |
39 | | -# IMPORTANT: DO NOT EDIT THIS FILE |
40 | | -# When configuring globals, set them at LocalSettings.php instead |
| 38 | +# Load default configuration variables |
| 39 | +require( "FlaggedRevs.config.php" ); |
41 | 40 | |
42 | | -# This will only distinguish "checked", "quality", and unreviewed |
43 | | -# A small icon will show in the upper right hand corner |
44 | | -$wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready |
45 | | -# For visitors, only show tags/icons for unreviewed/outdated pages |
46 | | -$wgFlaggedRevsLowProfile = true; // @TODO: remove with new icon UI? |
47 | | - |
48 | | -# Allowed namespaces of reviewable pages |
49 | | -$wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); |
50 | | -# Pages exempt from reviewing. No flagging UI will be shown for them. |
51 | | -$wgFlaggedRevsWhitelist = array(); |
52 | | -# $wgFlaggedRevsWhitelist = array( 'Main_Page' ); |
53 | | - |
54 | | -# Is a "stable version" used as the default display |
55 | | -# version for all pages in reviewable namespaces? |
56 | | -$wgFlaggedRevsOverride = true; |
57 | | -# Below are groups that see the current revision by default. |
58 | | -# This makes editing easier since the users always start off |
59 | | -# viewing the latest version of pages. |
60 | | -$wgFlaggedRevsExceptions = array( 'user' ); // @TODO: remove when ready (and expand pref) |
61 | | - |
62 | | -# Auto-review settings for edits/new pages: |
63 | | -# FR_AUTOREVIEW_NONE |
64 | | -# Don't auto-review any edits or new pages |
65 | | -# FR_AUTOREVIEW_CHANGES |
66 | | -# Auto-review the following types of edits (to existing pages): |
67 | | -# (a) changes directly to the stable version by users with 'autoreview'/'bot' |
68 | | -# (b) reversions to old reviewed versions by users with 'autoreview'/'bot' |
69 | | -# (c) self-reversions back to the stable version by any user |
70 | | -# FR_AUTOREVIEW_CREATION |
71 | | -# Auto-review new pages as minimally "checked" |
72 | | -# FR_AUTOREVIEW_CREATION_AND_CHANGES |
73 | | -# Combines FR_AUTOREVIEW_CHANGES and FR_AUTOREVIEW_CREATION |
74 | | -$wgFlaggedRevsAutoReview = FR_AUTOREVIEW_CREATION_AND_CHANGES; |
75 | | - |
76 | | -# Define the tags we can use to rate an article, number of levels, |
77 | | -# and set the minimum level to have it become a "quality" or "pristine" version. |
78 | | -# NOTE: When setting up new dimensions or levels, you will need to add some |
79 | | -# MediaWiki messages for the UI to show properly; any sysop can do this. |
80 | | -$wgFlaggedRevsTags = array( |
81 | | - 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ), |
82 | | - 'depth' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
83 | | - 'style' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
84 | | -); |
85 | | -# For each tag, define the highest tag level that is unlocked by |
86 | | -# having certain rights. For example, having 'review' rights may |
87 | | -# allow for "depth" to be rated up to second level. |
88 | | -# NOTE: Users cannot lower revision tags from a level they can't set. |
89 | | -# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels. |
90 | | -$wgFlaggedRevsTagsRestrictions = array( |
91 | | - 'accuracy' => array( 'review' => 1, 'autoreview' => 1 ), |
92 | | - 'depth' => array( 'review' => 2, 'autoreview' => 2 ), |
93 | | - 'style' => array( 'review' => 3, 'autoreview' => 3 ), |
94 | | -); |
95 | | -# For each tag, what is the highest level that it can be auto-reviewed to? |
96 | | -# $wgFlaggedRevsAutoReview must be enabled for this to apply. |
97 | | -$wgFlaggedRevsTagsAuto = array( |
98 | | - 'accuracy' => 1, 'depth' => 1, 'style' => 1 |
99 | | -); |
100 | | - |
101 | | -# Restriction levels for 'autoreview'/'review' rights. |
102 | | -# When a level is selected for a page, an edit made by a user |
103 | | -# will not be auto-reviewed if the user lacks the specified permission. |
104 | | -# Levels are set at the Stabilization special page. |
105 | | -$wgFlaggedRevsRestrictionLevels = array( '', 'sysop' ); |
106 | | -# Set this to use FlaggedRevs *only* as a protection-like mechanism. |
107 | | -# This will disable Stabilization and show the above restriction levels |
108 | | -# on the protection form of pages. Each level has the stable version shown by default. |
109 | | -# A "none" level will appear in the form as well, to disable the review process. |
110 | | -# Pages will only be reviewable if manually restricted to a level above "none". |
111 | | -$wgFlaggedRevsProtection = false; |
112 | | - |
113 | | -# Define our basic reviewer class of established editors (Editors) |
114 | | -$wgGroupPermissions['editor']['review'] = true; |
115 | | -$wgGroupPermissions['editor']['autoreview'] = true; |
116 | | -$wgGroupPermissions['editor']['autoconfirmed'] = true; |
117 | | -$wgGroupPermissions['editor']['unreviewedpages'] = true; |
118 | | - |
119 | | -# Define when users get automatically promoted to Editors. Set as false to disable. |
120 | | -# Once users meet these requirements they will be promoted, unless previously demoted. |
121 | | -$wgFlaggedRevsAutopromote = array( |
122 | | - 'days' => 60, # days since registration |
123 | | - 'edits' => 250, # total edit count |
124 | | - 'excludeLastDays' => 1, # exclude the last X days of edits from edit counts |
125 | | - 'benchmarks' => 15, # number of "spread out" edits |
126 | | - 'spacing' => 3, # number of days between these edits (the "spread") |
127 | | - // Either totalContentEdits reqs OR totalCheckedEdits requirements needed |
128 | | - 'totalContentEdits' => 300, # edits to pages in $wgContentNamespaces |
129 | | - 'totalCheckedEdits' => 200, # edits before the stable version of pages |
130 | | - 'uniqueContentPages' => 14, # unique pages in $wgContentNamespaces edited |
131 | | - 'editComments' => 50, # number of manual edit summaries used |
132 | | - 'userpageBytes' => 0, # size of userpage (use 0 to not require a userpage) |
133 | | - 'neverBlocked' => true, # username was never blocked before? |
134 | | - 'maxRevertedEditRatio' => .03, # max fraction of edits reverted via "rollback"/"undo" |
135 | | -); |
136 | | - |
137 | | -# Define when users get to have their own edits auto-reviewed. Set to false to disable. |
138 | | -# This can be used for newer, semi-trusted users to improve workflow. |
139 | | -# It is done by granting some users the implicit 'autoreview' group. |
140 | | -$wgFlaggedRevsAutoconfirm = false; |
141 | | -/* (example usage) |
142 | | -$wgFlaggedRevsAutoconfirm = array( |
143 | | - 'days' => 30, # days since registration |
144 | | - 'edits' => 50, # total edit count |
145 | | - 'benchmarks' => 7, # number of "spread out" edits |
146 | | - 'spacing' => 3, # number of days between these edits (the "spread") |
147 | | - // Either totalContentEdits reqs OR totalCheckedEdits requirements needed |
148 | | - 'totalContentEdits' => 150, # $wgContentNamespaces edits OR... |
149 | | - 'totalCheckedEdits' => 50, # ...Edits before the stable version of pages |
150 | | - 'uniqueContentPages' => 8, # $wgContentNamespaces unique pages edited |
151 | | - 'editComments' => 20, # how many edit comments used? |
152 | | - 'email' => false, # user must be emailconfirmed? |
153 | | - 'neverBlocked' => true, # Can users that were blocked be promoted? |
154 | | -); |
155 | | -*/ |
156 | | - |
157 | | -# Defines extra rights for advanced reviewer class (Reviewers) |
158 | | -$wgGroupPermissions['reviewer']['validate'] = true; |
159 | | -# Let this stand alone just in case... |
160 | | -$wgGroupPermissions['reviewer']['review'] = true; |
161 | | -$wgGroupPermissions['reviewer']['autoreview'] = true; |
162 | | -$wgGroupPermissions['reviewer']['autoconfirmed'] = true; |
163 | | -$wgGroupPermissions['reviewer']['unreviewedpages'] = true; |
164 | | - |
165 | | -# Sysops have their edits autoreviewed |
166 | | -$wgGroupPermissions['sysop']['autoreview'] = true; |
167 | | -# Stable version selection and default page revision selection can be set per page. |
168 | | -$wgGroupPermissions['sysop']['stablesettings'] = true; |
169 | | -# Sysops can always move stable pages |
170 | | -$wgGroupPermissions['sysop']['movestable'] = true; |
171 | | - |
172 | | -# Special:Userrights settings |
173 | | -# # Basic rights for Sysops |
174 | | -$wgAddGroups['sysop'][] = 'editor'; |
175 | | -$wgRemoveGroups['sysop'][] = 'editor'; |
176 | | -# # Extra ones for Bureaucrats (@TODO: remove this) |
177 | | -$wgAddGroups['bureaucrat'][] = 'reviewer'; |
178 | | -$wgRemoveGroups['bureaucrat'][] = 'reviewer'; |
179 | | - |
180 | | -# How far the logs for overseeing quality revisions and depreciations go |
181 | | -$wgFlaggedRevsOversightAge = 30 * 24 * 3600; |
182 | | - |
183 | | -# How long before Special:ValidationStatistics is updated. |
184 | | -# Set to false to disable (perhaps using a cron job instead). |
185 | | -$wgFlaggedRevsStatsAge = 2 * 3600; // 2 hours |
186 | | - |
187 | | -# Configurable information to collect and display at Special:ValidationStatistics |
188 | | -$wgFlaggedRevsStats = array( |
189 | | - 'topReviewersCount' => 5, # how many top reviewers to list |
190 | | - 'topReviewersHours' => 1, # how many hours of the last reviews to count |
191 | | -); |
192 | | - |
193 | | -# How to handle templates and files used in stable versions: |
194 | | -# FR_INCLUDES_CURRENT |
195 | | -# Always use the current version of templates/files |
196 | | -# FR_INCLUDES_FREEZE |
197 | | -# Use the version of templates/files that the page used when reviewed |
198 | | -# FR_INCLUDES_STABLE |
199 | | -# For each template/file, check if a version of it was used when the page was reviewed |
200 | | -# and if the template/file itself has a stable version; use the newest those versions |
201 | | -# NOTE: We may have templates that do not have stable version. Also, given situational |
202 | | -# inclusion of templates (e.g. parser functions selecting template X or Y based on date), |
203 | | -# there may also be no "review time version" revision ID for a template used on a page. |
204 | | -# In such cases, we select the current (unreviewed) revision. Likewise for files. |
205 | | -$wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE; |
206 | | - |
207 | | -# End of configuration variables. |
208 | | -# ######## |
209 | | - |
210 | 41 | # This messes with dump HTML... |
211 | 42 | if ( defined( 'MW_HTML_FOR_DUMP' ) ) { |
212 | 43 | return; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.config.php |
— | — | @@ -0,0 +1,173 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +# ######## Configuration variables ######## |
| 5 | +# IMPORTANT: DO NOT EDIT THIS FILE |
| 6 | +# When configuring globals, set them at LocalSettings.php instead |
| 7 | + |
| 8 | +# This will only distinguish "checked", "quality", and unreviewed |
| 9 | +# A small icon will show in the upper right hand corner |
| 10 | +$wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready |
| 11 | +# For visitors, only show tags/icons for unreviewed/outdated pages |
| 12 | +$wgFlaggedRevsLowProfile = true; // @TODO: remove with new icon UI? |
| 13 | + |
| 14 | +# Allowed namespaces of reviewable pages |
| 15 | +$wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE ); |
| 16 | +# Pages exempt from reviewing. No flagging UI will be shown for them. |
| 17 | +$wgFlaggedRevsWhitelist = array(); |
| 18 | +# $wgFlaggedRevsWhitelist = array( 'Main_Page' ); |
| 19 | + |
| 20 | +# Is a "stable version" used as the default display |
| 21 | +# version for all pages in reviewable namespaces? |
| 22 | +$wgFlaggedRevsOverride = true; |
| 23 | +# Below are groups that see the current revision by default. |
| 24 | +# This makes editing easier since the users always start off |
| 25 | +# viewing the latest version of pages. |
| 26 | +$wgFlaggedRevsExceptions = array( 'user' ); // @TODO: remove when ready (and expand pref) |
| 27 | + |
| 28 | +# Auto-review settings for edits/new pages: |
| 29 | +# FR_AUTOREVIEW_NONE |
| 30 | +# Don't auto-review any edits or new pages |
| 31 | +# FR_AUTOREVIEW_CHANGES |
| 32 | +# Auto-review the following types of edits (to existing pages): |
| 33 | +# (a) changes directly to the stable version by users with 'autoreview'/'bot' |
| 34 | +# (b) reversions to old reviewed versions by users with 'autoreview'/'bot' |
| 35 | +# (c) self-reversions back to the stable version by any user |
| 36 | +# FR_AUTOREVIEW_CREATION |
| 37 | +# Auto-review new pages as minimally "checked" |
| 38 | +# FR_AUTOREVIEW_CREATION_AND_CHANGES |
| 39 | +# Combines FR_AUTOREVIEW_CHANGES and FR_AUTOREVIEW_CREATION |
| 40 | +$wgFlaggedRevsAutoReview = FR_AUTOREVIEW_CREATION_AND_CHANGES; |
| 41 | + |
| 42 | +# Define the tags we can use to rate an article, number of levels, |
| 43 | +# and set the minimum level to have it become a "quality" or "pristine" version. |
| 44 | +# NOTE: When setting up new dimensions or levels, you will need to add some |
| 45 | +# MediaWiki messages for the UI to show properly; any sysop can do this. |
| 46 | +$wgFlaggedRevsTags = array( |
| 47 | + 'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ), |
| 48 | + 'depth' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
| 49 | + 'style' => array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ), |
| 50 | +); |
| 51 | +# For each tag, define the highest tag level that is unlocked by |
| 52 | +# having certain rights. For example, having 'review' rights may |
| 53 | +# allow for "depth" to be rated up to second level. |
| 54 | +# NOTE: Users cannot lower revision tags from a level they can't set. |
| 55 | +# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels. |
| 56 | +$wgFlaggedRevsTagsRestrictions = array( |
| 57 | + 'accuracy' => array( 'review' => 1, 'autoreview' => 1 ), |
| 58 | + 'depth' => array( 'review' => 2, 'autoreview' => 2 ), |
| 59 | + 'style' => array( 'review' => 3, 'autoreview' => 3 ), |
| 60 | +); |
| 61 | +# For each tag, what is the highest level that it can be auto-reviewed to? |
| 62 | +# $wgFlaggedRevsAutoReview must be enabled for this to apply. |
| 63 | +$wgFlaggedRevsTagsAuto = array( |
| 64 | + 'accuracy' => 1, 'depth' => 1, 'style' => 1 |
| 65 | +); |
| 66 | + |
| 67 | +# Restriction levels for 'autoreview'/'review' rights. |
| 68 | +# When a level is selected for a page, an edit made by a user |
| 69 | +# will not be auto-reviewed if the user lacks the specified permission. |
| 70 | +# Levels are set at the Stabilization special page. |
| 71 | +$wgFlaggedRevsRestrictionLevels = array( '', 'sysop' ); |
| 72 | +# Set this to use FlaggedRevs *only* as a protection-like mechanism. |
| 73 | +# This will disable Stabilization and show the above restriction levels |
| 74 | +# on the protection form of pages. Each level has the stable version shown by default. |
| 75 | +# A "none" level will appear in the form as well, to disable the review process. |
| 76 | +# Pages will only be reviewable if manually restricted to a level above "none". |
| 77 | +$wgFlaggedRevsProtection = false; |
| 78 | + |
| 79 | +# Define our basic reviewer class of established editors (Editors) |
| 80 | +$wgGroupPermissions['editor']['review'] = true; |
| 81 | +$wgGroupPermissions['editor']['autoreview'] = true; |
| 82 | +$wgGroupPermissions['editor']['autoconfirmed'] = true; |
| 83 | +$wgGroupPermissions['editor']['unreviewedpages'] = true; |
| 84 | + |
| 85 | +# Define when users get automatically promoted to Editors. Set as false to disable. |
| 86 | +# Once users meet these requirements they will be promoted, unless previously demoted. |
| 87 | +$wgFlaggedRevsAutopromote = array( |
| 88 | + 'days' => 60, # days since registration |
| 89 | + 'edits' => 250, # total edit count |
| 90 | + 'excludeLastDays' => 1, # exclude the last X days of edits from edit counts |
| 91 | + 'benchmarks' => 15, # number of "spread out" edits |
| 92 | + 'spacing' => 3, # number of days between these edits (the "spread") |
| 93 | + // Either totalContentEdits reqs OR totalCheckedEdits requirements needed |
| 94 | + 'totalContentEdits' => 300, # edits to pages in $wgContentNamespaces |
| 95 | + 'totalCheckedEdits' => 200, # edits before the stable version of pages |
| 96 | + 'uniqueContentPages' => 14, # unique pages in $wgContentNamespaces edited |
| 97 | + 'editComments' => 50, # number of manual edit summaries used |
| 98 | + 'userpageBytes' => 0, # size of userpage (use 0 to not require a userpage) |
| 99 | + 'neverBlocked' => true, # username was never blocked before? |
| 100 | + 'maxRevertedEditRatio' => .03, # max fraction of edits reverted via "rollback"/"undo" |
| 101 | +); |
| 102 | + |
| 103 | +# Define when users get to have their own edits auto-reviewed. Set to false to disable. |
| 104 | +# This can be used for newer, semi-trusted users to improve workflow. |
| 105 | +# It is done by granting some users the implicit 'autoreview' group. |
| 106 | +$wgFlaggedRevsAutoconfirm = false; |
| 107 | +/* (example usage) |
| 108 | +$wgFlaggedRevsAutoconfirm = array( |
| 109 | + 'days' => 30, # days since registration |
| 110 | + 'edits' => 50, # total edit count |
| 111 | + 'benchmarks' => 7, # number of "spread out" edits |
| 112 | + 'spacing' => 3, # number of days between these edits (the "spread") |
| 113 | + // Either totalContentEdits reqs OR totalCheckedEdits requirements needed |
| 114 | + 'totalContentEdits' => 150, # $wgContentNamespaces edits OR... |
| 115 | + 'totalCheckedEdits' => 50, # ...Edits before the stable version of pages |
| 116 | + 'uniqueContentPages' => 8, # $wgContentNamespaces unique pages edited |
| 117 | + 'editComments' => 20, # how many edit comments used? |
| 118 | + 'email' => false, # user must be emailconfirmed? |
| 119 | + 'neverBlocked' => true, # Can users that were blocked be promoted? |
| 120 | +); |
| 121 | +*/ |
| 122 | + |
| 123 | +# Defines extra rights for advanced reviewer class (Reviewers) |
| 124 | +$wgGroupPermissions['reviewer']['validate'] = true; |
| 125 | +# Let this stand alone just in case... |
| 126 | +$wgGroupPermissions['reviewer']['review'] = true; |
| 127 | +$wgGroupPermissions['reviewer']['autoreview'] = true; |
| 128 | +$wgGroupPermissions['reviewer']['autoconfirmed'] = true; |
| 129 | +$wgGroupPermissions['reviewer']['unreviewedpages'] = true; |
| 130 | + |
| 131 | +# Sysops have their edits autoreviewed |
| 132 | +$wgGroupPermissions['sysop']['autoreview'] = true; |
| 133 | +# Stable version selection and default page revision selection can be set per page. |
| 134 | +$wgGroupPermissions['sysop']['stablesettings'] = true; |
| 135 | +# Sysops can always move stable pages |
| 136 | +$wgGroupPermissions['sysop']['movestable'] = true; |
| 137 | + |
| 138 | +# Special:Userrights settings |
| 139 | +# # Basic rights for Sysops |
| 140 | +$wgAddGroups['sysop'][] = 'editor'; |
| 141 | +$wgRemoveGroups['sysop'][] = 'editor'; |
| 142 | +# # Extra ones for Bureaucrats (@TODO: remove this) |
| 143 | +$wgAddGroups['bureaucrat'][] = 'reviewer'; |
| 144 | +$wgRemoveGroups['bureaucrat'][] = 'reviewer'; |
| 145 | + |
| 146 | +# How far the logs for overseeing quality revisions and depreciations go |
| 147 | +$wgFlaggedRevsOversightAge = 30 * 24 * 3600; |
| 148 | + |
| 149 | +# How long before Special:ValidationStatistics is updated. |
| 150 | +# Set to false to disable (perhaps using a cron job instead). |
| 151 | +$wgFlaggedRevsStatsAge = 2 * 3600; // 2 hours |
| 152 | + |
| 153 | +# Configurable information to collect and display at Special:ValidationStatistics |
| 154 | +$wgFlaggedRevsStats = array( |
| 155 | + 'topReviewersCount' => 5, # how many top reviewers to list |
| 156 | + 'topReviewersHours' => 1, # how many hours of the last reviews to count |
| 157 | +); |
| 158 | + |
| 159 | +# How to handle templates and files used in stable versions: |
| 160 | +# FR_INCLUDES_CURRENT |
| 161 | +# Always use the current version of templates/files |
| 162 | +# FR_INCLUDES_FREEZE |
| 163 | +# Use the version of templates/files that the page used when reviewed |
| 164 | +# FR_INCLUDES_STABLE |
| 165 | +# For each template/file, check if a version of it was used when the page was reviewed |
| 166 | +# and if the template/file itself has a stable version; use the newest those versions |
| 167 | +# NOTE: We may have templates that do not have stable version. Also, given situational |
| 168 | +# inclusion of templates (e.g. parser functions selecting template X or Y based on date), |
| 169 | +# there may also be no "review time version" revision ID for a template used on a page. |
| 170 | +# In such cases, we select the current (unreviewed) revision. Likewise for files. |
| 171 | +$wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE; |
| 172 | + |
| 173 | +# End of configuration variables. |
| 174 | +# ######## |
Property changes on: trunk/extensions/FlaggedRevs/FlaggedRevs.config.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 175 | + native |
Added: svn:keywords |
2 | 176 | + LastChangedDate LastChangedRevision |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.defines.php |
— | — | @@ -0,0 +1,43 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | +* Defines global constants, some of which are used in LocalSettings.php |
| 5 | +*/ |
| 6 | + |
| 7 | +# Query SELECT parameters... |
| 8 | +define( 'FR_FOR_UPDATE', 1 ); |
| 9 | +define( 'FR_MASTER', 2 ); |
| 10 | + |
| 11 | +# Review tier constants... |
| 12 | +define( 'FR_CHECKED', 0 ); // "basic"/"checked" |
| 13 | +define( 'FR_QUALITY', 1 ); |
| 14 | +define( 'FR_PRISTINE', 2 ); |
| 15 | + |
| 16 | +# Inclusion (templates/files) settings |
| 17 | +define( 'FR_INCLUDES_CURRENT', 0 ); |
| 18 | +define( 'FR_INCLUDES_FREEZE', 1 ); |
| 19 | +define( 'FR_INCLUDES_STABLE', 2 ); |
| 20 | + |
| 21 | +# Autoreview settings for priviledged users |
| 22 | +define( 'FR_AUTOREVIEW_NONE', 0 ); |
| 23 | +define( 'FR_AUTOREVIEW_CHANGES', 1 ); |
| 24 | +define( 'FR_AUTOREVIEW_CREATION', 2 ); |
| 25 | +define( 'FR_AUTOREVIEW_CREATION_AND_CHANGES', FR_AUTOREVIEW_CHANGES | FR_AUTOREVIEW_CREATION ); |
| 26 | + |
| 27 | +# User preference for showing stable versions |
| 28 | +define( 'FR_SHOW_STABLE_DEFAULT', 0 ); // b/c with "false" |
| 29 | +define( 'FR_SHOW_STABLE_ALWAYS', 1 ); // b/c with "true" |
| 30 | +define( 'FR_SHOW_STABLE_NEVER', 2 ); |
| 31 | + |
| 32 | +# Autopromote conds (F=70,R=82) |
| 33 | +# @TODO: move these 6 to core |
| 34 | +define( 'APCOND_FR_EDITSUMMARYCOUNT', 70821 ); |
| 35 | +define( 'APCOND_FR_NEVERBOCKED', 70822 ); |
| 36 | +define( 'APCOND_FR_UNIQUEPAGECOUNT', 70823 ); |
| 37 | +define( 'APCOND_FR_CONTENTEDITCOUNT', 70824 ); |
| 38 | +define( 'APCOND_FR_USERPAGEBYTES', 70825 ); |
| 39 | +define( 'APCOND_FR_EDITCOUNT', 70826 ); |
| 40 | + |
| 41 | +define( 'APCOND_FR_EDITSPACING', 70827 ); |
| 42 | +define( 'APCOND_FR_CHECKEDEDITCOUNT', 70828 ); |
| 43 | +define( 'APCOND_FR_MAXREVERTEDEDITRATIO', 70829 ); |
| 44 | +define( 'APCOND_FR_NEVERDEMOTED', 70830 ); |
Property changes on: trunk/extensions/FlaggedRevs/FlaggedRevs.defines.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 45 | + native |