r49031 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49030‎ | r49031 | r49032 >
Date:10:56, 30 March 2009
Author:nad
Status:deferred
Tags:
Comment:
use new parser but $wgParser's options
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -302,6 +302,7 @@
303303 if ( count( $records ) < 1 ) return wfMsg( 'recordadmin-nomatch' );
304304
305305 $special = Title::makeTitle( NS_SPECIAL, 'RecordAdmin' );
 306+ $parser = new Parser;
306307 $type = $this->type;
307308 $sortable = $sortable ? ' sortable' : '';
308309 $br = $sortable ? '<br />' : '';
@@ -345,7 +346,7 @@
346347 $text .= "|$col=$v";
347348 }
348349 $text .= '}}';
349 - $text = $wgParser->parse( $text, $special, $wgParser->mOptions, true, true )->getText();
 350+ $text = $wgParser->parse( $text, $special, $parser->mOptions, true, true )->getText();
350351 $text = preg_replace( "|&lt;(/?td.*?)&gt;|", "<$1>", $text );
351352 $table .= "$text\n";
352353 }
@@ -359,7 +360,7 @@
360361 );
361362 foreach ( $cols ? $cols : array_keys( $th ) as $col ) {
362363 if ( !isset( $row[$col] ) ) {
363 - $v = isset( $r[$col] ) ? $wgParser->parse( $r[$col], $special, $wgParser->mOptions, true, true )->getText() : '&nbsp;';
 364+ $v = isset( $r[$col] ) ? $parser->parse( $r[$col], $special, $wgParser->mOptions, true, true )->getText() : '&nbsp;';
364365 $class = 'col' . preg_replace( '|\W|', '-', $col );
365366 $row[$col] = "<td class='$class'>$v</td>";
366367 }

Status & tagging log