Merge pull request #41 from ajoneil/0.10

Fix errors when fulltext search is disabled.
This commit is contained in:
Sean Harvey 2017-02-02 15:59:08 +13:00 committed by GitHub
commit ce4ce0dfae

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 . "\";"; $drop = "IF EXISTS (SELECT name FROM sys.indexes WHERE name = '$index') DROP INDEX $index ON \"" . $tableName . "\";";
// create a type-specific index // create a type-specific index
if($indexSpec['type'] == 'fulltext' && $this->fullTextEnabled()) { if($indexSpec['type'] == 'fulltext') {
if(!$this->fullTextEnabled()) {
return;
}
// enable fulltext on this table // enable fulltext on this table
$this->createFullTextCatalog(); $this->createFullTextCatalog();
$primary_key = $this->getPrimaryKey($tableName); $primary_key = $this->getPrimaryKey($tableName);