diff --git a/lib/moodlelib.php b/lib/moodlelib.php index f19b69fc26c..e71c25468bb 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -999,18 +999,14 @@ function document_file($file, $include=true) { /// Can include a given document file (depends on second /// parameter) or just return info about it - global $CFG, $SESSION; + global $CFG; if (empty($file)) { echo "Error 404"; return false; } - if (!empty($SESSION->doclang)) { - $lang = $SESSION->doclang; - } else { - $lang = current_language(); - } + $lang = current_language(); $file = clean_filename($file);