jenkins-bot has submitted this change and it was merged. Change subject: Fix documentation in Linker::formatTemplates. ......................................................................
Fix documentation in Linker::formatTemplates. Follow up to 265404d93cd99bf067064f947f5fc361f54466d7. Make it clear that when a string is passed to the function, it has to be already escaped. Also added Message as a possible parameter type. Change-Id: I4fb309d0dfcdf61b92c42db4b7ca2ea651d5f071 --- M includes/Linker.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Linker.php b/includes/Linker.php index 2f6ee22..ce82274 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1927,13 +1927,13 @@ * Make an HTML list of templates, and then add a "More..." link at * the bottom. If $more is null, do not add a "More..." link. If $more * is a Title, make a link to that title and use it. If $more is a string, - * directly paste it in as the link. + * directly paste it in as the link (escaping needs to be done manually). + * Finally, if $more is a Message, call toString(). * - * @param $templates Array of templates from Article::getUsedTemplate - * or similar + * @param array $templates Array of templates from Article::getUsedTemplate or similar * @param bool $preview Whether this is for a preview * @param bool $section Whether this is for a section edit - * @param Title|string|null $more A link for "More..." of the templates + * @param Title|Message|string|null $more An escaped link for "More..." of the templates * @return String: HTML output */ public static function formatTemplates( $templates, $preview = false, $section = false, $more = null ) { -- To view, visit https://gerrit.wikimedia.org/r/44092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4fb309d0dfcdf61b92c42db4b7ca2ea651d5f071 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Parent5446 <tylerro...@gmail.com> Gerrit-Reviewer: IAlex <ialex.w...@gmail.com> Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com> Gerrit-Reviewer: Yurik <yuriastrak...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits