mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merged change to restore $CFG->prefix from stable
This commit is contained in:
parent
e351205034
commit
ea8dedc882
@ -26,6 +26,7 @@ function get_student_courses(&$user) {
|
||||
// The following hack will make the database explicit which keeps it happy
|
||||
|
||||
if (strpos($CFG->prefix, $CFG->dbname) === false) {
|
||||
$oldprefix = $CFG->prefix;
|
||||
$CFG->prefix = "$CFG->dbname.$CFG->prefix";
|
||||
}
|
||||
|
||||
@ -77,6 +78,10 @@ function get_student_courses(&$user) {
|
||||
|
||||
$enroldb->Close();
|
||||
}
|
||||
|
||||
if (!empty($oldprefix)) {
|
||||
$CFG->prefix = $oldprefix; // Restore it just in case
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user