r66602 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66601‎ | r66602 | r66603 >
Date:04:45, 18 May 2010
Author:nad
Status:deferred
Tags:
Comment:
escape single quotes when comparing values
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -420,7 +420,7 @@
421421 * - $b is the expression from the recordtable query
422422 */
423423 function cmpCallback( $a, $b, $operator ) {
424 - $b = str_replace( '/', '\/', $b );
 424+ $b = preg_replace( "|([/']|g", "\\$1", $b );
425425 switch ( $operator ) {
426426 case '=':
427427 $cond = preg_match( "/$b/i", $a );
Index: trunk/extensions/RecordAdmin/RecordAdmin.php
@@ -11,7 +11,7 @@
1212 * @licence GNU General Public Licence 2.0 or later
1313 */
1414
15 -define( 'RECORDADMIN_VERSION', '0.11.11, 2010-04-21' );
 15+define( 'RECORDADMIN_VERSION', '0.11.12, 2010-05-18' );
1616
1717 $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type
1818 $wgRecordAdminCategory = 'Records'; # Category containing record types

Status & tagging log