Fix errors when fulltext search is disabled.

Prevent attempted creation of non-fulltext index when fulltext search is not available.
This commit is contained in:
Andrew O'Neil 2017-02-02 13:53:21 +11:00
parent f86eae35e1
commit 12758e7cec

View File

@ -943,7 +943,11 @@ class MSSQLDatabase extends SS_Database {
$drop = "IF EXISTS (SELECT name FROM sys.indexes WHERE name = '$index') DROP INDEX $index ON \"" . $tableName . "\";";
// create a type-specific index
if($indexSpec['type'] == 'fulltext' && $this->fullTextEnabled()) {
if($indexSpec['type'] == 'fulltext') {
if(!$this->fullTextEnabled()) {
return;
}
// enable fulltext on this table
$this->createFullTextCatalog();
$primary_key = $this->getPrimaryKey($tableName);