Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php |
— | — | @@ -57,27 +57,27 @@ |
58 | 58 | |
59 | 59 | /** |
60 | 60 | * (a) Update flaggedrevs page/tracking tables |
61 | | - * (b) Autoreview pages moved into content NS |
| 61 | + * (b) Autoreview pages moved into reviewable namespaces (bug 19379) |
62 | 62 | */ |
63 | 63 | public static function onTitleMoveComplete( |
64 | 64 | Title $otitle, Title $ntitle, $user, $pageId |
65 | 65 | ) { |
66 | | - $fa = FlaggableWikiPage::getTitleInstance( $ntitle ); |
67 | | - $fa->loadPageData( 'fromdbmaster' ); |
68 | | - // Re-validate NS/config (new title may not be reviewable) |
69 | | - if ( $fa->isReviewable() ) { |
70 | | - // Moved from non-reviewable to reviewable NS? |
71 | | - // Auto-review such edits like new pages... |
72 | | - if ( !FlaggedRevs::inReviewNamespace( $otitle ) |
73 | | - && FlaggedRevs::autoReviewNewPages() |
74 | | - && $ntitle->userCan( 'autoreview' ) ) |
75 | | - { |
| 66 | + if ( !FlaggedRevs::inReviewNamespace( $otitle ) |
| 67 | + && FlaggedRevs::inReviewNamespace( $ntitle ) |
| 68 | + && FlaggedRevs::autoReviewNewPages() |
| 69 | + ) { |
| 70 | + $fa = FlaggableWikiPage::getTitleInstance( $ntitle ); |
| 71 | + $fa->loadPageData( 'fromdbmaster' ); |
| 72 | + // Re-validate NS/config (new title may not be reviewable) |
| 73 | + if ( $fa->isReviewable() && $ntitle->userCan( 'autoreview' ) ) { |
| 74 | + // Auto-review such edits like new pages... |
76 | 75 | $rev = Revision::newFromTitle( $ntitle ); |
77 | 76 | if ( $rev ) { // sanity |
78 | 77 | FlaggedRevs::autoReviewEdit( $fa, $user, $rev ); |
79 | 78 | } |
80 | 79 | } |
81 | 80 | } |
| 81 | + |
82 | 82 | # Update page and tracking tables and clear cache |
83 | 83 | FlaggedRevs::stableVersionUpdates( $otitle ); |
84 | 84 | FlaggedRevs::HTMLCacheUpdates( $otitle ); |