Last modified: 2010-05-15 15:54:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14167 - userCanRead and userCan('read') providing different results
userCanRead and userCan('read') providing different results
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.12.x
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-18 01:50 UTC by Nigel Jones
Modified: 2010-05-15 15:54 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nigel Jones 2008-05-18 01:50:05 UTC
I've noticed today that userCanRead and userCan('read') seem to be providing different results, in particular in Special:Search...

r21402 was committed to patch Bug #8825, but it appears my installation with the Lockdown extension does not have the desired effect.

I proceeded to change line 327 of includes/SpecialSearch.php from:
 if (!$t->userCanRead()) {
to:
 if (!$t->userCanRead() || !$t->userCan( 'read' )) {
which has seemed to solve the problem and provide the desired results.

Any thoughts?
Comment 1 Aaron Schulz 2008-05-18 01:58:49 UTC
See line 1420, there is a shortcircuit check added for perfomance.
Comment 2 Nigel Jones 2008-05-18 03:04:03 UTC
(In reply to comment #1)
> See line 1420, there is a shortcircuit check added for perfomance.
> 

Actually, I'm a bit of a twit, now I look, yes there is the shortcircuit, and it's fixed in SVN...

Sorry all.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links