Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | foreach ( array_keys( $this->types ) as $k ) { |
245 | 245 | $v = isset( $posted[$k] ) ? ( $this->types[$k] == 'bool' ? 'yes' : $posted[$k] ) : ''; |
246 | 246 | if ( !preg_match( "|\s*\|\s*$k\s*=|", $text ) ) $text .= "\n|$k=|\n"; # Treat non-existent fields as existing but empty |
247 | | - $i = preg_match( "|\s*\|\s*$k\s*=\s*(.*?)\s*(?=[\|\}])|si", $text, $m ); |
| 247 | + $i = preg_match( "|^\s*\|\s*$k\s*=\s*(.*?)\s*(?=^\s*[\|\}])|sm", $text, $m ); |
248 | 248 | if ( $v && !( $i && eregi( $v, $m[1] ) ) ) $match = false; |
249 | 249 | $r[$k] = isset( $m[1] ) ? $m[1] : ''; |
250 | 250 | } |
— | — | @@ -342,8 +342,14 @@ |
343 | 343 | # Render this row |
344 | 344 | if ( $template ) { |
345 | 345 | $text = '{'.'{'."$template|title=$col|created=$tsc|modified=$tsm"; |
| 346 | + foreach ( array_keys( $this->types ) as $col ) { |
| 347 | + $v = isset( $r[$col] ) ? $r[$col] : ''; |
| 348 | + $text .= "|$col=$v"; |
| 349 | + } |
346 | 350 | $text .= '}}'; |
347 | | - $table .= $parser->parse( $text, $special, $options, true, true )->getText(); |
| 351 | + $text = $parser->parse( $text, $special, $options, true, true )->getText(); |
| 352 | + $text = preg_replace( "|<(/?td.*?)>|", "<$1>", $text ); |
| 353 | + $table .= "$text\n"; |
348 | 354 | } |
349 | 355 | else { |
350 | 356 | $row = array( |
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.0, 2009-03-22' ); |
| 15 | +define( 'RECORDADMIN_VERSION', '0.6.1, 2009-03-29' ); |
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 |