Last modified: 2014-09-23 23:06:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11977, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9977 - Refactor namespace rights checks out of Title.php, into Namespace.php
Refactor namespace rights checks out of Title.php, into Namespace.php
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2007-05-20 13:09 UTC by Scott A. Colcord
Modified: 2014-09-23 23:06 UTC (History)
1 user (show)

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


Attachments
First pass at a patch to complete this change. (3.43 KB, patch)
2007-05-20 13:09 UTC, Scott A. Colcord
Details
Fix for typo in first patch (3.44 KB, patch)
2007-05-20 13:17 UTC, Scott A. Colcord
Details
Updated patch (3.55 KB, patch)
2007-05-28 18:29 UTC, Scott A. Colcord
Details

Description Scott A. Colcord 2007-05-20 13:09:36 UTC
Created attachment 3657 [details]
First pass at a patch to complete this change.

Currently, Title::UserCan() checks the $wgNamespaceProtection to test whether the namespace is protected.  Creating a separate Namespace::UserCan() would provide several benefits:

1)  It helps to keep all of the namespace related code in one place.
2)  Permissions on a namespace can now be tested without requiring the caller to access $wgNamespaceProtection directly.
3)  It introduces a 'userCanNamespace' hook, to enable extensions to more easily customize permissions on a namespace level.  The standard disclaimers about access restriction not being reliable apply, of course.
Comment 1 Scott A. Colcord 2007-05-20 13:17:16 UTC
Created attachment 3658 [details]
Fix for typo in first patch
Comment 2 Scott A. Colcord 2007-05-28 18:29:19 UTC
Created attachment 3685 [details]
Updated patch
Comment 3 Sumana Harihareswara 2011-11-04 19:58:25 UTC
Thank you for your patch, and my apologies it's taken so very, very long for us to respond to you.

I tried applying the patch, and -- since the trunk has changed so much since you submitted it -- it doesn't apply cleanly anymore.

$ patch < ~/test/wikimedia-dev/9977.txt 
patching file hooks.txt
Hunk #1 FAILED at 561.
1 out of 1 hunk FAILED -- saving rejects to file hooks.txt.rej
patching file Title.php
Hunk #1 FAILED at 998.
Hunk #2 FAILED at 1007.
2 out of 2 hunks FAILED -- saving rejects to file Title.php.rej
patching file Namespace.php
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file Namespace.php.rej
patching file RELEASE-NOTES
Hunk #1 FAILED at 22.
1 out of 1 hunk FAILED -- saving rejects to file RELEASE-NOTES.rej

Could you install the new MediaWiki 1.18 beta per http://lists.wikimedia.org/pipermail/mediawiki-announce/2011-November/000102.html and then see whether and how you'd like to make this change?  Thanks!
Comment 4 Scott A. Colcord 2011-11-05 17:27:59 UTC
Probably not soon, I'm afraid.  Mediawiki took so long to review my patches that I ended up making a private fork of the code after 1.10, and I'm not sure when/if I'll try to re-sync.
Comment 5 Roan Kattouw 2011-11-08 11:39:43 UTC
(In reply to comment #3)
> Could you install the new MediaWiki 1.18 beta per
> http://lists.wikimedia.org/pipermail/mediawiki-announce/2011-November/000102.html
> and then see whether and how you'd like to make this change?  Thanks!
PLEASE PLEASE PLEASE do not base your patches off 1.18beta or any other release version. Patches submitted to Bugzilla should be against trunk and against trunk only. Sumana, please don't give people the wrong ideas ;)
Comment 6 Sumana Harihareswara 2011-11-08 11:46:18 UTC
Roan, I shall be clearer in the future.  I figure it's fine to suggest that people install the latest release or beta just to see whether the bug they are fixing is reproducible.  Of course, once someone wants to write a patch, they have to base it on trunk, and I'll be extra-clear about that.  Is that reasonable?
Comment 7 Roan Kattouw 2011-11-08 11:50:24 UTC
(In reply to comment #6)
> Roan, I shall be clearer in the future.  I figure it's fine to suggest that
> people install the latest release or beta just to see whether the bug they are
> fixing is reproducible.  Of course, once someone wants to write a patch, they
> have to base it on trunk, and I'll be extra-clear about that.  Is that
> reasonable?
Yes, that's entirely reasonable. The wording in comment #3 was unclear and didn't give me the impression you knew patches should be against trunk. I'm glad to see you do :)

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


Navigation
Links