From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/Xml.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'includes/Xml.php') diff --git a/includes/Xml.php b/includes/Xml.php index c6c02867..f0bd70b2 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 ); -- cgit v1.2.3-54-g00ecf