From: jenkins-bot Date: Tue, 3 Nov 2015 22:10:54 +0000 (+0000) Subject: Merge "phpcs: Fix some "Single space expected before elseif"" X-Git-Tag: 1.31.0-rc.0~9115 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=edabb75ca859e7e22c0e529d8831f21512720afa;hp=ce9c1264b42eef9e89d1fdef11208b7fb2699b64;p=lhc%2Fweb%2Fwiklou.git Merge "phpcs: Fix some "Single space expected before elseif"" --- diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php index 58211484ab..6dad3424b1 100644 --- a/includes/search/SearchOracle.php +++ b/includes/search/SearchOracle.php @@ -191,8 +191,7 @@ class SearchOracle extends SearchDatabase { foreach ( $temp_terms as $t ) { $searchon .= ( $terms[1] == '-' ? ' ~' : ' & ' ) . $this->escapeTerm( $t ); } - } - else { + } else { $searchon .= ( $terms[1] == '-' ? ' ~' : ' & ' ) . $this->escapeTerm( $terms[2] ); } if ( !empty( $terms[3] ) ) { diff --git a/includes/search/SearchPostgres.php b/includes/search/SearchPostgres.php index 60c42496cd..649ef4f70f 100644 --- a/includes/search/SearchPostgres.php +++ b/includes/search/SearchPostgres.php @@ -84,14 +84,11 @@ class SearchPostgres extends SearchDatabase { } if ( strtolower( $terms[2] ) === 'and' ) { $searchstring .= ' & '; - } - elseif ( strtolower( $terms[2] ) === 'or' || $terms[2] === '|' ) { + } elseif ( strtolower( $terms[2] ) === 'or' || $terms[2] === '|' ) { $searchstring .= ' | '; - } - elseif ( strtolower( $terms[2] ) === 'not' ) { + } elseif ( strtolower( $terms[2] ) === 'not' ) { $searchstring .= ' & !'; - } - else { + } else { $searchstring .= " & $terms[2]"; } } @@ -147,8 +144,7 @@ class SearchPostgres extends SearchDatabase { $query = "SELECT page_id, page_namespace, page_title, 0 AS score " . "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " . "AND r.rev_text_id = c.old_id AND 1=0"; - } - else { + } else { $m = array(); if ( preg_match_all( "/'([^']+)'/", $top, $m, PREG_SET_ORDER ) ) { foreach ( $m as $terms ) { @@ -157,9 +153,9 @@ class SearchPostgres extends SearchDatabase { } $query = "SELECT page_id, page_namespace, page_title, " . - "ts_rank($fulltext, to_tsquery($searchstring), 5) AS score " . - "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " . - "AND r.rev_text_id = c.old_id AND $fulltext @@ to_tsquery($searchstring)"; + "ts_rank($fulltext, to_tsquery($searchstring), 5) AS score " . + "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " . + "AND r.rev_text_id = c.old_id AND $fulltext @@ to_tsquery($searchstring)"; } # # Namespaces - defaults to 0 diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc index 0ed584c480..0562333225 100644 --- a/maintenance/backupTextPass.inc +++ b/maintenance/backupTextPass.inc @@ -899,11 +899,9 @@ class TextPassDumper extends BackupDumper { } elseif ( $this->state == "page" ) { $this->thisPage .= $data; } - } - elseif ( $this->lastName == "model" ) { + } elseif ( $this->lastName == "model" ) { $this->thisRevModel .= $data; - } - elseif ( $this->lastName == "format" ) { + } elseif ( $this->lastName == "format" ) { $this->thisRevFormat .= $data; }