|
|
@@ -133,16 +133,16 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
|
|
|
$connectionInfo = array(
|
|
|
'Database' => $this->_config['dbname'],
|
|
|
);
|
|
|
-
|
|
|
- if (isset($this->_config['username']) && isset($this->_config['password']))
|
|
|
- {
|
|
|
- $connectionInfo += array(
|
|
|
- 'UID' => $this->_config['username'],
|
|
|
- 'PWD' => $this->_config['password'],
|
|
|
- );
|
|
|
- }
|
|
|
- // else - windows authentication
|
|
|
-
|
|
|
+
|
|
|
+ if (isset($this->_config['username']) && isset($this->_config['password']))
|
|
|
+ {
|
|
|
+ $connectionInfo += array(
|
|
|
+ 'UID' => $this->_config['username'],
|
|
|
+ 'PWD' => $this->_config['password'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+ // else - windows authentication
|
|
|
+
|
|
|
if (!empty($this->_config['driver_options'])) {
|
|
|
foreach ($this->_config['driver_options'] as $option => $value) {
|
|
|
// A value may be a constant.
|
|
|
@@ -167,15 +167,15 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
|
|
|
throw new Zend_Db_Adapter_Sqlsrv_Exception(sqlsrv_errors());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
+
|
|
|
+ /**
|
|
|
* Check for config options that are mandatory.
|
|
|
* Throw exceptions if any are missing.
|
|
|
*
|
|
|
* @param array $config
|
|
|
* @throws Zend_Db_Adapter_Exception
|
|
|
*/
|
|
|
- protected function _checkRequiredOptions(array $config)
|
|
|
+ protected function _checkRequiredOptions(array $config)
|
|
|
{
|
|
|
// we need at least a dbname
|
|
|
if (! array_key_exists('dbname', $config)) {
|
|
|
@@ -190,7 +190,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
|
|
|
*/
|
|
|
require_once 'Zend/Db/Adapter/Exception.php';
|
|
|
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'password' for login credentials.
|
|
|
- If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
|
|
|
+ If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
|
|
|
}
|
|
|
|
|
|
if (array_key_exists('password', $config) && !array_key_exists('username', $config)) {
|
|
|
@@ -199,7 +199,7 @@ class Zend_Db_Adapter_Sqlsrv extends Zend_Db_Adapter_Abstract
|
|
|
*/
|
|
|
require_once 'Zend/Db/Adapter/Exception.php';
|
|
|
throw new Zend_Db_Adapter_Exception("Configuration array must have a key for 'username' for login credentials.
|
|
|
- If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
|
|
|
+ If Windows Authentication is desired, both keys 'username' and 'password' should be ommited from config.");
|
|
|
}
|
|
|
}
|
|
|
|