r45607 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45606‎ | r45607 | r45608 >
Date:18:05, 9 January 2009
Author:aaron
Status:ok
Tags:
Comment:
Make sure feeds reflect changes due to flaggedrevs
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -166,6 +166,9 @@
167167
168168 # Set the ID
169169 $this->mAttribs['rc_id'] = $dbw->insertId();
 170+
 171+ # Notify extensions
 172+ wfRunHooks( 'RecentChange_save', array( &$this ) );
170173
171174 # Notify external application via UDP
172175 if( $wgRC2UDPAddress && ( !$this->mAttribs['rc_bot'] || !$wgRC2UDPOmitBots ) ) {
@@ -193,9 +196,6 @@
194197 $this->mAttribs['rc_minor'],
195198 $this->mAttribs['rc_last_oldid'] );
196199 }
197 -
198 - # Notify extensions
199 - wfRunHooks( 'RecentChange_save', array( &$this ) );
200200 }
201201
202202 /**
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -741,7 +741,7 @@
742742 /**
743743 * When an edit is made to a page that can't be reviewed, autopatrol if allowed.
744744 */
745 - public static function autoMarkPatrolled( $rc ) {
 745+ public static function autoMarkPatrolled( &$rc ) {
746746 global $wgUser;
747747 if( empty($rc->mAttribs['rc_this_oldid']) ) {
748748 return true;
@@ -752,6 +752,7 @@
753753 # won't autopatrol. May or may not be useful...
754754 if( FlaggedRevs::revIsFlagged($rc->getTitle(),$rc->mAttribs['rc_this_oldid'],GAID_FOR_UPDATE) ) {
755755 RevisionReview::updateRecentChanges( $rc->getTitle(), $rc->mAttribs['rc_this_oldid'] );
 756+ $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs now status
756757 }
757758 return true;
758759 }
@@ -778,6 +779,7 @@
779780 if( $record ) {
780781 PatrolLog::record( $rc->mAttribs['rc_id'], true );
781782 }
 783+ $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs now status
782784 }
783785 return true;
784786 }

Status & tagging log