Permalink
Browse files

Now uses real current language (may not be the same as $CFG->lang)

  • Loading branch information...
1 parent a5e1f35 commit 5c0ee23cc39f327906a519070fa69cbf70622a10 moodler committed Oct 13, 2002
Showing with 4 additions and 2 deletions.
  1. +4 −2 help.php
View
@@ -10,6 +10,8 @@
optional_variable($text, "No text to display");
optional_variable($module, "moodle");
+ $lang = current_language();
+
print_header();
if (ereg("\\.\\.", $file)) {
@@ -18,9 +20,9 @@
if ($file) {
if ($module == "moodle") {
- $filepath = "$CFG->dirroot/lang/$CFG->lang/help/$file";
+ $filepath = "$CFG->dirroot/lang/$lang/help/$file";
} else {
- $filepath = "$CFG->dirroot/lang/$CFG->lang/help/$module/$file";
+ $filepath = "$CFG->dirroot/lang/$lang/help/$module/$file";
}
if (file_exists("$filepath")) {

0 comments on commit 5c0ee23

Please sign in to comment.