jenkins-bot has submitted this change and it was merged.

Change subject: Remove extra parenthesis on where conditions
......................................................................


Remove extra parenthesis on where conditions

No need for parenthesis there, because Database::makeList always add
parenthesis around raw where clauses.

Also replaced hard coded quotes by Database::addQuotes

Change-Id: Idcfea54383ac1ba22daa38fba81b883dc0d883f6
---
M includes/specials/SpecialProtectedpages.php
M maintenance/fixDoubleRedirects.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/specials/SpecialProtectedpages.php 
b/includes/specials/SpecialProtectedpages.php
index 214fbd9..09284d0 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -425,8 +425,8 @@
 
        function getQueryInfo() {
                $conds = $this->mConds;
-               $conds[] = '(pr_expiry>' . $this->mDb->addQuotes( 
$this->mDb->timestamp() ) .
-                       'OR pr_expiry IS NULL)';
+               $conds[] = 'pr_expiry > ' . $this->mDb->addQuotes( 
$this->mDb->timestamp() ) .
+                       'OR pr_expiry IS NULL';
                $conds[] = 'page_id=pr_page';
                $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
 
diff --git a/maintenance/fixDoubleRedirects.php 
b/maintenance/fixDoubleRedirects.php
index 523be7e..8ae5a5a 100644
--- a/maintenance/fixDoubleRedirects.php
+++ b/maintenance/fixDoubleRedirects.php
@@ -71,7 +71,7 @@
                        'rd_from = pa.page_id',
                        'rd_namespace = pb.page_namespace',
                        'rd_title = pb.page_title',
-                       '(rd_interwiki IS NULL OR rd_interwiki = "")', // bug 
40352
+                       'rd_interwiki IS NULL OR rd_interwiki = ' . 
$dbr->addQuotes( '' ), // bug 40352
                        'pb.page_is_redirect' => 1,
                );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcfea54383ac1ba22daa38fba81b883dc0d883f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to