r49032 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49031‎ | r49032 | r49033 >
Date:11:02, 30 March 2009
Author:nad
Status:deferred
Tags:
Comment:
back to $wgParser but don't reset
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -302,7 +302,6 @@
303303 if ( count( $records ) < 1 ) return wfMsg( 'recordadmin-nomatch' );
304304
305305 $special = Title::makeTitle( NS_SPECIAL, 'RecordAdmin' );
306 - $parser = new Parser;
307306 $type = $this->type;
308307 $sortable = $sortable ? ' sortable' : '';
309308 $br = $sortable ? '<br />' : '';
@@ -346,7 +345,7 @@
347346 $text .= "|$col=$v";
348347 }
349348 $text .= '}}';
350 - $text = $wgParser->parse( $text, $special, $parser->mOptions, true, true )->getText();
 349+ $text = $wgParser->parse( $text, $special, $wgParser->mOptions, true, false )->getText();
351350 $text = preg_replace( "|&lt;(/?td.*?)&gt;|", "<$1>", $text );
352351 $table .= "$text\n";
353352 }
@@ -360,7 +359,7 @@
361360 );
362361 foreach ( $cols ? $cols : array_keys( $th ) as $col ) {
363362 if ( !isset( $row[$col] ) ) {
364 - $v = isset( $r[$col] ) ? $parser->parse( $r[$col], $special, $wgParser->mOptions, true, true )->getText() : '&nbsp;';
 363+ $v = isset( $r[$col] ) ? $wgParser->parse( $r[$col], $special, $wgParser->mOptions, true, false )->getText() : '&nbsp;';
365364 $class = 'col' . preg_replace( '|\W|', '-', $col );
366365 $row[$col] = "<td class='$class'>$v</td>";
367366 }

Status & tagging log