Platform: Also check for the sqlsrv extension when checking MSSQL support

refs #3320
This commit is contained in:
Johannes Meyer 2018-04-24 15:56:29 +02:00
parent 24128e0cc3
commit b14b61d37a
1 changed files with 9 additions and 3 deletions

View File

@ -345,14 +345,20 @@ class Platform
/**
* Return whether it's possible to connect to a MSSQL database
*
* Checks whether the mssql pdo extension has been loaded and Zend framework adapter for MSSQL is available
* Checks whether the mssql/dblib pdo or sqlsrv extension has
* been loaded and Zend framework adapter for MSSQL is available
*
* @return bool
*/
public static function hasMssqlSupport()
{
return (static::extensionLoaded('mssql') || static::extensionLoaded('pdo_dblib'))
&& static::classExists('Zend_Db_Adapter_Pdo_Mssql');
if ((static::extensionLoaded('mssql') || static::extensionLoaded('pdo_dblib'))
&& static::classExists('Zend_Db_Adapter_Pdo_Mssql')
) {
return true;
}
return static::extensionLoaded('sqlsrv') && static::classExists('Zend_Db_Adapter_Sqlsrv');
}
/**