Skip to content

Commit

Permalink
MDL-28701 Added $CFG->tempdir setting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlanyon authored and skodak committed Sep 10, 2011
1 parent 5d2db8a commit 3e93987
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/setup.php
Expand Up @@ -36,6 +36,7 @@
* - $CFG->dataroot - Path to moodle data files directory on server's filesystem.
* - $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.
*
* @global object $CFG
* @name $CFG
Expand Down Expand Up @@ -96,6 +97,11 @@
// Set up some paths.
$CFG->libdir = $CFG->dirroot .'/lib';

// Allow overriding of tempdir but be backwards compatible with dataroot/temp
if (!isset($CFG->tempdir)) {
$CFG->tempdir = "$CFG->dataroot/temp";
}

// The current directory in PHP version 4.3.0 and above isn't necessarily the
// directory of the script when run from the command line. The require_once()
// would fail, so we'll have to chdir()
Expand Down

0 comments on commit 3e93987

Please sign in to comment.