Skip to content

Commit

Permalink
MDL-34309: Fix broken postgres unix sockets in core_adodb_testcase::t…
Browse files Browse the repository at this point in the history
…est_read_table
  • Loading branch information
Ashley Holman authored and Sam Hemelryk committed Jul 15, 2012
1 parent e7bf015 commit bf79f77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion enrol/database/tests/adodb_test.php
Expand Up @@ -70,7 +70,11 @@ public function test_read_table() {
set_config('dbsetupsql', 'SET NAMES \'UTF-8\'', 'enrol_database');
set_config('dbsybasequoting', '0', 'enrol_database');
if (!empty($CFG->dboptions['dbsocket']) and ($CFG->dbhost === 'localhost' or $CFG->dbhost === '127.0.0.1')) {
set_config('dbhost', $CFG->dboptions['dbsocket'], 'enrol_database');
if (strpos($CFG->dboptions['dbsocket'], '/') !== false) {
set_config('dbhost', $CFG->dboptions['dbsocket'], 'enrol_database');
} else {
set_config('dbhost', '', 'enrol_database');
}
}
break;

Expand Down

0 comments on commit bf79f77

Please sign in to comment.