From 2fb4181ad422ec117508e67c29fad7e6a7dbb570 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 4 Jan 2014 22:03:02 +0100 Subject: [PATCH] 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 --- includes/specials/SpecialProtectedpages.php | 4 ++-- maintenance/fixDoubleRedirects.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 214fbd9fd3..09284d0a9a 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -425,8 +425,8 @@ class ProtectedPagesPager extends AlphabeticPager { 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 523be7efe7..8ae5a5a342 100644 --- a/maintenance/fixDoubleRedirects.php +++ b/maintenance/fixDoubleRedirects.php @@ -71,7 +71,7 @@ class FixDoubleRedirects extends Maintenance { '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, ); -- 2.20.1