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
Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexi...
[lhc/web/wiklou.git]
/
includes
/
SearchEngine.php
diff --git
a/includes/SearchEngine.php
b/includes/SearchEngine.php
index
5423b47
..
c3b3851
100644
(file)
--- a/
includes/SearchEngine.php
+++ b/
includes/SearchEngine.php
@@
-48,7
+48,7
@@
class SearchEngine {
* @static
* @param string $term
* @return Title
* @static
* @param string $term
* @return Title
- * @
access
private
+ * @private
*/
function getNearMatch( $term ) {
# Exact match? No need to look further.
*/
function getNearMatch( $term ) {
# Exact match? No need to look further.
@@
-80,7
+80,7
@@
class SearchEngine {
if ( $title->exists() ) {
return $title;
}
if ( $title->exists() ) {
return $title;
}
-
+
# Now try Word-Caps-Breaking-At-Word-Breaks, for hyphenated names etc
$title = Title::newFromText( preg_replace_callback(
'/\b([\w\x80-\xff]+)\b/',
# Now try Word-Caps-Breaking-At-Word-Breaks, for hyphenated names etc
$title = Title::newFromText( preg_replace_callback(
'/\b([\w\x80-\xff]+)\b/',
@@
-92,7
+92,7
@@
class SearchEngine {
if ( $title->exists() ) {
return $title;
}
if ( $title->exists() ) {
return $title;
}
-
+
global $wgCapitalLinks, $wgContLang;
if( !$wgCapitalLinks ) {
// Catch differs-by-first-letter-case-only
global $wgCapitalLinks, $wgContLang;
if( !$wgCapitalLinks ) {
// Catch differs-by-first-letter-case-only
@@
-187,7
+187,7
@@
class SearchEngine {
* active database backend, and return a configured instance.
*
* @return SearchEngine
* active database backend, and return a configured instance.
*
* @return SearchEngine
- * @
access
private
+ * @private
*/
function create() {
global $wgDBtype, $wgSearchType;
*/
function create() {
global $wgDBtype, $wgSearchType;
@@
-195,10
+195,8
@@
class SearchEngine {
$class = $wgSearchType;
} elseif( $wgDBtype == 'mysql' ) {
$class = 'SearchMySQL4';
$class = $wgSearchType;
} elseif( $wgDBtype == 'mysql' ) {
$class = 'SearchMySQL4';
- require_once( 'SearchMySQL4.php' );
- } else if ( $wgDBtype == 'PostgreSQL' ) {
- $class = 'SearchTsearch2';
- require_once( 'SearchTsearch2.php' );
+ } else if ( $wgDBtype == 'postgres' ) {
+ $class = 'SearchPostgres';
} else {
$class = 'SearchEngineDummy';
}
} else {
$class = 'SearchEngineDummy';
}
@@
-344,4
+342,4
@@
class SearchEngineDummy {
function searchtitle() {}
function searchtext() {}
}
function searchtitle() {}
function searchtext() {}
}
-
+?>