Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -242,10 +242,10 @@ |
243 | 243 | $r = array( 0 => $t, 'title' => $t->getPrefixedText() ); |
244 | 244 | foreach ( array_keys( $this->types ) as $k ) { |
245 | 245 | $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 |
247 | 247 | $i = preg_match( "|^\s*\|\s*$k\s*=\s*(.*?)\s*(?=^\s*[\|\}])|sm", $text, $m ); |
248 | | - if ( $v && !( $i && eregi( $v, $m[1] ) ) ) $match = false; |
249 | 248 | $r[$k] = isset( $m[1] ) ? $m[1] : ''; |
| 249 | + if ( $v && !( $i && eregi( $v, $r[$k] ) ) ) $match = false; |
250 | 250 | } |
251 | 251 | if ( $invert ) $match = !$match; |
252 | 252 | if ( $match ) $records[] = $r; |