r22086 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22085‎ | r22086 | r22087 >
Date:21:09, 10 May 2007
Author:hashar
Status:old
Tags:
Comment:
Dont rely Xml::element with null content to open an element instead
use Xml::openElement instead (see bug 5312).
Modified paths:
  • /trunk/extensions/BotQuery/query.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BotQuery/query.php
@@ -2640,7 +2640,7 @@
26412641 case 'array':
26422642 echo '<struct>';
26432643 foreach( $elemValue as $subElemName => &$subElemValue ) {
2644 - echo wfElement( 'var', array('name' => $subElemName), null );
 2644+ echo wfOpenElement( 'var', array('name' => $subElemName) );
26452645 slowWddxPrinter( $subElemValue );
26462646 echo '</var>';
26472647 }
@@ -2703,14 +2703,14 @@
27042704 $subElemContent = $elemValue['*'];
27052705 unset( $elemValue['*'] );
27062706 if( gettype( $subElemContent ) === 'array' ) {
2707 - $printer( $indstr . wfElement( $elemName, $elemValue, null ));
 2707+ $printer( $indstr . wfOpenElement( $elemName, $elemValue ));
27082708 recXmlPrint( $printer, $elemName, $subElemContent, $indent );
27092709 $printer( $indstr . "</$elemName>" );
27102710 } else {
27112711 $printer( $indstr . wfElement( $elemName, $elemValue, $subElemContent ));
27122712 }
27132713 } else {
2714 - $printer( $indstr . wfElement( $elemName, null, null ));
 2714+ $printer( $indstr . wfOpenElement( $elemName, null ));
27152715 if( array_key_exists('_element', $elemValue) ) {
27162716 $subElemName = $elemValue['_element'];
27172717 foreach( $elemValue as $subElemId => &$subElemValue ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r22083Some fixes to avoid Xml::element call with null content when we actually want...hashar20:51, 10 May 2007