mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Make use $this->database instead of $GLOBALS['database'] which doesn't always exist.
This commit is contained in:
parent
cf26621d57
commit
7c6c3166ee
@ -72,7 +72,7 @@ class MSSQLDatabase extends Database {
|
||||
|
||||
$result=$this->query("SELECT name FROM sys.fulltext_catalogs;");
|
||||
if(!$result)
|
||||
$this->query("CREATE FULLTEXT CATALOG {$GLOBALS['database']};");
|
||||
$this->query("CREATE FULLTEXT CATALOG $this->database;");
|
||||
|
||||
}
|
||||
/**
|
||||
@ -499,7 +499,7 @@ class MSSQLDatabase extends Database {
|
||||
if($result)
|
||||
$drop="DROP FULLTEXT INDEX ON \"" . $tableName . "\";";
|
||||
|
||||
return $drop . "CREATE FULLTEXT INDEX ON \"$tableName\" ({$indexSpec['value']}) KEY INDEX $primary_key ON {$GLOBALS['database']} WITH CHANGE_TRACKING AUTO;";
|
||||
return $drop . "CREATE FULLTEXT INDEX ON \"$tableName\" ({$indexSpec['value']}) KEY INDEX $primary_key ON $this->database WITH CHANGE_TRACKING AUTO;";
|
||||
|
||||
}
|
||||
|
||||
@ -810,7 +810,7 @@ class MSSQLDatabase extends Database {
|
||||
* Returns the SQL command to get all the tables in this database
|
||||
*/
|
||||
function allTablesSQL(){
|
||||
return "SELECT name FROM {$GLOBALS['database']}..sysobjects WHERE xtype = 'U';";
|
||||
return "SELECT name FROM $this->database..sysobjects WHERE xtype = 'U';";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user