r99613 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99612‎ | r99613 | r99614 >
Date:00:43, 12 October 2011
Author:khorn
Status:ok
Tags:fundraising 
Comment:
Escaping my debug-only output.
r98202
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/gateway_common/GatewayForm.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/gateway_common/GatewayForm.php
@@ -338,12 +338,12 @@
339339 if ( $this->adapter->getGlobal( 'DisplayDebug' ) !== true ){
340340 return;
341341 }
342 - $wgOut->addHTML( $results['message'] );
 342+ $wgOut->addHTML( HTML::element( 'span', null, $results['message'] ) );
343343
344344 if ( !empty( $results['errors'] ) ) {
345345 $wgOut->addHTML( "<ul>" );
346346 foreach ( $results['errors'] as $code => $value ) {
347 - $wgOut->addHTML( "<li>Error $code: $value" );
 347+ $wgOut->addHTML( HTML::element('li', null, "Error $code: $value" ) );
348348 }
349349 $wgOut->addHTML( "</ul>" );
350350 }
@@ -352,13 +352,13 @@
353353 $wgOut->addHTML( "<ul>" );
354354 foreach ( $results['data'] as $key => $value ) {
355355 if ( is_array( $value ) ) {
356 - $wgOut->addHTML( "<li>$key:<ul>" );
 356+ $wgOut->addHTML( HTML::element('li', null, $key ) . '<ul>' );
357357 foreach ( $value as $key2 => $val2 ) {
358 - $wgOut->addHTML( "<li>$key2: $val2" );
 358+ $wgOut->addHTML( HTML::element('li', null, "$key2: $val2" ) );
359359 }
360360 $wgOut->addHTML( "</ul>" );
361361 } else {
362 - $wgOut->addHTML( "<li>$key: $value" );
 362+ $wgOut->addHTML( HTML::element('li', null, "$key: $value" ) );
363363 }
364364 }
365365 $wgOut->addHTML( "</ul>" );
@@ -368,7 +368,7 @@
369369 if ( array_key_exists( 'Donor', $_SESSION ) ) {
370370 $wgOut->addHTML( "Session Donor Vars:<ul>" );
371371 foreach ( $_SESSION['Donor'] as $key => $val ) {
372 - $wgOut->addHTML( "<li>$key: $val" );
 372+ $wgOut->addHTML( HTML::element('li', null, "$key: $val" ) );
373373 }
374374 $wgOut->addHTML( "</ul>" );
375375 } else {
@@ -378,7 +378,7 @@
379379 if ( is_array( $this->adapter->debugarray ) ) {
380380 $wgOut->addHTML( "Debug Array:<ul>" );
381381 foreach ( $this->adapter->debugarray as $val ) {
382 - $wgOut->addHTML( "<li>$val" );
 382+ $wgOut->addHTML( HTML::element('li', null, $val ) );
383383 }
384384 $wgOut->addHTML( "</ul>" );
385385 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98202More refactoring work for the gateway adapters, mostly surrounding the specia...khorn00:48, 27 September 2011

Status & tagging log