jenkins-bot has submitted this change and it was merged. Change subject: Fix quotes in string literal of SQL query ......................................................................
Fix quotes in string literal of SQL query String literals should be enclosed in single quotes, not double quotes, which makes the query to fail in postgreSQL. In general, double quotes are used in database engines to delimiter identifiers, and not string literals (mostly known as "quoted identifier") Bug report in extension's talk page: https://www.mediawiki.org/wiki/Thread:Extension_talk:BlockAndNuke/ban.php_error_-_column_%22upload%22_does_not_exist Change-Id: Ib2b40d9734604cfae397cafc30f7a92d44dc4940 --- M BanPests.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: MarkAHershberger: Looks good to me, approved jenkins-bot: Verified diff --git a/BanPests.php b/BanPests.php index 92c15b6..0c07475 100644 --- a/BanPests.php +++ b/BanPests.php @@ -23,8 +23,8 @@ $cond = array( 'rc_new' => 1 ); /* Anyone creating new pages */ $cond[] = $dbr->makeList( /* Anyone uploading stuff */ array( - 'rc_log_type' => "upload", - 'rc_log_action' => "upload" + 'rc_log_type' => 'upload', + 'rc_log_action' => 'upload' ), LIST_AND ); $cond[] = $dbr->makeList( /* New Users older than a day who haven't done anything yet */ array( @@ -81,7 +81,7 @@ array( 'rc_namespace', 'rc_title', 'rc_timestamp', 'COUNT(*) AS edits' ), array( 'rc_user_text' => $user, - '(rc_new = 1) OR (rc_log_type = "upload" AND rc_log_action = "upload")' + '(rc_new = 1) OR (rc_log_type = \'upload\' AND rc_log_action = \'upload\')' ), __METHOD__, array( -- To view, visit https://gerrit.wikimedia.org/r/173306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2b40d9734604cfae397cafc30f7a92d44dc4940 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlockAndNuke Gerrit-Branch: master Gerrit-Owner: Martineznovo <[email protected]> Gerrit-Reviewer: MarkAHershberger <[email protected]> Gerrit-Reviewer: Qgil <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
