mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Don't try to display docs files if they don't exist.
This commit is contained in:
parent
fdb57a7473
commit
0c106cd3ab
@ -1006,6 +1006,10 @@ function document_file($file, $include=true) {
|
||||
if (!file_exists($info->filepath)) {
|
||||
$info->filepath = "$CFG->dirroot/lang/en/docs/$file";
|
||||
$info->urlpath = "$CFG->wwwroot/lang/en/docs/$file";
|
||||
if (!file_exists($info->filepath)) {
|
||||
error("Error 404 - $file does not exist");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($include) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user