Add .php5 entry for mwScriptLoader.
[lhc/web/wiklou.git] / maintenance / updateSearchIndex.inc
index 21e2df4..ed7e46a 100644 (file)
@@ -20,8 +20,8 @@ function updateSearchIndex( $start, $end, $maxLockTime, $quiet ) {
        output( "Updating searchindex between $start and $end\n" );
 
        # Select entries from recentchanges which are on top and between the specified times
-       $start = $dbw->strencode( $start );
-       $end = $dbw->strencode( $end );
+       $start = $dbw->strencode( $dbw->timestamp( $start ) );
+       $end = $dbw->strencode( $dbw->timestamp( $end ) );
 
        $page = $dbw->tableName( 'page' );
        $sql = "SELECT rc_cur_id,rc_type,rc_moved_to_ns,rc_moved_to_title FROM $recentchanges
@@ -90,8 +90,8 @@ function lockSearchindex( &$db ) {
 # Unlock and lock again
 # Since the lock is low-priority, queued reads will be able to complete
 function relockSearchindex( &$db ) {
-       unlockSearchindex( $db );
        $db->unlockTables( 'updateSearchIndex.inc ' . __METHOD__ );
+       lockSearchindex( $db );
 }
 
 function output( $text ) {