Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -298,15 +298,13 @@ |
299 | 299 | * Render a set of records returned by getRecords() as an HTML table |
300 | 300 | */ |
301 | 301 | function renderRecords( $records, $cols = false, $sortable = true, $template = false ) { |
302 | | - global $wgUser; |
| 302 | + global $wgParser; |
303 | 303 | if ( count( $records ) < 1 ) return wfMsg( 'recordadmin-nomatch' ); |
304 | 304 | |
305 | 305 | $special = Title::makeTitle( NS_SPECIAL, 'RecordAdmin' ); |
306 | 306 | $type = $this->type; |
307 | 307 | $sortable = $sortable ? ' sortable' : ''; |
308 | 308 | $br = $sortable ? '<br />' : ''; |
309 | | - $parser = new Parser; |
310 | | - $options = ParserOptions::newFromUser( $wgUser ); |
311 | 309 | |
312 | 310 | # Table header |
313 | 311 | $table = "<table class='recordadmin$sortable $type-record'>\n<tr>"; |
— | — | @@ -347,7 +345,7 @@ |
348 | 346 | $text .= "|$col=$v"; |
349 | 347 | } |
350 | 348 | $text .= '}}'; |
351 | | - $text = $parser->parse( $text, $special, $options, true, true )->getText(); |
| 349 | + $text = $wgParser->parse( $text, $special, $wgParser->mOptions, true, true )->getText(); |
352 | 350 | $text = preg_replace( "|<(/?td.*?)>|", "<$1>", $text ); |
353 | 351 | $table .= "$text\n"; |
354 | 352 | } |
— | — | @@ -481,7 +479,7 @@ |
482 | 480 | function parsePart($part) { |
483 | 481 | global $wgUser, $wgParser; |
484 | 482 | $options = ParserOptions::newFromUser( $wgUser ); |
485 | | - $html = $wgParser->parse($part[0], $this->mTitle, $options, true, true )->getText(); |
| 483 | + $html = $wgParser->parse($part[0], $this->title, $options, true, true )->getText(); |
486 | 484 | return preg_match("|(<option.+</option>)|s", $html, $m) ? $m[1] : ''; |
487 | 485 | } |
488 | 486 | |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'RECORDADMIN_VERSION', '0.6.1, 2009-03-29' ); |
| 15 | +define( 'RECORDADMIN_VERSION', '0.6.2, 2009-03-30' ); |
16 | 16 | |
17 | 17 | $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type |
18 | 18 | $wgRecordAdminCategory = 'Records'; # Category containing record types |