Merge "mediawiki.icon: Move arrow icons to a separate module"
[lhc/web/wiklou.git] / includes / ChangesList.php
index f2b5286..b1bb82e 100644 (file)
@@ -362,10 +362,18 @@ class ChangesList extends ContextSource {
         * @param $watched
         */
        public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
-               # If it's a new article, there is no diff link, but if it hasn't been
-               # patrolled yet, we need to give users a way to do so
+               global $wgUseRCPatrol;
+
                $params = array();
 
+               // In case we got a page creation which is yet unpatrolled and
+               // recent changes patrolling is enabled, the user probably rather
+               // wants to patrol the whole page (first revision) instead of seeing
+               // a patrollink for the current revision.
+               if ( $wgUseRCPatrol && $unpatrolled && $rc->getAttribute( 'rc_type' ) == RC_NEW ) {
+                       $params['patrolpage'] = 1;
+               }
+
                $articlelink = Linker::linkKnown(
                        $rc->getTitle(),
                        null,