r60198 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60197‎ | r60198 | r60199 >
Date:02:49, 18 December 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fix breakage of LinkFilter::makeLike() due to attempted rewrite in r60162. It's meant to return the string without the quotes, not the whole clause.
Modified paths:
  • /trunk/phase3/includes/LinkFilter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LinkFilter.php
@@ -59,8 +59,13 @@
6060 return false;
6161 }
6262 $dbw = wfGetDB( DB_MASTER );
63 -
64 - return $dbw->buildLike( $like );
 63+ $s = $dbw->buildLike( $like );
 64+ $m = false;
 65+ if ( preg_match( "/^ *LIKE '(.*)' *$/", $s, $m ) ) {
 66+ return $m[1];
 67+ } else {
 68+ throw new MWException( __METHOD__.': this DBMS is not supported by this function.' );
 69+ }
6570 }
6671
6772 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r60162Fixup for r57989: removed artifacts of the previous version of my patch, impr...maxsem15:39, 17 December 2009

Status & tagging log