mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Teach XMLDB about the local/db folder, but only include it if the local folders exists.
This commit is contained in:
parent
d77a74e3b4
commit
7588679f7a
@ -166,6 +166,16 @@ class get_db_directories extends XMLDBAction {
|
||||
}
|
||||
}
|
||||
|
||||
/// Local database changes, if the local folder exists.
|
||||
if (file_exists($CFG->dirroot . '/local')) {
|
||||
$dbdir = new stdClass;
|
||||
$dbdir->path = $CFG->dirroot . '/local/db';
|
||||
if (!isset($XMLDB->dbdirs[$dbdir->path])) {
|
||||
$XMLDB->dbdirs[$dbdir->path] = $dbdir;
|
||||
}
|
||||
$XMLDB->dbdirs[$dbdir->path]->path_exists = file_exists($dbdir->path); //Update status
|
||||
}
|
||||
|
||||
/// Sort by key
|
||||
ksort($XMLDB->dbdirs);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user