Last modified: 2014-08-03 22:42:44 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 9968 - (global-vars) Reduce use of global and public variables (tracking)
Reduce use of global and public variables (tracking)
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: tracking
Depends on: 18807 $wgTitle 34151 config-obj 9982 26650 26894 27562 29092 32238 33641 62198
Blocks: code_quality tracking
  Show dependency treegraph
Reported: 2007-05-19 20:12 UTC by Scott A. Colcord
Modified: 2014-08-03 22:42 UTC (History)
2 users (show)

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

Encapsulate wgCanonicalNamespaceNames (3.36 KB, patch)
2007-05-19 23:40 UTC, Scott A. Colcord

Description Scott A. Colcord 2007-05-19 20:12:57 UTC
This bug is intended to track background code-cleanup work aimed at reducing the use of global and public variables in the MediaWiki code base.  The use of such variables is discouraged in software engineering, because as the software grows it becomes increasingly hard to ensure that they remain in a consistent state.  It also makes the code more difficult to modularize, because different modules become dependent on each others' internal implementation details, instead of on clearly defined interfaces.

The most common practice to reduce these difficulties is to wrap the variables in get/set functions.  Many of these functions are already present in the MW code base, but are not being used consistently.  Progress on this bug will primarily consist of ensuring that access to the variables is properly routed through these functions, introducing new functions where they do not exist, and making the variables 'private' where possible, to ensure that that the accessors are not bypassed in the future.
Comment 1 Antoine "hashar" Musso (WMF) 2007-05-19 20:20:07 UTC
Blocks the tracking bug 700 (Code quality issues)
Comment 2 Scott A. Colcord 2007-05-19 23:40:40 UTC
Created attachment 3654 [details]
Encapsulate wgCanonicalNamespaceNames

My first patch; suggestions for improvement welcome.
Comment 3 Scott A. Colcord 2007-05-20 18:11:42 UTC
Comment on attachment 3654 [details]
Encapsulate wgCanonicalNamespaceNames

Attachment moved to child bug.
Comment 4 Andrew Garrett 2009-07-29 16:39:08 UTC
Adding 'tracking' keyword.
Comment 5 p858snake 2011-04-30 00:09:44 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

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