* (bug 12143) Do not show a link to patrol new pages for non existent pages
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 29 Nov 2007 06:26:38 +0000 (06:26 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 29 Nov 2007 06:26:38 +0000 (06:26 +0000)
RELEASE-NOTES
includes/Article.php

index e3a8ae0..b976837 100644 (file)
@@ -197,6 +197,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * The number of watching users in watchlists was always reported as 1
 * namespaceDupes.php no longer dies when coming across an illegal title
 * Make API check for restrictions in the old format too.
+* (bug 12143) Do not show a link to patrol new pages for non existent pages
 
 == Parser changes in 1.12 ==
 
index 56070b2..d0e6f04 100644 (file)
@@ -870,7 +870,7 @@ class Article {
 
                # If we have been passed an &rcid= parameter, we want to give the user a
                # chance to mark this new article as patrolled.
-               if (!is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) ) {
+               if( !is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) && $this->mTitle->exists() ) {
                        $wgOut->addHTML(
                                "<div class='patrollink'>" .
                                        wfMsgHtml( 'markaspatrolledlink',