Partial revert of r45778 and friends "(bug 15936) New page's patrol button should...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Jan 2009 18:00:55 +0000 (18:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Jan 2009 18:00:55 +0000 (18:00 +0000)
The permission & patrolled checks on every view seem to be a performance problem. Have backed this out live; backing it out in SVN until resolved.

RELEASE-NOTES
includes/Article.php

index fc8fceb..a8ae408 100644 (file)
@@ -85,7 +85,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   LanguageConverter class)
 * (bug 17054) Added more descriptive errors in Special:RevisionDelete
 * (bug 11527) Diff on page with one revision shows "Next" link to same diff
-* (bug 15936) New page's patrol button should always be visible
 * (bug 8065) Fix summary forcing for new pages
 * (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer
   allowed by default. Change $wgInvalidRedirectTargets to re-enable.
index 4bbf2e9..bf10343 100644 (file)
@@ -991,19 +991,6 @@ class Article {
                        $wgOut->addWikiMsg('anontalkpagetext');
                }
 
-               # Only diffs and new page links from RC give rcid params, so if
-               # we are just viewing the page normally with no rcid, try to find it. 
-               # This is more convenient for users.
-               if( $this->mTitle->exists() && $this->mTitle->quickUserCan('patrol') ) {
-                       if( empty($rcid) ) {
-                               $firstRev = $this->mTitle->getFirstRevision();
-                               $rcid = $firstRev ? $firstRev->isUnpatrolled() : 0;
-                       } else {
-                               $rc = RecentChange::newFromId( $rcid );
-                               // Already patrolled?
-                               $rcid = is_object($rc) && !$rc->getAttribute('rc_patrolled') ? $rcid : 0;
-                       }
-               }
                # If we have been passed an &rcid= parameter, we want to give the user a
                # chance to mark this new article as patrolled.
                if( !empty($rcid) && $this->mTitle->exists() && $this->mTitle->quickUserCan('patrol') ) {