phpcs: Fix some "Single space expected before elseif"
Found by new version of mediawiki/codesniffer https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d
This commit is contained in:
parent
1b14b25a07
commit
7724e285fd
3 changed files with 10 additions and 17 deletions
|
|
@ -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] ) ) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue