Skip to content

Commit

Permalink
MDL-37767 allow empty host in enrol_database which is required for de…
Browse files Browse the repository at this point in the history
…fault pg socket
  • Loading branch information
skodak committed Jan 29, 2013
1 parent f89712d commit 1b2ab57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions enrol/database/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function instance_deleteable($instance) {
if (!enrol_is_enabled('database')) {
return true;
}
if (!$this->get_config('dbtype') or !$this->get_config('dbhost') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
if (!$this->get_config('dbtype') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
return true;
}

Expand Down Expand Up @@ -98,7 +98,7 @@ public function sync_user_enrolments($user) {
global $CFG, $DB;

// We do not create courses here intentionally because it requires full sync and is slow.
if (!$this->get_config('dbtype') or !$this->get_config('dbhost') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
if (!$this->get_config('dbtype') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
return;
}

Expand Down Expand Up @@ -292,7 +292,7 @@ public function sync_enrolments($verbose = false, $onecourse = null) {
global $CFG, $DB;

// We do not create courses here intentionally because it requires full sync and is slow.
if (!$this->get_config('dbtype') or !$this->get_config('dbhost') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
if (!$this->get_config('dbtype') or !$this->get_config('remoteenroltable') or !$this->get_config('remotecoursefield') or !$this->get_config('remoteuserfield')) {
if ($verbose) {
mtrace('User enrolment synchronisation skipped.');
}
Expand Down Expand Up @@ -639,7 +639,7 @@ public function sync_courses($verbose = false) {
global $CFG, $DB;

// Make sure we sync either enrolments or courses.
if (!$this->get_config('dbtype') or !$this->get_config('dbhost') or !$this->get_config('newcoursetable') or !$this->get_config('newcoursefullname') or !$this->get_config('newcourseshortname')) {
if (!$this->get_config('dbtype') or !$this->get_config('newcoursetable') or !$this->get_config('newcoursefullname') or !$this->get_config('newcourseshortname')) {
if ($verbose) {
mtrace('Course synchronisation skipped.');
}
Expand Down

0 comments on commit 1b2ab57

Please sign in to comment.