X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXml.php;h=78b87159216d6f121feca4c850756bcf0e945363;hb=a26ea0bf8283c4fd9ecff990bef9bf2b63ec0d26;hp=159f711464c7ac78d7f1ebe8d93aaf596f13ed02;hpb=38d59dd21347dc5167fbef94a0558f6bbdcd4195;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Xml.php b/includes/Xml.php index 159f711464..78b8715921 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -94,9 +94,7 @@ class Xml { $attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs ); } if ( $contents ) { - wfProfileIn( __METHOD__ . '-norm' ); $contents = $wgContLang->normalize( $contents ); - wfProfileOut( __METHOD__ . '-norm' ); } return self::element( $element, $attribs, $contents ); } @@ -368,12 +366,10 @@ class Xml { public static function label( $label, $id, $attribs = array() ) { $a = array( 'for' => $id ); - # FIXME avoid copy pasting below: - if ( isset( $attribs['class'] ) ) { - $a['class'] = $attribs['class']; - } - if ( isset( $attribs['title'] ) ) { - $a['title'] = $attribs['title']; + foreach ( array( 'class', 'title' ) as $attr ) { + if ( isset( $attribs[$attr] ) ) { + $a[$attr] = $attribs[$attr]; + } } return self::element( 'label', $a, $label );