Teach XMLDB about the local/db folder, but only include it if the local folders exists.

This commit is contained in:
tjhunt 2007-12-19 15:06:51 +00:00
parent d77a74e3b4
commit 7588679f7a

View File

@ -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);