]> git.mjollnir.org Git - moodle.git/commitdiff
Teach XMLDB about the local/db folder, but only include it if the local folders exists.
authortjhunt <tjhunt>
Wed, 19 Dec 2007 15:06:51 +0000 (15:06 +0000)
committertjhunt <tjhunt>
Wed, 19 Dec 2007 15:06:51 +0000 (15:06 +0000)
admin/xmldb/actions/get_db_directories/get_db_directories.class.php

index 2ac174dbc600b626f1ccc4f710bc16e0ffbb0f25..918d69ed6a879ae89bd0ac22471b8a9c9c39effd 100644 (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);