diff --git a/library/Icinga/Application/Platform.php b/library/Icinga/Application/Platform.php index 2bfb3863a..e05251801 100644 --- a/library/Icinga/Application/Platform.php +++ b/library/Icinga/Application/Platform.php @@ -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'); } /**