Fixes.
[lhc/web/wiklou.git] / maintenance / updateSearchIndex.inc
index ed01575..bf2b8c3 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
- * @package MediaWiki
- * @subpackage Maintenance
+ * @addtogroup Maintenance
  */
 
 /** */
@@ -14,7 +13,7 @@ function updateSearchIndex( $start, $end, $maxLockTime, $quiet ) {
        $wgQuiet = $quiet;
        $wgDisableSearchUpdate = false;
 
-       $dbw =& wfGetDB( DB_MASTER );
+       $dbw = wfGetDB( DB_MASTER );
        $recentchanges = $dbw->tableName( 'recentchanges' );
 
        output( "Updating searchindex between $start and $end\n" );
@@ -74,7 +73,9 @@ function updateSearchIndex( $start, $end, $maxLockTime, $quiet ) {
 
        # Unlock searchindex
        if ( $maxLockTime ) {
+               output( "    --- Unlocking --" );
                unlockSearchindex( $dbw );
+               output( "\n" );
        }
        output( "Done\n" );
 }
@@ -91,11 +92,11 @@ function lockSearchindex( &$db ) {
                $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