Fixed duplicate key issues
authorMarcel Werk <burntime@woltlab.com>
Tue, 28 Jan 2014 13:21:40 +0000 (14:21 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 28 Jan 2014 13:21:40 +0000 (14:21 +0100)
wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php

index 461f72ebc00e0dc36882c65787680e7e53677170..03a723b152b6a05ec780dea738194a1481ecf9e8 100644 (file)
@@ -61,7 +61,7 @@ class SearchIndexManager extends SingletonFactory {
                if ($languageID === null) $languageID = 0;
                
                // save new entry
-               $sql = "INSERT INTO     wcf".WCF_N."_search_index
+               $sql = "REPLACE INTO    wcf".WCF_N."_search_index
                                        (objectTypeID, objectID, subject, message, time, userID, username, languageID, metaData)
                        VALUES          (?, ?, ?, ?, ?, ?, ?, ?, ?)";
                $statement = WCF::getDB()->prepareStatement($sql);