(bug 6392) Fix misbehaving <br /> in preferences form
authorRob Church <robchurch@users.mediawiki.org>
Thu, 22 Jun 2006 01:40:51 +0000 (01:40 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 22 Jun 2006 01:40:51 +0000 (01:40 +0000)
RELEASE-NOTES
includes/SpecialPreferences.php

index 90a182b..1e926ef 100644 (file)
@@ -534,6 +534,7 @@ Some default configuration options have changed:
 * Remove unused "validation" table definitions from the schema files
 * (bug 6398) Work around apparent PCRE bug breaking section editing when
   massively-indented preformatted text immediately followed a header
+* (bug 6392) Fix misbehaving <br /> in preferences form
 
 
 == Compatibility ==
index 1ade307..b4a5669 100644 (file)
@@ -691,12 +691,14 @@ class PreferencesForm {
                }
                # </FIXME>
 
-               if ($wgAllowRealName || $wgEnableEmail) {
-                       $wgOut->addHTML("<div class='prefsectiontip'>");
-                       $rn = $wgAllowRealName ? wfMsg('prefs-help-realname') : '';
-                       $em = $wgEnableEmail ? '<br />' .  wfMsg('prefs-help-email') : '';
-                       $wgOut->addHTML( $rn . $em  . '</div>');
-               }
+               # Show little "help" tips for the real name and email address options
+               if( $wgAllowRealName || $wgEnableEmail ) {
+                       if( $wgAllowRealName )
+                               $tips[] = wfMsg( 'prefs-help-realname' );
+                       if( $wgEnableEmail )
+                               $tips[] = wfMsg( 'prefs-help-email' );
+                       $wgOut->addHtml( '<div class="prefsectiontip">' . implode( '<br />', $tips ) . '</div>' );
+               }               
 
                $wgOut->addHTML( '</fieldset>' );