r48982 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48981‎ | r48982 | r48983 >
Date:06:51, 29 March 2009
Author:nad
Status:deferred
Tags:
Comment:
last bug fix prevented ^$ from matching empty fields, fixed.
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -242,10 +242,10 @@
243243 $r = array( 0 => $t, 'title' => $t->getPrefixedText() );
244244 foreach ( array_keys( $this->types ) as $k ) {
245245 $v = isset( $posted[$k] ) ? ( $this->types[$k] == 'bool' ? 'yes' : $posted[$k] ) : '';
246 - if ( !preg_match( "|\s*\|\s*$k\s*=|", $text ) ) $text .= "\n|$k=|\n"; # Treat non-existent fields as existing but empty
 246+ if ( !preg_match( "|\s*\|\s*$k\s*=|", $text ) ) $text .= "\n|$k=\n|"; # Treat non-existent fields as existing but empty
247247 $i = preg_match( "|^\s*\|\s*$k\s*=\s*(.*?)\s*(?=^\s*[\|\}])|sm", $text, $m );
248 - if ( $v && !( $i && eregi( $v, $m[1] ) ) ) $match = false;
249248 $r[$k] = isset( $m[1] ) ? $m[1] : '';
 249+ if ( $v && !( $i && eregi( $v, $r[$k] ) ) ) $match = false;
250250 }
251251 if ( $invert ) $match = !$match;
252252 if ( $match ) $records[] = $r;

Status & tagging log