BUGFIX Make use $this->database instead of $GLOBALS['database'] which doesn't always exist.

This commit is contained in:
Sean Harvey 2009-03-23 01:21:28 +00:00
parent cf26621d57
commit 7c6c3166ee

View File

@ -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';";
}
/**