Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -403,7 +403,7 @@ |
404 | 404 | $wgAutoloadClasses['ApiStabilize'] = $dir . 'api/ApiStabilize.php'; |
405 | 405 | $wgAPIModules['stabilize'] = 'ApiStabilize'; |
406 | 406 | |
407 | | -# ######## Hook attachments ######### |
| 407 | +# ######## Hook triggered data operations ######### |
408 | 408 | # Autopromote Editors |
409 | 409 | $wgHooks['ArticleSaveComplete'][] = 'FlaggedRevsHooks::maybeMakeEditor'; |
410 | 410 | # Adds table link references to include ones from the stable version |
— | — | @@ -432,6 +432,25 @@ |
433 | 433 | $wgHooks['LogLine'][] = 'FlaggedRevsHooks::logLineLinks'; |
434 | 434 | # Disable auto-promotion for demoted users |
435 | 435 | $wgHooks['UserRights'][] = 'FlaggedRevsHooks::recordDemote'; |
| 436 | +# User stats |
| 437 | +$wgHooks['ArticleRollbackComplete'][] = 'FlaggedRevsHooks::incrementRollbacks'; |
| 438 | +$wgHooks['NewRevisionFromEditComplete'][] = 'FlaggedRevsHooks::incrementReverts'; |
| 439 | +# Null edit review via checkbox |
| 440 | +$wgHooks['ArticleSaveComplete'][] = 'FlaggedRevsHooks::maybeNullEditReview'; |
| 441 | +# Special auto-promote |
| 442 | +$wgHooks['GetAutoPromoteGroups'][] = 'FlaggedRevsHooks::checkAutoPromote'; |
| 443 | +# Save stability settings |
| 444 | +$wgHooks['ProtectionForm::save'][] = 'FlaggedRevsHooks::onProtectionSave'; |
| 445 | + |
| 446 | +# Actually register special pages |
| 447 | +$wgHooks['SpecialPage_initList'][] = 'efLoadFlaggedRevsSpecialPages'; |
| 448 | + |
| 449 | +# Stable dump hook |
| 450 | +$wgHooks['WikiExporter::dumpStableQuery'][] = 'FlaggedRevsHooks::stableDumpQuery'; |
| 451 | +# ######## |
| 452 | + |
| 453 | + |
| 454 | +# ######## Hook triggered UI operations ######### |
436 | 455 | # Local user account preference |
437 | 456 | $wgHooks['GetPreferences'][] = 'FlaggedRevsHooks::onGetPreferences'; |
438 | 457 | # Show unreviewed pages links |
— | — | @@ -459,7 +478,6 @@ |
460 | 479 | # Add protection form field |
461 | 480 | $wgHooks['ProtectionForm::buildForm'][] = 'FlaggedRevsHooks::onProtectionForm'; |
462 | 481 | $wgHooks['ProtectionForm::showLogExtract'][] = 'FlaggedRevsHooks::insertStabilityLog'; |
463 | | -$wgHooks['ProtectionForm::save'][] = 'FlaggedRevsHooks::onProtectionSave'; |
464 | 482 | # Mark items in page history |
465 | 483 | $wgHooks['PageHistoryPager::getQueryInfo'][] = 'FlaggedRevsHooks::addToHistQuery'; |
466 | 484 | $wgHooks['PageHistoryLineEnding'][] = 'FlaggedRevsHooks::addToHistLine'; |
— | — | @@ -479,15 +497,10 @@ |
480 | 498 | # Autoreview stuff |
481 | 499 | $wgHooks['EditPage::showEditForm:fields'][] = 'FlaggedRevsHooks::addRevisionIDField'; |
482 | 500 | $wgHooks['EditPageBeforeEditChecks'][] = 'FlaggedRevsHooks::addReviewCheck'; |
483 | | -# User stats |
484 | | -$wgHooks['ArticleRollbackComplete'][] = 'FlaggedRevsHooks::incrementRollbacks'; |
485 | | -$wgHooks['NewRevisionFromEditComplete'][] = 'FlaggedRevsHooks::incrementReverts'; |
486 | 501 | # Add diff url param alias |
487 | 502 | $wgHooks['NewDifferenceEngine'][] = 'FlaggedRevsHooks::checkDiffUrl'; |
488 | | -# Check if a page is being reviewed |
| 503 | +# Check if a page is currently being reviewed |
489 | 504 | $wgHooks['MediaWikiPerformAction'][] = 'FlaggedRevsHooks::markUnderReview'; |
490 | | -# Null edit review via checkbox |
491 | | -$wgHooks['ArticleSaveComplete'][] = 'FlaggedRevsHooks::maybeNullEditReview'; |
492 | 505 | |
493 | 506 | # Add CSS/JS as needed |
494 | 507 | $wgHooks['BeforePageDisplay'][] = 'FlaggedRevsHooks::onBeforePageDisplay'; |
— | — | @@ -502,14 +515,6 @@ |
503 | 516 | # Add flagging data to ApiQueryRevisions |
504 | 517 | $wgHooks['APIGetAllowedParams'][] = 'FlaggedRevsApiHooks::addApiRevisionParams'; |
505 | 518 | $wgHooks['APIQueryAfterExecute'][] = 'FlaggedRevsApiHooks::addApiRevisionData'; |
506 | | - |
507 | | -# Actually register special pages |
508 | | -$wgHooks['SpecialPage_initList'][] = 'efLoadFlaggedRevsSpecialPages'; |
509 | | -# Special auto-promote |
510 | | -$wgHooks['GetAutoPromoteGroups'][] = 'FlaggedRevsHooks::checkAutoPromote'; |
511 | | - |
512 | | -# Stable dump hook |
513 | | -$wgHooks['WikiExporter::dumpStableQuery'][] = 'FlaggedRevsHooks::stableDumpQuery'; |
514 | 519 | # ######## |
515 | 520 | |
516 | 521 | function efLoadFlaggedRevs() { |