Skip to content

Commit

Permalink
MDL-65558 auth_db: use , as port separator
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 10, 2019
1 parent 2018f4e commit 7991e30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions auth/db/tests/db_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ protected function init_auth_database() {
case 'mssql':
set_config('type', 'mssqlnative', 'auth_db');
set_config('sybasequoting', '1', 'auth_db');

// The native sqlsrv driver uses a comma as separator between host and port.
$dbhost = $CFG->dbhost;
if (!empty($dboptions['dbport'])) {
$dbhost .= ',' . $dboptions['dbport'];
}
set_config('host', $dbhost, 'auth_db');
break;

default:
Expand Down

0 comments on commit 7991e30

Please sign in to comment.