summaryrefslogtreecommitdiff
path: root/includes/StubObject.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /includes/StubObject.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/StubObject.php')
-rw-r--r--includes/StubObject.php22
1 files changed, 4 insertions, 18 deletions
diff --git a/includes/StubObject.php b/includes/StubObject.php
index 678b2744..951cbaea 100644
--- a/includes/StubObject.php
+++ b/includes/StubObject.php
@@ -62,7 +62,7 @@ class StubObject {
* Create a new object to replace this stub object.
*/
function _newObject() {
- return wfCreateObject( $this->mClass, $this->mParams );
+ return MWFunction::newObj( $this->mClass, $this->mParams );
}
/**
@@ -110,6 +110,8 @@ class StubObject {
/**
* Stub object for the content language of this wiki. This object have to be in
* $wgContLang global.
+ *
+ * @deprecated since 1.18
*/
class StubContLang extends StubObject {
@@ -146,22 +148,6 @@ class StubUserLang extends StubObject {
}
function _newObject() {
- global $wgLanguageCode, $wgRequest, $wgUser, $wgContLang;
- $code = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) );
- // BCP 47 - letter case MUST NOT carry meaning
- $code = strtolower( $code );
-
- # Validate $code
- if( empty( $code ) || !Language::isValidCode( $code ) || ( $code === 'qqq' ) ) {
- wfDebug( "Invalid user language code\n" );
- $code = $wgLanguageCode;
- }
-
- if( $code === $wgLanguageCode ) {
- return $wgContLang;
- } else {
- $obj = Language::factory( $code );
- return $obj;
- }
+ return RequestContext::getMain()->getLang();
}
}