Revert r95408, breaks preferences
authorSam Reed <reedy@users.mediawiki.org>
Wed, 24 Aug 2011 19:48:59 +0000 (19:48 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 24 Aug 2011 19:48:59 +0000 (19:48 +0000)
includes/HTMLForm.php

index 2579f92..cfaa9c4 100644 (file)
@@ -695,8 +695,9 @@ class HTMLForm {
                                        : $value->getDefault();
                                $tableHtml .= $value->getTableRow( $v );
 
-                               if ( $value->getLabel() != '&#160;' )
+                               if ( $value->getLabel() != '&#160;' ) {
                                        $hasLeftColumn = true;
+                               }
                        } elseif ( is_array( $value ) ) {
                                $section = $this->displaySection( $value, $key );
                                $legend = $this->getLegend( $key );
@@ -708,7 +709,7 @@ class HTMLForm {
                                }
                                $attributes = array();
                                if ( $displayTitle ) {
-                                       $attributes["title"] = Sanitizer::escapeId( $key );
+                                       $attributes["id"] = 'prefsection-' . Sanitizer::escapeId( $key, 'noninitial' );
                                }
                                $subsectionHtml .= Xml::fieldset( $legend, $section, $attributes ) . "\n";
                        }