Commit graph

38 commits

Author SHA1 Message Date
Alexandre Emsenhuber
d9c46a0939 * Added UserGetLanguageObject hook to change the language used in $wgLang 2011-03-06 21:05:18 +00:00
Tim Starling
63394d63f5 (bug 27094) fix path traversal vulnerability 2011-02-01 22:43:58 +00:00
X!
1d0ac4a481 Move wfCreateObject to MWFunction::newObj. This uses the ReflectionClass to
instantiate a variable-length constructor in php 5.1.3 and up, and falls
back to the old, ugly, manual method that was in the old wfCreateObject
function. The instances in the core have been replaced.
2011-01-03 02:10:05 +00:00
Sam Reed
e76775e06f More unused variables 2010-11-30 18:44:50 +00:00
Platonides
537826a674 Remove $wgContLanguageCode usage in core.
sed -i 's/$wgContLanguageCode/$wgLanguageCode/g'
These are now the same, always. Per and since r15827.

$wgLanguageCode wins due to being the one set by LocalSettings.

$wgContLanguageCode definition at includes/Setup.php kept for now.
2010-09-07 22:37:55 +00:00
Chad Horohoe
985e8971c8 Get rid of StubUser. Constructing a user object isn't quite as intensive as it once was. It actually takes more time using the StubUser (construction + unstub on first call) than just initializing User::newFromSession() from the start. Either way, the real overhead starts when you start calling methods (for the nitpicky, the optimization was only about 20µs. The real gain here was eliminating a StubObject) 2010-08-12 17:10:00 +00:00
Alexandre Emsenhuber
a582793590 Fixed some doxygen warnings 2010-03-28 20:21:30 +00:00
Tim Starling
0603c609e3 Fixes for r51204: removed useless $wgVariant and StubUserVariant. In Skin::makeGlobalVariablesScript(), use $wgContLang->getPreferredVariant() instead, which is the variant used in the relevant server-side code. 2009-09-02 07:19:35 +00:00
Niklas Laxström
72a3e109d9 (bug 20090) BCP 47 issues 2009-08-14 15:41:48 +00:00
Andrew Garrett
ac774b60ea If an object has already been unstubbed (i.e. we have a copy of the StubObject, which has since been unstubbed but the copy not updated), then return the already-unstubbed object instead of unstubbing it again 2009-08-06 16:11:12 +00:00
Shinjiman
648bfbabc0 * (bug 10837) Introducing the StubUserVariant class to determine the variant variable instead of using this to overrules the user language preference. 2009-05-30 19:49:51 +00:00
Purodha B Blissenbach
56c2036f1e Bugfis, making ?uselang=qqq an invalid language code, see
https://bugzilla.wikimedia.org/show_bug.cgi?id=17445
2009-02-11 11:56:01 +00:00
Chad Horohoe
7e8f748bd2 Minor tweak in debug output. Makes much more readible (and per most other debug statements that mention the calling method), since -> gets turned to -> in the debug comments. 2008-11-04 02:04:53 +00:00
Robert Stojnić
0ce3c66acd Fix regreesion in r37662, disabled conversion when interface language variant is different that main wiki language variant. 2008-07-15 16:49:57 +00:00
Robert Stojnić
098cfc3c3b * (bug 10837) Language variants overrides languages other than the variant main language.
Explicitely forbid conversion when interface language is different than the main content language.
2008-07-14 21:32:13 +00:00
Tim Starling
8ae900c46b DB schema change.
In CentralAuth (and related changes interface changes in Newuserlog and the core):

* Moved the AutoAuthenticate hook to User::loadFromSession(), to defer processing for longer and avoid unstub loops
* Undeprecated User::setID()
* Added partial support for new user log registration and IP-based blocking of automatically created accounts. Still needs the same support implemented in Special:Userlogin.
* Fixed all inappropriate uses of the term "DB name", changing them to "wiki" or "wiki ID". Renamed the relevant database fields.
* Refactored central session and cache support
2008-05-14 00:35:14 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Alexandre Emsenhuber
2a46b1b8c3 Typo, thanks to nikerabbit for reporting it :) 2008-04-08 19:52:19 +00:00
Alexandre Emsenhuber
6a96aeb291 Document a bit. 2008-04-08 18:52:57 +00:00
Tim Starling
98611cdd4e Revert r31022 -- breaks commons upload hack. 2008-02-22 11:49:13 +00:00
Victor Vasiliev
b8ec8a526c * (bug 13010) Invalid language codes should fallback to default wiki language not English
Patch by Alexandre Emsenhuber
2008-02-17 15:36:52 +00:00
Niklas Laxström
e96e7ba96c * Reverting r28802 until I can figure what is going on 2007-12-24 13:14:25 +00:00
Niklas Laxström
fc30ace0b5 * Use variant only if interface language === content language
* (bug 10837) Interface "variant" overruling "language" preference
2007-12-23 18:00:54 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Tim Starling
dc7a748b8a Fix language code validation regex to allow be-x-old. 2007-04-02 17:49:12 +00:00
Antoine Musso
f78e9c549f Fix r19896 for bug 8944 (pressing 'u' in vim before committing is a bad idea). 2007-02-12 20:22:34 +00:00
Antoine Musso
70a270421a Fix #8944: The deprecated is_a() function is used in StubObjects.php 2007-02-12 20:18:05 +00:00
Antoine Musso
171945efed User::getOption now accept a default value to override default user values
this makes it consistent with WebRequest::get* methods. Corrected code in
various places accordingly.
2006-12-14 20:28:38 +00:00
Robert Stojnić
66999c01a4 * Enable category names to be written in variants (use single linkbatch for both link and category variants)
* introduce armourMath(), use to put -{ }- around math if needed (not needed for zh, but needed for sr, and probably kk)
2006-12-11 23:33:27 +00:00
Robert Stojnić
dd5e44ea63 Fix bug #7605. For logged-in users use the selected variant(if any) insted the one from user settings. 2006-10-22 01:24:39 +00:00
Tim Starling
6ef631c5bc Pass by reference, allow AutoAuthenticate to create a new object and assign it to $user. 2006-10-17 10:38:56 +00:00
Tim Starling
dd785270d7 Converted User to use lazy initialisation. This is to avoid unstub loops, and also for performance. Interfaces and semantics have been largely preserved, except for a minor change involving setLoaded(). 2006-10-14 06:58:19 +00:00
Brion Vibber
c41d4fb0ee * (bug 6929) Restore AutoAuthenticate hook 2006-10-10 21:20:10 +00:00
Daniel Kinzler
8fe37df566 StubObject.php: use getVal() instead of getText() to check for uselang parameter 2006-08-22 12:16:14 +00:00
Domas Mituzas
ca6321d4c6 erghhhh 2006-08-02 18:48:30 +00:00
Domas Mituzas
63307ad99c Move SO::_getCaller() to Profiler::getCaller() 2006-08-02 18:34:01 +00:00
Tim Starling
3e7155b3db $wgLanguageCode no longer indicates the user language, for that use $wgLang->getCode(). This is necessary because determination of the language code is deferred. 2006-07-26 08:26:51 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00