r45299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45298‎ | r45299 | r45300 >
Date:23:29, 1 January 2009
Author:aaron
Status:ok
Tags:
Comment:
User more thorough mTitle->userCan checks for autopatrolling
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1562,7 +1562,7 @@
15631563 # Update recentchanges
15641564 if( !( $flags & EDIT_SUPPRESS_RC ) ) {
15651565 # Mark as patrolled if the user can do so
1566 - $patrolled = $wgUseRCPatrol && $user->isAllowed('autopatrol');
 1566+ $patrolled = $wgUseRCPatrol && $this->mTitle->userCan('autopatrol');
15671567 # Add RC row to the DB
15681568 $rc = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $user, $summary,
15691569 $this->mLatest, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
@@ -1644,7 +1644,7 @@
16451645 if( !( $flags & EDIT_SUPPRESS_RC ) ) {
16461646 global $wgUseRCPatrol, $wgUseNPPatrol;
16471647 # Mark as patrolled if the user can do so
1648 - $patrolled = ($wgUseRCPatrol || $wgUseNPPatrol) && $user->isAllowed('autopatrol');
 1648+ $patrolled = ($wgUseRCPatrol || $wgUseNPPatrol) && $this->mTitle->userCan('autopatrol');
16491649 # Add RC row to the DB
16501650 $rc = RecentChange::notifyNew( $now, $this->mTitle, $isminor, $user, $summary, $bot,
16511651 '', strlen($text), $revisionId, $patrolled );

Status & tagging log