Changed harcoded 'admin' to $CFG->admin
Merged from MOODLE_15_STABLE
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user