Made RecentChange defer the save() method via DeferredUpdates
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 71b3b79..5e4438a 100644 (file)
@@ -1835,18 +1835,13 @@ class WikiPage implements Page, IDBAccessObject {
                                if ( !( $flags & EDIT_SUPPRESS_RC ) ) {
                                        // Mark as patrolled if the user can do so
                                        $patrolled = $wgUseRCPatrol && !count(
-                                       $this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
-
+                                               $this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
                                        // Add RC row to the DB
-                                       $rc = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $user, $summary,
+                                       RecentChange::notifyEdit(
+                                               $now, $this->mTitle, $isminor, $user, $summary,
                                                $oldid, $this->getTimestamp(), $bot, '', $oldsize, $newsize,
                                                $revisionId, $patrolled
                                        );
-
-                                       // Log auto-patrolled edits
-                                       if ( $patrolled ) {
-                                               PatrolLog::record( $rc, true, $user );
-                                       }
                                }
 
                                $user->incEditCount();
@@ -1937,13 +1932,10 @@ class WikiPage implements Page, IDBAccessObject {
                                $patrolled = ( $wgUseRCPatrol || $wgUseNPPatrol ) && !count(
                                        $this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
                                // Add RC row to the DB
-                               $rc = RecentChange::notifyNew( $now, $this->mTitle, $isminor, $user, $summary, $bot,
-                                       '', $newsize, $revisionId, $patrolled );
-
-                               // Log auto-patrolled edits
-                               if ( $patrolled ) {
-                                       PatrolLog::record( $rc, true, $user );
-                               }
+                               RecentChange::notifyNew(
+                                       $now, $this->mTitle, $isminor, $user, $summary, $bot,
+                                       '', $newsize, $revisionId, $patrolled
+                               );
                        }
 
                        $user->incEditCount();