Jack Phoenix has submitted this change and it was merged.

Change subject: Remove use of DatabaseBase::strencode()
......................................................................


Remove use of DatabaseBase::strencode()

Change-Id: Idbc74cde1954036ce396662410930094904f3c5d
---
M SpecialNewVideos.php
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpecialNewVideos.php b/SpecialNewVideos.php
index 8d7dc07..2216c33 100644
--- a/SpecialNewVideos.php
+++ b/SpecialNewVideos.php
@@ -106,10 +106,8 @@
                if ( $wpIlMatch != '' ) {
                        $nt = Title::newFromUrl( $wpIlMatch );
                        if ( $nt ) {
-                               $m = $dbr->strencode( strtolower( 
$nt->getDBkey() ) );
-                               $m = str_replace( '%', "\\%", $m );
-                               $m = str_replace( '_', "\\_", $m );
-                               $where[] = "LCASE(video_name) LIKE '%{$m}%'";
+                               $where[] = 'LCASE(video_name)' . 
$dbr->buildLike(
+                                       $dbr->anyString(), strtolower( 
$nt->getDBkey() ), $dbr->anyString() );
                                $searchpar['wpIlMatch'] = $wpIlMatch;
                        }
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbc74cde1954036ce396662410930094904f3c5d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: PleaseStand <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: PleaseStand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to