Index: trunk/extensions/FlaggedRevs/presentation/FlaggedRevsUI.setup.php |
— | — | @@ -7,47 +7,47 @@ |
8 | 8 | * Register FlaggedRevs special pages as needed. |
9 | 9 | * @param $pages Array $wgSpecialPages (list of special pages) |
10 | 10 | * @param $groups Array $wgSpecialPageGroups (assoc array of special page groups) |
| 11 | + * @return void |
11 | 12 | */ |
12 | 13 | public static function defineSpecialPages( array &$pages, array &$groups ) { |
13 | 14 | global $wgUseTagFilter; |
14 | 15 | // Show special pages only if FlaggedRevs is enabled on some namespaces |
15 | | - if ( !FlaggedRevs::getReviewNamespaces() ) { |
16 | | - return true; |
| 16 | + if ( FlaggedRevs::getReviewNamespaces() ) { |
| 17 | + $pages['RevisionReview'] = 'RevisionReview'; // unlisted |
| 18 | + $pages['ReviewedVersions'] = 'ReviewedVersions'; // unlisted |
| 19 | + $pages['PendingChanges'] = 'PendingChanges'; |
| 20 | + $groups['PendingChanges'] = 'quality'; |
| 21 | + // Show tag filtered pending edit page if there are tags |
| 22 | + if ( $wgUseTagFilter ) { |
| 23 | + $pages['ProblemChanges'] = 'ProblemChanges'; |
| 24 | + $groups['ProblemChanges'] = 'quality'; |
| 25 | + } |
| 26 | + if ( !FlaggedRevs::useOnlyIfProtected() ) { |
| 27 | + $pages['ReviewedPages'] = 'ReviewedPages'; |
| 28 | + $groups['ReviewedPages'] = 'quality'; |
| 29 | + $pages['UnreviewedPages'] = 'UnreviewedPages'; |
| 30 | + $groups['UnreviewedPages'] = 'quality'; |
| 31 | + } |
| 32 | + $pages['QualityOversight'] = 'QualityOversight'; |
| 33 | + $groups['QualityOversight'] = 'quality'; |
| 34 | + $pages['ValidationStatistics'] = 'ValidationStatistics'; |
| 35 | + $groups['ValidationStatistics'] = 'quality'; |
| 36 | + // Protect levels define allowed stability settings |
| 37 | + if ( FlaggedRevs::useProtectionLevels() ) { |
| 38 | + $pages['StablePages'] = 'StablePages'; |
| 39 | + $groups['StablePages'] = 'quality'; |
| 40 | + } else { |
| 41 | + $pages['ConfiguredPages'] = 'ConfiguredPages'; |
| 42 | + $groups['ConfiguredPages'] = 'quality'; |
| 43 | + $pages['Stabilization'] = 'Stabilization'; // unlisted |
| 44 | + } |
17 | 45 | } |
18 | | - $pages['RevisionReview'] = 'RevisionReview'; // unlisted |
19 | | - $pages['ReviewedVersions'] = 'ReviewedVersions'; // unlisted |
20 | | - $pages['PendingChanges'] = 'PendingChanges'; |
21 | | - $groups['PendingChanges'] = 'quality'; |
22 | | - // Show tag filtered pending edit page if there are tags |
23 | | - if ( $wgUseTagFilter ) { |
24 | | - $pages['ProblemChanges'] = 'ProblemChanges'; |
25 | | - $groups['ProblemChanges'] = 'quality'; |
26 | | - } |
27 | | - if ( !FlaggedRevs::useOnlyIfProtected() ) { |
28 | | - $pages['ReviewedPages'] = 'ReviewedPages'; |
29 | | - $groups['ReviewedPages'] = 'quality'; |
30 | | - $pages['UnreviewedPages'] = 'UnreviewedPages'; |
31 | | - $groups['UnreviewedPages'] = 'quality'; |
32 | | - } |
33 | | - $pages['QualityOversight'] = 'QualityOversight'; |
34 | | - $groups['QualityOversight'] = 'quality'; |
35 | | - $pages['ValidationStatistics'] = 'ValidationStatistics'; |
36 | | - $groups['ValidationStatistics'] = 'quality'; |
37 | | - // Protect levels define allowed stability settings |
38 | | - if ( FlaggedRevs::useProtectionLevels() ) { |
39 | | - $pages['StablePages'] = 'StablePages'; |
40 | | - $groups['StablePages'] = 'quality'; |
41 | | - } else { |
42 | | - $pages['ConfiguredPages'] = 'ConfiguredPages'; |
43 | | - $groups['ConfiguredPages'] = 'quality'; |
44 | | - $pages['Stabilization'] = 'Stabilization'; // unlisted |
45 | | - } |
46 | | - return true; |
47 | 46 | } |
48 | 47 | |
49 | 48 | /** |
50 | 49 | * Append FlaggedRevs resource module definitions |
51 | | - * @param $modules Array $wgResourceModules |
| 50 | + * @param $modules Array $wgResourceModules (list of modules) |
| 51 | + * @return void |
52 | 52 | */ |
53 | 53 | public static function defineResourceModules( &$modules ) { |
54 | 54 | $localModulePath = dirname( __FILE__ ) . '/modules/'; |
— | — | @@ -90,8 +90,8 @@ |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Append FlaggedRevs log names and set filterable logs |
94 | | - * @param $logNames Array $wgLogNames |
95 | | - * @param $logHeaders Array $wgLogHeaders |
| 94 | + * @param $logNames Array $wgLogNames (assoc array of log name message keys) |
| 95 | + * @param $logHeaders Array $wgLogHeaders (assoc array of log header message keys) |
96 | 96 | * @param $filterLogTypes Array $wgFilterLogTypes |
97 | 97 | */ |
98 | 98 | public static function defineLogBasicDescription( &$logNames, &$logHeaders, &$filterLogTypes ) { |
— | — | @@ -106,8 +106,9 @@ |
107 | 107 | |
108 | 108 | /** |
109 | 109 | * Append FlaggedRevs log action handlers |
110 | | - * @param $logActions Array $wgLogActions |
111 | | - * @param $logActionsHandlers Array $wgLogActionsHandlers |
| 110 | + * @param $logActions Array $wgLogActions (assoc array of log action message keys) |
| 111 | + * @param $logActionsHandlers Array $wgLogActionsHandlers (assoc array of log handlers) |
| 112 | + * @return void |
112 | 113 | */ |
113 | 114 | public static function defineLogActionHanders( &$logActions, &$logActionsHandlers ) { |
114 | 115 | # Various actions are used for log filtering ... |