From 3bb3e4793cccb8774f738088d7c43e2b5c1b809a Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Thu, 11 Aug 2011 14:52:57 +0000 Subject: [PATCH] Add 2 @since and add documentation for PageContentLanguage hook --- docs/hooks.txt | 6 ++++++ includes/Title.php | 1 + languages/Language.php | 1 + 3 files changed, 8 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index 12741ea957..73008333fc 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1290,6 +1290,12 @@ $categories: associative array, keys are category names, values are category $links: array, intended to hold the result. Must be an associative array with category types as keys and arrays of HTML links as values. +'PageContentLanguage': allows changing the language in which the content of +a page is written. Defaults to the wiki content language ($wgContLang). +$title: Title object +&$pageLang: the page content language (either an object or a language code) +$wgLang: the user language + 'PageHistoryBeforeList': When a history page list is about to be constructed. $article: the article that the history is loading for diff --git a/includes/Title.php b/includes/Title.php index a6a9d7e19f..405d420390 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4277,6 +4277,7 @@ class Title { * Defaults to $wgContLang, but in certain cases it can be e.g. * $wgLang (such as special pages, which are in the user language). * + * @since 1.18 * @return object Language */ public function getPageLanguage() { diff --git a/languages/Language.php b/languages/Language.php index 55a2ee792c..a34a55879e 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -218,6 +218,7 @@ class Language { * * @param $code string * + * @since 1.18 * @return bool */ public static function isValidBuiltInCode( $code ) { -- 2.20.1