* Fixed a bug where moving a page would cause the following SQL error when
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 24 May 2005 14:56:07 +0000 (14:56 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 24 May 2005 14:56:07 +0000 (14:56 +0000)
  updating the searchindex:
    UPDATE `Array` SET si_title='page 1' WHERE si_page='2910'
  from within function "SearchMySQL4::updateTitle". MySQL returned error
  "1146: Table 'HEAD.Array' doesn't exist (localhost)".
  The new query causes the following to be executed:
    UPDATE `searchindex` SET si_title='page 1' WHERE si_page='2909'
  (somebody more familiar with the the whole searchindexing code please review
  the while move process)

includes/SearchMySQL.php

index 84571a5..29f3f1c 100644 (file)
@@ -172,7 +172,7 @@ class SearchMySQL extends SearchEngine {
     function updateTitle( $id, $title ) {
                $dbw =& wfGetDB( DB_MASTER );
                
-               $dbw->update( array( 'searchindex' ),
+               $dbw->update( 'searchindex',
                        array( 'si_title' => $title ),
                        array( 'si_page'  => $id ),
                        'SearchMySQL4::updateTitle',