Last modified: 2014-08-09 16:56:04 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 T20807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18807 - Phase out right-related globals
Phase out right-related globals
Status: NEW
Product: MediaWiki
Classification: Unclassified
Configuration (Other open bugs)
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: global-vars 14636
  Show dependency treegraph
Reported: 2009-05-15 16:59 UTC by Chad H.
Modified: 2014-08-09 16:56 UTC (History)
5 users (show)

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


Description Chad H. 2009-05-15 16:59:31 UTC
Things like $wgSysopUserBans, $wgSysopRangeBans, $wgSysopEmailBans (and any similar ones?) should be phased out, turned into proper rights for $wgGroupPermissions and considered deprecated.
Comment 1 Sam Reed (reedy) 2010-11-29 01:27:33 UTC
Making the changes isn't difficult. Just how the hell do we go about deprecating globals, making sure they work for x future versions (yay, backcompat :/)..?

Or do we just do it, and mark it in the release notes as a breaking change? (How many of these are used in extensions [Not looked myself, as I'm venting, whilst procrastinating from sleep])
Comment 2 Sam Reed (reedy) 2010-11-29 10:16:40 UTC
Or would we do something like

$blah = false;
if ( $wgUser->isAllowed( 'blahaction' ) ) {
$blah = true;
} else {
global $wgBlahAction;

if ( isset( $wgBlahAction ) && $wgBlahAction ) {
//Maybe whinge about being deprecated
$blah = true;


if ( $blah ) {
//Do/allow optional shizz here
Comment 3 Sam Reed (reedy) 2011-01-10 04:59:01 UTC
Ping, Chad?
Comment 4 Mark A. Hershberger 2011-01-22 02:55:58 UTC
We should come up with a solution like the one in Comment 2 for reducing the globals Bug #9968
Comment 5 Happy-melon 2011-04-15 18:30:00 UTC
Most of Setup.php is configuration B/C; I think we probably need a clear-out and documentation blitz in there.
Comment 6 Kunal Mehta (Legoktm) 2014-08-09 16:56:04 UTC
(In reply to Chad H. from comment #0)
> Things like $wgSysopUserBans, $wgSysopRangeBans, $wgSysopEmailBans (and any

Only one remaining is $wgSysopEmailBans.

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