https://bugzilla.wikimedia.org/show_bug.cgi?id=27562

           Summary: Make $wgVersion a constant
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: General/Unknown
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: theevilipaddr...@hotmail.de
            Blocks: 700,9968


Currently, $wgVersion is global variable from DefaultSettings.php, which means
that it's easily possible for people to modify the variable in
LocalSettings.php. I don't know if anyone ever did it, but if someone did it,
this could break quite a lot of things. Version checks with version_compare()
might be inaccurate, leading to certain functions/classes not to load or the
information on Special:Version or {{VERSION}} give wrong information about the
used software. Also, I could imagine people believing they could "update"
MediaWiki by modifying $wgVersion.

Since there doesn't appear to be a need to modify $wgVersion, neither by the
MediaWiki core, extensions or the site users, it could probably just as easily
become a constant, maybe MW_VERSION, and then be used like that. This also has
the nice side effect of getting rid of another global, which appear to be
unloved within MediaWiki developers (IMO for good reasons).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to