r45820 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45819‎ | r45820 | r45821 >
Date:23:04, 16 January 2009
Author:ashley
Status:ok
Tags:
Comment:
allow extensions that use 'UserCreateForm' to add checkboxes into the signup form to define messages containing HTML. this can be very useful and necessary; think of something like a checkbox "I have read the site's terms of use", it would obviously need to link to the terms of use page. using msgWiki() instead of msgHtml() here would probably be safer, but msgWiki() likes to mess things up by introducing <p> tags and this is meant for extensions, so it won't cause any more risks than the current existing system messages that allow HTML inclusion.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/templates/Userlogin.php
@@ -242,7 +242,7 @@
243243 if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
244244 ?>
245245 <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
246 - $this->msg( $inputItem['msg'] ) ?></label><?php
 246+ $this->msgHtml( $inputItem['msg'] ) ?></label><?php
247247 }
248248 ?>
249249 </td>
Index: trunk/phase3/RELEASE-NOTES
@@ -34,6 +34,9 @@
3535 * (bug 17002) Add &minor= and &summary= as parameters in the url when editing,
3636 to automatically add a summary or a minor edit.
3737 * (bug 16852) padleft and padright now accept multiletter pad characters
 38+* When using 'UserCreateForm' hook to add new checkboxes into Special:UserLogin/signup,
 39+ the messages can now contain HTML to allow hyperlinking to the site's Terms
 40+ of Service page, for example
3841
3942 === Bug fixes in 1.15 ===
4043 * (bug 16968) Special:Upload no longer throws useless warnings.

Status & tagging log