From: jenkins-bot Date: Fri, 2 Aug 2013 04:35:16 +0000 (+0000) Subject: Merge "mediawiki.util: Optimise logic in addPortletLink" X-Git-Tag: 1.31.0-rc.0~19058 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=4383ca0679a55486ef903e781e210a75a609a8ce;hp=5f3b75dd360c5b5e260b47eadce45a613b6de390;p=lhc%2Fweb%2Fwiklou.git Merge "mediawiki.util: Optimise logic in addPortletLink" --- diff --git a/includes/User.php b/includes/User.php index 1d665034db..cca0458c45 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1828,8 +1828,14 @@ class User { } /** - * Return the revision and link for the oldest new talk page message for - * this user. + * Return the data needed to construct links for new talk page message + * alerts. If there are new messages, this will return an associative array + * with the following data: + * wiki: The database name of the wiki + * link: Root-relative link to the user's talk page + * rev: The last talk page revision that the user has seen or null. This + * is useful for building diff links. + * If there are no new messages, it returns an empty array. * @note This function was designed to accomodate multiple talk pages, but * currently only returns a single link and revision. * @return Array @@ -1853,8 +1859,9 @@ class User { } /** - * Get the revision ID for the oldest new talk page message for this user - * @return int|null Revision id or null if there are no new messages + * Get the revision ID for the last talk page revision viewed by the talk + * page owner. + * @return int|null Revision ID or null */ public function getNewMessageRevisionId() { $newMessageRevisionId = null; diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index b01f162877..bde508a29b 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -280,9 +280,17 @@ class ParserOptions { } /** + * Get the user language used by the parser for this page. + * * You shouldn't use this. Really. $parser->getFunctionLang() is all you need. - * Using this fragments the cache and is discouraged. Yes, {{int: }} uses this, - * producing inconsistent tables (Bug 14404). + * + * To avoid side-effects where the page will be rendered based on the language + * of the user who last saved, this function will triger a cache fragmentation. + * Usage of this method is discouraged for that reason. + * + * When saving, this will return the default language instead of the user's. + * + * {{int: }} uses this which used to produce inconsistent link tables (bug 14404). * * @return Language object * @since 1.19