Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…fault pg socket
  • Loading branch information...
commit 06ffb6544bb0364d7c5a113df5bfca92bd9dd1a1 1 parent 6e607d4
@skodak skodak authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 enrol/database/lib.php
View
8 enrol/database/lib.php
@@ -43,7 +43,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;
}
@@ -99,7 +99,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;
}
@@ -288,7 +288,7 @@ public function sync_enrolments($verbose = false) {
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.');
}
@@ -593,7 +593,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.');
}
Please sign in to comment.
Something went wrong with that request. Please try again.