From: Ævar Arnfjörð Bjarmason Date: Fri, 26 Aug 2005 13:56:25 +0000 (+0000) Subject: * Safe html output with wfMsgHtml() X-Git-Tag: 1.6.0~1797 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=5e3539a4d153dbcdbd459595094047dc99df50e3;p=lhc%2Fweb%2Fwiklou.git * Safe html output with wfMsgHtml() * Fixed the indenting of the XML * Code cleanup --- diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 5fda2be58e..1ce1f4f737 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -61,7 +61,7 @@ function wfSpecialExport( $page = '' ) {

+" . wfMsgHtml( 'exportcuronly' ) . "
" ); @@ -195,10 +195,8 @@ class WikiExporter { function namespaces() { global $wgContLang; $spaces = "\n"; - foreach( $wgContLang->getNamespaces() as $ns => $title ) { - $spaces .= ' ' . wfElement( 'namespace', - array( 'key' => $ns ), - str_replace( '_', ' ', $title ) ) . "\n"; + foreach( $wgContLang->getFormattedNamespaces() as $ns => $title ) { + $spaces .= ' ' . wfElement( 'namespace', array( 'key' => $ns ), $title ) . "\n"; } $spaces .= " "; return $spaces; @@ -374,33 +372,32 @@ class WikiExporter { $fname = 'WikiExporter::dumpRev'; wfProfileIn( $fname ); - print " \n"; - print " " . wfElement( 'id', null, $row->rev_id ) . "\n"; + print " \n"; + print " " . wfElement( 'id', null, $row->rev_id ) . "\n"; $ts = wfTimestamp2ISO8601( $row->rev_timestamp ); - print " " . wfElement( 'timestamp', null, $ts ) . "\n"; + print " " . wfElement( 'timestamp', null, $ts ) . "\n"; - print " "; + print " \n"; if( $row->rev_user ) { - print wfElementClean( 'username', null, $row->rev_user_text ); - print wfElement( 'id', null, $row->rev_user ); + print " " . wfElementClean( 'username', null, $row->rev_user_text ) . "\n"; + print " " . wfElement( 'id', null, $row->rev_user ) . "\n"; } else { - print wfElementClean( 'ip', null, $row->rev_user_text ); + print " " . wfElementClean( 'ip', null, $row->rev_user_text ) . "\n"; } - print "\n"; + print " \n"; if( $row->rev_minor_edit ) { - print " \n"; + print " \n"; } if( $row->rev_comment != '' ) { - print " " . wfElementClean( 'comment', null, $row->rev_comment ) . "\n"; + print " " . wfElementClean( 'comment', null, $row->rev_comment ) . "\n"; } $text = Revision::getRevisionText( $row ); - print " " . wfElementClean( 'text', - array( 'xml:space' => 'preserve' ), $text ) . "\n"; + print " " . wfElementClean( 'text', array( 'xml:space' => 'preserve' ), $text ) . "\n"; - print " \n"; + print " \n"; wfProfileOut( $fname );