From 7588679f7a0cba4d53ac2cad9c5f03b8c4c6b250 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 19 Dec 2007 15:06:51 +0000 Subject: [PATCH] Teach XMLDB about the local/db folder, but only include it if the local folders exists. --- .../get_db_directories/get_db_directories.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/xmldb/actions/get_db_directories/get_db_directories.class.php b/admin/xmldb/actions/get_db_directories/get_db_directories.class.php index 2ac174dbc60..918d69ed6a8 100644 --- a/admin/xmldb/actions/get_db_directories/get_db_directories.class.php +++ b/admin/xmldb/actions/get_db_directories/get_db_directories.class.php @@ -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);