Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -211,11 +211,6 @@ |
212 | 212 | return; |
213 | 213 | } |
214 | 214 | |
215 | | -# Temp var |
216 | | -$wgFlaggedRevsRCCrap = false; |
217 | | -# Patrollable namespaces (overridden by reviewable namespaces) (don't use) |
218 | | -$wgFlaggedRevsPatrolNamespaces = array(); // @TODO: remove when ready |
219 | | - |
220 | 215 | # Bots are granted autoreview via hooks, mark in rights |
221 | 216 | # array so that it shows up in sp:ListGroupRights... |
222 | 217 | $wgGroupPermissions['bot']['autoreview'] = true; |
— | — | @@ -367,7 +362,7 @@ |
368 | 363 | $wgLogTypes[] = 'stable'; |
369 | 364 | |
370 | 365 | # Log action handlers |
371 | | -FlaggedRevsUIHooks::defineBasicLogUI( $wgLogNames, $wgLogHeaders, $wgFilterLogTypes ); |
| 366 | +FlaggedRevsUIHooks::defineLogBasicDesc( $wgLogNames, $wgLogHeaders, $wgFilterLogTypes ); |
372 | 367 | FlaggedRevsUIHooks::defineLogActionHanders( $wgLogActions, $wgLogActionsHandlers ); |
373 | 368 | |
374 | 369 | # JS/CSS modules and message bundles used by JS scripts |
— | — | @@ -524,34 +519,6 @@ |
525 | 520 | |
526 | 521 | // Note: avoid calls to FlaggedRevs class here for performance |
527 | 522 | function efLoadFlaggedRevs() { |
528 | | - global $wgFlaggedRevsRCCrap, $wgUseRCPatrol, $wgGroupPermissions; |
529 | | - global $wgFlaggedRevsNamespaces, $wgFlaggedRevsProtection; |
530 | | - if ( $wgFlaggedRevsRCCrap ) { |
531 | | - # If patrolling is already on, then we know that it |
532 | | - # was intended to have all namespaces patrollable. |
533 | | - if ( $wgUseRCPatrol ) { |
534 | | - global $wgFlaggedRevsPatrolNamespaces; |
535 | | - $wgFlaggedRevsPatrolNamespaces = MWNamespace::getValidNamespaces(); |
536 | | - } |
537 | | - /* TODO: decouple from rc patrol */ |
538 | | - # Check if FlaggedRevs is enabled by default for pages... |
539 | | - if ( $wgFlaggedRevsNamespaces && !$wgFlaggedRevsProtection ) { |
540 | | - # Use RC Patrolling to check for vandalism. |
541 | | - # Edits to reviewable pages must be flagged to be patrolled. |
542 | | - $wgUseRCPatrol = true; |
543 | | - } |
544 | | - if ( isset( $wgGroupPermissions['editor'] ) |
545 | | - && !isset( $wgGroupPermissions['editor']['patrolmarks'] ) ) |
546 | | - { |
547 | | - $wgGroupPermissions['editor']['patrolmarks'] = true; |
548 | | - } |
549 | | - if ( isset( $wgGroupPermissions['reviewer'] ) |
550 | | - && !isset( $wgGroupPermissions['reviewer']['patrolmarks'] ) ) |
551 | | - { |
552 | | - $wgGroupPermissions['reviewer']['patrolmarks'] = true; |
553 | | - } |
554 | | - } |
555 | | - |
556 | 523 | # Conditional autopromote groups |
557 | 524 | efSetFlaggedRevsAutopromoteConfig(); |
558 | 525 | |
Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevs.hooks.php |
— | — | @@ -622,37 +622,6 @@ |
623 | 623 | } |
624 | 624 | return true; |
625 | 625 | } |
626 | | - global $wgFlaggedRevsRCCrap; |
627 | | - if ( $wgFlaggedRevsRCCrap ) { |
628 | | - // Is this page in patrollable namespace? |
629 | | - if ( FlaggedRevs::inPatrolNamespace( $rc->getTitle() ) ) { |
630 | | - # Bots and users with 'autopatrol' have edits to patrollable |
631 | | - # pages marked automatically on edit. |
632 | | - $patrol = $wgUser->isAllowed( 'autopatrol' ) || $wgUser->isAllowed( 'bot' ); |
633 | | - $record = true; // record if patrolled |
634 | | - } else { |
635 | | - global $wgUseNPPatrol; |
636 | | - // Is this is a new page edit and $wgUseNPPatrol is enabled? |
637 | | - if ( $wgUseNPPatrol && !empty( $rc->mAttribs['rc_new'] ) ) { |
638 | | - # Automatically mark it patrolled if the user can do so |
639 | | - $patrol = $wgUser->isAllowed( 'autopatrol' ); |
640 | | - $record = true; |
641 | | - // Otherwise, this edit is not patrollable |
642 | | - } else { |
643 | | - # Silently mark it "patrolled" so that it doesn't show up as being unpatrolled |
644 | | - $patrol = true; |
645 | | - $record = false; |
646 | | - } |
647 | | - } |
648 | | - // Set rc_patrolled flag and add log entry as needed |
649 | | - if ( $patrol ) { |
650 | | - $rc->reallyMarkPatrolled(); |
651 | | - $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs now status |
652 | | - if ( $record ) { |
653 | | - PatrolLog::record( $rc->mAttribs['rc_id'], true ); |
654 | | - } |
655 | | - } |
656 | | - } |
657 | 626 | return true; |
658 | 627 | } |
659 | 628 | |
Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevs.class.php |
— | — | @@ -16,7 +16,6 @@ |
17 | 17 | protected static $binaryFlagging = true; |
18 | 18 | # Namespace config |
19 | 19 | protected static $reviewNamespaces = array(); |
20 | | - protected static $patrolNamespaces = array(); |
21 | 20 | # Restriction levels/config |
22 | 21 | protected static $restrictionLevels = array(); |
23 | 22 | # Autoreview config |
— | — | @@ -108,8 +107,6 @@ |
109 | 108 | } |
110 | 109 | } |
111 | 110 | self::$reviewNamespaces = $wgFlaggedRevsNamespaces; |
112 | | - # Note: reviewable *pages* override patrollable ones |
113 | | - self::$patrolNamespaces = $wgFlaggedRevsPatrolNamespaces; |
114 | 111 | # Handle $wgFlaggedRevsAutoReview settings |
115 | 112 | global $wgFlaggedRevsAutoReview, $wgFlaggedRevsAutoReviewNew; |
116 | 113 | if ( is_int( $wgFlaggedRevsAutoReview ) ) { |
— | — | @@ -882,15 +879,6 @@ |
883 | 880 | } |
884 | 881 | |
885 | 882 | /** |
886 | | - * Get the list of patrollable namespaces |
887 | | - * @return array |
888 | | - */ |
889 | | - public static function getPatrolNamespaces() { |
890 | | - self::load(); // validates namespaces |
891 | | - return self::$patrolNamespaces; |
892 | | - } |
893 | | - |
894 | | - /** |
895 | 883 | * Is this page in reviewable namespace? |
896 | 884 | * Note: this checks $wgFlaggedRevsWhitelist |
897 | 885 | * @param Title, $title |
— | — | @@ -906,18 +894,6 @@ |
907 | 895 | return in_array( $ns, self::getReviewNamespaces() ); |
908 | 896 | } |
909 | 897 | |
910 | | - /** |
911 | | - * Is this page in patrollable namespace? |
912 | | - * @param Title, $title |
913 | | - * @return bool |
914 | | - */ |
915 | | - public static function inPatrolNamespace( Title $title ) { |
916 | | - $namespaces = self::getPatrolNamespaces(); |
917 | | - $ns = ( $title->getNamespace() == NS_MEDIA ) ? |
918 | | - NS_FILE : $title->getNamespace(); // Treat NS_MEDIA as NS_FILE |
919 | | - return ( in_array( $ns, $namespaces ) ); |
920 | | - } |
921 | | - |
922 | 898 | # ################ Auto-review function ################# |
923 | 899 | |
924 | 900 | /** |
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | * @param $logHeaders Array $wgLogHeaders |
88 | 88 | * @param $filterLogTypes Array $wgFilterLogTypes |
89 | 89 | */ |
90 | | - public static function defineBasicLogUI( &$logNames, &$logHeaders, &$filterLogTypes ) { |
| 90 | + public static function defineLogBasicDesc( &$logNames, &$logHeaders, &$filterLogTypes ) { |
91 | 91 | $logNames['review'] = 'review-logpage'; |
92 | 92 | $logHeaders['review'] = 'review-logpagetext'; |
93 | 93 | |