Skip to content
Browse files

MDL-37767 allow empty host in enrol_database which is required for de…

…fault pg socket
  • Loading branch information...
1 parent f89712d commit 1b2ab57a92bc1cede27638e94e0d384363430ceb @skodak skodak committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 enrol/database/lib.php
View
8 enrol/database/lib.php
@@ -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;
}
@@ -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;
}
@@ -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.');
}
@@ -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.');
}

0 comments on commit 1b2ab57

Please sign in to comment.
Something went wrong with that request. Please try again.