Make autopatrol third option in rc_patrolled and use it in API
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 039a329..f45036c 100644 (file)
@@ -1781,7 +1781,7 @@ class WikiPage implements Page, IDBAccessObject {
                        // Update recentchanges
                        if ( !( $flags & EDIT_SUPPRESS_RC ) ) {
                                // Mark as patrolled if the user can do so
-                               $patrolled = $wgUseRCPatrol && !count(
+                               $autopatrolled = $wgUseRCPatrol && !count(
                                                $this->mTitle->getUserPermissionsErrors( 'autopatrol', $user ) );
                                // Add RC row to the DB
                                RecentChange::notifyEdit(
@@ -1797,7 +1797,8 @@ class WikiPage implements Page, IDBAccessObject {
                                        $oldContent ? $oldContent->getSize() : 0,
                                        $newsize,
                                        $revisionId,
-                                       $patrolled,
+                                       $autopatrolled ? RecentChange::PRC_AUTOPATROLLED :
+                                               RecentChange::PRC_UNPATROLLED,
                                        $tags
                                );
                        }