mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-59509 dml: sqlsrv should respect port setting
Details of how to connect to a specific port are available at https://docs.microsoft.com/en-us/sql/connect/php/how-to-connect-on-a-specified-port
This commit is contained in:
parent
16a68a2f76
commit
e879619477
1 changed files with 7 additions and 1 deletions
|
@ -182,7 +182,13 @@ class sqlsrv_native_moodle_database extends moodle_database {
|
|||
sqlsrv_configure("LogSeverity", SQLSRV_LOG_SEVERITY_ERROR);
|
||||
|
||||
$this->store_settings($dbhost, $dbuser, $dbpass, $dbname, $prefix, $dboptions);
|
||||
$this->sqlsrv = sqlsrv_connect($this->dbhost, array
|
||||
|
||||
$dbhost = $this->dbhost;
|
||||
if (!empty($dboptions['dbport'])) {
|
||||
$dbhost .= ',' . $dboptions['dbport'];
|
||||
}
|
||||
|
||||
$this->sqlsrv = sqlsrv_connect($dbhost, array
|
||||
(
|
||||
'UID' => $this->dbuser,
|
||||
'PWD' => $this->dbpass,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue