Changed harcoded 'admin' to $CFG->admin

Merged from MOODLE_15_STABLE
This commit is contained in:
stronk7
2006-01-21 00:19:02 +00:00
parent 60e8150a83
commit d83f837385
+2 -2
View File
@@ -240,8 +240,8 @@ function load_environment_xml() {
/// First of all, take a look inside $CFG->dataroot/environment/environment.xml
$file = $CFG->dataroot.'/environment/environment.xml';
if (!is_file($file) || !is_readable($file) || !$contents = file_get_contents($file)) {
/// Fallback to fixed admin/environment.xml
$file = $CFG->dirroot.'/admin/environment.xml';
/// Fallback to fixed $CFG->admin/environment.xml
$file = $CFG->dirroot.'/'.$CFG->admin.'/environment.xml';
if (!is_file($file) || !is_readable($file) || !$contents = file_get_contents($file)) {
return false;
}