summaryrefslogtreecommitdiff
path: root/includes/StubObject.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/StubObject.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/StubObject.php')
-rw-r--r--includes/StubObject.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/includes/StubObject.php b/includes/StubObject.php
index 951cbaea..647ad929 100644
--- a/includes/StubObject.php
+++ b/includes/StubObject.php
@@ -60,6 +60,7 @@ class StubObject {
/**
* Create a new object to replace this stub object.
+ * @return object
*/
function _newObject() {
return MWFunction::newObj( $this->mClass, $this->mParams );
@@ -89,9 +90,10 @@ class StubObject {
function _unstub( $name = '_unstub', $level = 2 ) {
static $recursionLevel = 0;
- if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) )
+ if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) ) {
return $GLOBALS[$this->mGlobal]; // already unstubbed.
-
+ }
+
if ( get_class( $GLOBALS[$this->mGlobal] ) != $this->mClass ) {
$fname = __METHOD__.'-'.$this->mGlobal;
wfProfileIn( $fname );
@@ -116,6 +118,7 @@ class StubObject {
class StubContLang extends StubObject {
function __construct() {
+ wfDeprecated( __CLASS__, '1.18' );
parent::__construct( 'wgContLang' );
}
@@ -123,6 +126,9 @@ class StubContLang extends StubObject {
return $this->_call( $name, $args );
}
+ /**
+ * @return Language
+ */
function _newObject() {
global $wgLanguageCode;
$obj = Language::factory( $wgLanguageCode );
@@ -147,7 +153,10 @@ class StubUserLang extends StubObject {
return $this->_call( $name, $args );
}
+ /**
+ * @return Language
+ */
function _newObject() {
- return RequestContext::getMain()->getLang();
+ return RequestContext::getMain()->getLanguage();
}
}