* - $CFG->dirroot - Path to moodle's library folder on server's filesystem.
* - $CFG->libdir - Path to moodle's library folder on server's filesystem.
* - $CFG->tempdir - Path to moodle's temp file directory on server's filesystem.
+ * - $CFG->cachedir - Path to moodle's cache directory on server's filesystem.
*
* @global object $CFG
* @name $CFG
// Set up some paths.
$CFG->libdir = $CFG->dirroot .'/lib';
-// Allow overriding of tempdir but be backwards compatible with tempdir
+// Allow overriding of tempdir but be backwards compatible
if (!isset($CFG->tempdir)) {
- $CFG->tempdir = "$CFG->tempdir";
+ $CFG->tempdir = "$CFG->dataroot/temp";
+}
+
+// Allow overriding of cachedir but be backwards compatible
+if (!isset($CFG->cachedir)) {
+ $CFG->cachedir = "$CFG->dataroot/cache";
}
// The current directory in PHP version 4.3.0 and above isn't necessarily the