Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -697,14 +697,16 @@ |
698 | 698 | # Don't do so if an edit was auto-merged in between though... |
699 | 699 | if( !$editTimestamp || !$prevTimestamp || $prevTimestamp == $editTimestamp ) { |
700 | 700 | FlaggedRevs::autoReviewEdit( $article, $user, $rev->getText(), $rev, $flags, false ); |
701 | | - return true; |
| 701 | + return true; // done! |
702 | 702 | } |
703 | 703 | } |
704 | | - # Auto-reviewing must be enabled |
705 | | - if( !$wgFlaggedRevsAutoReview ) return true; |
706 | | - # User must have the required permissions |
707 | | - if( !$user->isAllowed('autoreview') && !$user->isAllowed('bot') ) { |
708 | | - return true; |
| 704 | + # Get sync cache key |
| 705 | + $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $rev->getPage() ); |
| 706 | + global $wgMemc, $wgParserCacheExpireTime; |
| 707 | + # Auto-reviewing must be enabled and user must have the required permissions |
| 708 | + if( !$wgFlaggedRevsAutoReview || (!$user->isAllowed('autoreview') && !$user->isAllowed('bot')) ) { |
| 709 | + $wgMemc->set( $key, FlaggedRevs::makeMemcObj('false'), $wgParserCacheExpireTime ); |
| 710 | + return true; // done! edit pending! |
709 | 711 | } |
710 | 712 | # If $baseRevId passed in, this is a null edit |
711 | 713 | $isNullEdit = $baseRevId ? true : false; |
— | — | @@ -741,7 +743,7 @@ |
742 | 744 | $frev = FlaggedRevision::newFromTitle( $title, $prevRevId, FR_MASTER ); |
743 | 745 | } |
744 | 746 | } |
745 | | - # Is this an edit directly to the stable version? |
| 747 | + # Is this an edit directly to the stable version? Is it a new page? |
746 | 748 | if( $reviewableNewPage || !is_null($frev) ) { |
747 | 749 | # Assume basic flagging level unless this is a null edit |
748 | 750 | if( $isNullEdit ) { |
— | — | @@ -749,6 +751,9 @@ |
750 | 752 | } |
751 | 753 | # Review this revision of the page. Let articlesavecomplete hook do rc_patrolled bit... |
752 | 754 | FlaggedRevs::autoReviewEdit( $article, $user, $rev->getText(), $rev, $flags ); |
| 755 | + } else { |
| 756 | + # Done! edit pending! |
| 757 | + $wgMemc->set( $key, FlaggedRevs::makeMemcObj('false'), $wgParserCacheExpireTime ); |
753 | 758 | } |
754 | 759 | return true; |
755 | 760 | } |