From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/StubObject.php | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'includes/StubObject.php') 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(); } } -- cgit v1.2.3-54-g00ecf