From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/Xml.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'includes/Xml.php') diff --git a/includes/Xml.php b/includes/Xml.php index 67dda7fe..0fedcfa0 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -50,7 +50,9 @@ class Xml { $attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs ); } if( $contents ) { + wfProfileIn( __METHOD__ . '-norm' ); $contents = UtfNormal::cleanUp( $contents ); + wfProfileOut( __METHOD__ . '-norm' ); } return self::element( $element, $attribs, $contents ); } @@ -59,6 +61,14 @@ class Xml { public static function openElement( $element, $attribs = null ) { return self::element( $element, $attribs, null ); } public static function closeElement( $element ) { return ""; } + /** + * Same as element, but does not escape contents. Handy when the + * content you have is already valid xml. + */ + public static function tags( $element, $attribs = null, $contents ) { + return self::element( $element, $attribs, null ) . $contents . ""; + } + /** * Create a namespace selector * @@ -67,7 +77,7 @@ class Xml { * @param $includehidden Bool: include hidden namespaces? * @return String: Html string containing the namespace selector */ - public static function &namespaceSelector($selected = '', $allnamespaces = null, $includehidden=false) { + public static function namespaceSelector($selected = '', $allnamespaces = null, $includehidden=false) { global $wgContLang; if( $selected !== '' ) { if( is_null( $selected ) ) { -- cgit v1.2.2