r100256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100255‎ | r100256 | r100257 >
Date:18:57, 19 October 2011
Author:vasilievvv
Status:ok (Comments)
Tags:
Comment:
Add comment explaining why we do not need second parameter to preg_quote, per Nikerabbit's comments on r100139 CR.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.parser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.parser.php
@@ -1751,6 +1751,7 @@
17521752
17531753 $string = $args[0]->toString();
17541754
 1755+ // preg_quote does not need the second parameter, since rlike takes care of the delimiter symbol itself
17551756 return new AFPData( AFPData::DString, preg_quote( $string ) );
17561757 }
17571758

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100139(part of this commit is in r100135 due to SVN fail)...vasilievvv17:57, 18 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   19:03, 19 October 2011

I looked the code for rlike and didn't find where it does this. Can you point me to it?

#Comment by VasilievVV (talk | contribs)   19:06, 19 October 2011

$pattern = preg_replace( '!(\\\\\\\\)*(\\\\)?/!', '$1\/', $pattern );

(line 212 as of current revision)

#Comment by Nikerabbit (talk | contribs)   19:10, 19 October 2011

I thought that was ascii art :)

Status & tagging log