diff --git a/MWSearch_body.php b/MWSearch_body.php index 9ad9b4a..80bd1f5 100644 --- a/MWSearch_body.php +++ b/MWSearch_body.php @@ -422,7 +422,9 @@ class LuceneSearchSet extends SearchResultSet { global $wgLuceneHost, $wgLucenePort, $wgDBname, $wgMemc; global $wgLuceneSearchVersion, $wgLuceneSearchCacheExpiry; - +// kmas added + global $wgDBprefix; +// kmas added end $hosts = $wgLuceneHost; if( $method == 'prefix'){ global $wgLucenePrefixHost; @@ -438,7 +440,11 @@ class LuceneSearchSet extends SearchResultSet { } $enctext = rawurlencode( trim( $query ) ); - $searchUrl = "http://$host:$wgLucenePort/$method/$wgDBname/$enctext?" . +// kmas modified +// $searchUrl = "http://$host:$wgLucenePort/$method/$wgDBname/$enctext?" . + $dbname = rtrim($wgDBprefix, "_"); + $searchUrl = "http://$host:$wgLucenePort/$method/$dbname/$enctext?" . +// kmas modified end wfArrayToCgi( array( 'namespaces' => implode( ',', $namespaces ), 'offset' => $offset,