jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349278 )

Change subject: Revert "Use $dbr->buildLike() instead of manual LIKE"
......................................................................


Revert "Use $dbr->buildLike() instead of manual LIKE"

This breaks SQL wildcards.

This reverts commit 2a63769238f19bc8d3533f31f4c226e9cce78856.

Bug: T123449
Change-Id: I473fcabf147b24b266ba6556d32a3990274da4ab
---
M Nuke_body.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Brian Wolff: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Nuke_body.php b/Nuke_body.php
index 6cfe5ef..d86fcb9 100644
--- a/Nuke_body.php
+++ b/Nuke_body.php
@@ -268,7 +268,9 @@
 
                $pattern = $this->getRequest()->getText( 'pattern' );
                if ( !is_null( $pattern ) && trim( $pattern ) !== '' ) {
-                       $where[] = 'rc_title ' . $dbr->buildLike( $pattern );
+                       // $pattern is a SQL pattern supporting wildcards, so 
buildLike
+                       // will not work.
+                       $where[] = 'rc_title LIKE ' . $dbr->addQuotes( $pattern 
);
                }
                $group = implode( ', ', $what );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I473fcabf147b24b266ba6556d32a3990274da4ab
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to