dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix \n handling for HTMLUsersMultiselectField"
[lhc/web/wiklou.git]
/
includes
/
search
/
SearchOracle.php
diff --git
a/includes/search/SearchOracle.php
b/includes/search/SearchOracle.php
index
6dad342
..
2e6cb84
100644
(file)
--- a/
includes/search/SearchOracle.php
+++ b/
includes/search/SearchOracle.php
@@
-29,7
+29,7
@@
* @ingroup Search
*/
class SearchOracle extends SearchDatabase {
* @ingroup Search
*/
class SearchOracle extends SearchDatabase {
- private $reservedWords =
array(
+ private $reservedWords =
[
'ABOUT' => 1,
'ACCUM' => 1,
'AND' => 1,
'ABOUT' => 1,
'ACCUM' => 1,
'AND' => 1,
@@
-56,7
+56,7
@@
class SearchOracle extends SearchDatabase {
'TRSYN' => 1,
'TT' => 1,
'WITHIN' => 1,
'TRSYN' => 1,
'TT' => 1,
'WITHIN' => 1,
-
)
;
+
]
;
/**
* Perform a full text search query and return a result set.
/**
* Perform a full text search query and return a result set.
@@
-175,10
+175,10
@@
class SearchOracle extends SearchDatabase {
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$lc = $this->legalSearchChars();
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
$lc = $this->legalSearchChars();
- $this->searchTerms =
array()
;
+ $this->searchTerms =
[]
;
# @todo FIXME: This doesn't handle parenthetical expressions.
# @todo FIXME: This doesn't handle parenthetical expressions.
- $m =
array()
;
+ $m =
[]
;
$searchon = '';
if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
$searchon = '';
if ( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/',
$filteredText, $m, PREG_SET_ORDER ) ) {
@@
-231,12
+231,12
@@
class SearchOracle extends SearchDatabase {
function update( $id, $title, $text ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'searchindex',
function update( $id, $title, $text ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'searchindex',
-
array( 'si_page' )
,
- array(
+
[ 'si_page' ]
,
+ [
'si_page' => $id,
'si_title' => $title,
'si_text' => $text
'si_page' => $id,
'si_title' => $title,
'si_text' => $text
-
)
, 'SearchOracle::update' );
+
]
, 'SearchOracle::update' );
// Sync the index
// We need to specify the DB name (i.e. user/schema) here so that
// Sync the index
// We need to specify the DB name (i.e. user/schema) here so that
@@
-260,13
+260,13
@@
class SearchOracle extends SearchDatabase {
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'searchindex',
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'searchindex',
-
array( 'si_title' => $title )
,
-
array( 'si_page' => $id )
,
+
[ 'si_title' => $title ]
,
+
[ 'si_page' => $id ]
,
'SearchOracle::updateTitle',
'SearchOracle::updateTitle',
-
array()
);
+
[]
);
}
}
- public
static function legalSearchChars
() {
- return "\"" . parent::legalSearchChars();
+ public
function legalSearchCharsForUpdate
() {
+ return "\"" . parent::legalSearchChars
ForUpdate
();
}
}
}
}