r45793 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45792‎ | r45793 | r45794 >
Date:13:23, 16 January 2009
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
Tweak r45778, check exists()
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -970,9 +970,9 @@
971971 # Only diffs and new page links from RC give rcid params, so if
972972 # we are just viewing the page normally with no rcid, try to find it.
973973 # This is more convenient for users.
974 - if( empty($rcid) && $this->mTitle->userCan('patrol') ) {
 974+ if( empty($rcid) && $this->mTitle->exists() && $this->mTitle->userCan('patrol') ) {
975975 $firstRev = $this->mTitle->getFirstRevision();
976 - $rcid = $firstRev->isUnpatrolled();
 976+ $rcid = $firstRev ? $firstRev->isUnpatrolled() : 0;
977977 }
978978 # If we have been passed an &rcid= parameter, we want to give the user a
979979 # chance to mark this new article as patrolled.

Follow-up revisions

RevisionCommit summaryAuthorDate
r45814Merge in r45793.werdna21:55, 16 January 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45778(Bug 15936) New page's patrol button should always be visibleaaron17:53, 15 January 2009

Comments

#Comment by Siebrand (talk | contribs)   21:19, 17 January 2009

Looks odd to me. See Betawiki with $wgUseNPPatrol = false;

Some new page contains [Mark this page as patrolled] in the bottom right corner. With the aforementioned setting, I would expect this not to appear.

From DefaultSettings.php:

/** Use new page patrolling to check new pages on Special:Newpages */
$wgUseNPPatrol = true;
#Comment by Siebrand (talk | contribs)   00:05, 18 January 2009

Not certain if r45855 meant to fix this, but behaviour has not changed.

#Comment by Voice of All (talk | contribs)   01:17, 18 January 2009

No, mainly just for maintainability.

Anyways, as long as $wgUseNPPatrol or $wgUseRCPatrol is on, then this is intended.

#Comment by Siebrand (talk | contribs)   09:19, 18 January 2009
BetawikiSettings.php:$wgUseRCPatrol          = false;
BetawikiSettings.php:$wgUseNPPatrol          = false;

"[Mark this page as patrolled]" is still there. Needs fixing.

#Comment by Brion VIBBER (talk | contribs)   22:09, 20 January 2009

This appears to be resolved by r45855

Status & tagging log