return NULL;
}
- function legalSearchChars() {
+ public static function legalSearchChars() {
return "A-Za-z_'0-9\\x80-\\xFF\\-";
}
* active database backend, and return a configured instance.
*
* @return SearchEngine
- * @private
*/
- function create() {
+ public static function create() {
global $wgDBtype, $wgSearchType;
if( $wgSearchType ) {
$class = $wgSearchType;
wfProfileIn( $fname );
$search = SearchEngine::create();
- $lc = $search->legalSearchChars() . '&#;';
+ $lc = SearchEngine::legalSearchChars() . '&#;';
if( $this->mText === false ) {
$search->updateTitle($this->mId,
* @return string a stripped-down title string ready for the
* search index
*/
- /* static */ function indexTitle( $ns, $title ) {
+ public static function indexTitle( $ns, $title ) {
global $wgContLang;
$lc = SearchEngine::legalSearchChars() . '&#;';
# Unlock searchindex
if ( $maxLockTime ) {
+ output( " --- Unlocking --" );
unlockSearchindex( $dbw );
+ output( "\n" );
}
output( "Done\n" );
}
$items[] = $db->tableName( $table ) . ' READ';
}
$sql = "LOCK TABLES " . implode( ',', $items );
- $db->query( $sql );
+ $db->query( $sql, 'updateSearchIndex.inc ' . __METHOD__ );
}
function unlockSearchindex( &$db ) {
- $db->query( "UNLOCK TABLES" );
+ $db->query( "UNLOCK TABLES", 'updateSearchIndex.inc ' . __METHOD__ );
}
# Unlock and lock again