From: jeroendedauw Date: Thu, 9 Aug 2012 12:29:46 +0000 (+0200) Subject: Added missing @since and @return tags so other people dont have to waste their time... X-Git-Tag: 1.31.0-rc.0~22791 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=025f03ec88866a3fd6a860b81343e4f313fb8ab0;p=lhc%2Fweb%2Fwiklou.git Added missing @since and @return tags so other people dont have to waste their time figuring it out as well Change-Id: I84e75da7bdbf30b57368eca0051b1aa664afc798 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 66da408872..b3512908bd 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -735,16 +735,22 @@ class Parser { /** * Get the target language for the content being parsed. This is usually the * language that the content is in. + * + * @since 1.19 + * + * @return Language|null */ - function getTargetLanguage() { + public function getTargetLanguage() { $target = $this->mOptions->getTargetLanguage(); + if ( $target !== null ) { return $target; } elseif( $this->mOptions->getInterfaceMessage() ) { return $this->mOptions->getUserLangObj(); } elseif( is_null( $this->mTitle ) ) { - throw new MWException( __METHOD__.': $this->mTitle is null' ); + throw new MWException( __METHOD__ . ': $this->mTitle is null' ); } + return $this->mTitle->getPageLanguage(); }