r39630 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39629‎ | r39630 | r39631 >
Date:02:36, 19 August 2008
Author:aaron
Status:old
Tags:
Comment:
try not to add unusable special pages
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -272,57 +272,46 @@
273273 $wgAutoloadClasses['FlaggedArticle'] = $dir . 'FlaggedArticle.php';
274274 # Load FlaggedRevision object class
275275 $wgAutoloadClasses['FlaggedRevision'] = $dir . 'FlaggedRevision.php';
 276+
276277 # Load review UI
277 -$wgSpecialPages['RevisionReview'] = 'RevisionReview';
278278 $wgAutoloadClasses['RevisionReview'] = $dir . 'specialpages/RevisionReview_body.php';
279279 # Load reader feedback UI
280 -$wgSpecialPages['ReaderFeedback'] = 'ReaderFeedback';
281280 $wgAutoloadClasses['ReaderFeedback'] = $dir . 'specialpages/ReaderFeedback_body.php';
282281
283282 # Load stableversions UI
284 -$wgSpecialPages['StableVersions'] = 'StableVersions';
285283 $wgAutoloadClasses['StableVersions'] = $dir . 'specialpages/StableVersions_body.php';
286284 $wgExtensionMessagesFiles['StableVersions'] = $langDir . 'StableVersions.i18n.php';
287285 # Stable version config
288 -$wgSpecialPages['Stabilization'] = 'Stabilization';
289286 $wgAutoloadClasses['Stabilization'] = $dir . 'specialpages/Stabilization_body.php';
290287 $wgExtensionMessagesFiles['Stabilization'] = $langDir . 'Stabilization.i18n.php';
291288 # Page rating history
292 -$wgSpecialPages['RatingHistory'] = 'RatingHistory';
293289 $wgAutoloadClasses['RatingHistory'] = $dir . 'specialpages/RatingHistory_body.php';
294290 $wgExtensionMessagesFiles['RatingHistory'] = $langDir . 'RatingHistory.i18n.php';
295291 # Load unreviewed pages list
296 -$wgSpecialPages['UnreviewedPages'] = 'UnreviewedPages';
297292 $wgAutoloadClasses['UnreviewedPages'] = $dir . 'specialpages/UnreviewedPages_body.php';
298293 $wgExtensionMessagesFiles['UnreviewedPages'] = $langDir . 'UnreviewedPages.i18n.php';
299294 $wgSpecialPageGroups['UnreviewedPages'] = 'quality';
300295 # Load "in need of re-review" pages list
301 -$wgSpecialPages['OldReviewedPages'] = 'OldReviewedPages';
302296 $wgAutoloadClasses['OldReviewedPages'] = $dir . 'specialpages/OldReviewedPages_body.php';
303297 $wgExtensionMessagesFiles['OldReviewedPages'] = $langDir . 'OldReviewedPages.i18n.php';
304298 $wgSpecialPageGroups['OldReviewedPages'] = 'quality';
305299 # Load reviewed pages list
306 -$wgSpecialPages['ReviewedPages'] = 'ReviewedPages';
307300 $wgAutoloadClasses['ReviewedPages'] = $dir . 'specialpages/ReviewedPages_body.php';
308301 $wgExtensionMessagesFiles['ReviewedPages'] = $langDir . 'ReviewedPages.i18n.php';
309302 $wgSpecialPageGroups['ReviewedPages'] = 'quality';
310303 # Load stable pages list
311 -$wgSpecialPages['StablePages'] = 'StablePages';
312304 $wgAutoloadClasses['StablePages'] = $dir . 'specialpages/StablePages_body.php';
313305 $wgExtensionMessagesFiles['StablePages'] = $langDir . 'StablePages.i18n.php';
314306 $wgSpecialPageGroups['StablePages'] = 'quality';
315307 # To oversee quality revisions
316 -$wgSpecialPages['QualityOversight'] = 'QualityOversight';
317308 $wgAutoloadClasses['QualityOversight'] = $dir . 'specialpages/QualityOversight_body.php';
318309 $wgExtensionMessagesFiles['QualityOversight'] = $langDir . 'QualityOversight.i18n.php';
319310 $wgSpecialPageGroups['QualityOversight'] = 'quality';
320311 # To oversee quality revisions
321 -$wgSpecialPages['ProblemPages'] = 'ProblemPages';
322312 $wgAutoloadClasses['ProblemPages'] = $dir . 'specialpages/ProblemPages_body.php';
323313 $wgExtensionMessagesFiles['ProblemPages'] = $langDir . 'ProblemPages.i18n.php';
324314 $wgSpecialPageGroups['ProblemPages'] = 'quality';
325315 # Statistics
326 -$wgSpecialPages['ValidationStatistics'] = 'ValidationStatistics';
327316 $wgAutoloadClasses['ValidationStatistics'] = $dir . 'specialpages/ValidationStatistics_body.php';
328317 $wgExtensionMessagesFiles['ValidationStatistics'] = $langDir . 'ValidationStatistics.i18n.php';
329318 $wgSpecialPageGroups['ValidationStatistics'] = 'quality';
@@ -411,11 +400,26 @@
412401 #########
413402
414403 function efLoadFlaggedRevs() {
415 - global $wgUseRCPatrol;
416 - // wfLoadExtensionMessages( 'FlaggedRevs' );
 404+ global $wgUseRCPatrol, $wgSpecialPages, $wgFlaggedRevsNamespaces, $wgFeedbackNamespaces;
417405 # Use RC Patrolling to check for vandalism
418406 # When revisions are flagged, they count as patrolled
419407 $wgUseRCPatrol = true;
 408+ if( !empty($wgFlaggedRevsNamespaces) ) {
 409+ $wgSpecialPages['RevisionReview'] = 'RevisionReview';
 410+ $wgSpecialPages['StableVersions'] = 'StableVersions';
 411+ $wgSpecialPages['Stabilization'] = 'Stabilization';
 412+ $wgSpecialPages['UnreviewedPages'] = 'UnreviewedPages';
 413+ $wgSpecialPages['OldReviewedPages'] = 'OldReviewedPages';
 414+ $wgSpecialPages['ReviewedPages'] = 'ReviewedPages';
 415+ $wgSpecialPages['StablePages'] = 'StablePages';
 416+ $wgSpecialPages['QualityOversight'] = 'QualityOversight';
 417+ $wgSpecialPages['ValidationStatistics'] = 'ValidationStatistics';
 418+ }
 419+ if( !empty($wgFeedbackNamespaces) ) {
 420+ $wgSpecialPages['ReaderFeedback'] = 'ReaderFeedback';
 421+ $wgSpecialPages['RatingHistory'] = 'RatingHistory';
 422+ $wgSpecialPages['ProblemPages'] = 'ProblemPages';
 423+ }
420424 }
421425
422426 # Add review log

Status & tagging log