mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
fix for 4758
This commit is contained in:
parent
b2a90f76b2
commit
9214c22430
1 changed files with 25 additions and 5 deletions
30
help.php
30
help.php
|
@ -37,11 +37,23 @@
|
|||
continue;
|
||||
}
|
||||
if ($module == 'moodle') {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $file;
|
||||
if ($lang == 'en_utf8') {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $file;
|
||||
} else {
|
||||
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $file;
|
||||
}
|
||||
} else {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
if ($lang == 'en_utf8') {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
} else {
|
||||
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
}
|
||||
if (!file_exists($filepath)) {
|
||||
$filepath = $CFG->dirroot.'/mod/'.$module.'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
if ($lang == 'en_utf8') {
|
||||
$filepath = $CFG->dirroot.'/mod/'.$module.'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
} else {
|
||||
$filepath = $CFG->dataroot.'/mod/'.$module.'/lang/'. $lang .'/help/'. $module .'/'. $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,7 +79,11 @@
|
|||
if (empty($lang)) {
|
||||
continue;
|
||||
}
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $mod->name .'/'. $file;
|
||||
if ($lang == 'en_utf8') {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/'. $mod->name .'/'. $file;
|
||||
} else {
|
||||
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/'. $mod->name .'/'. $file;
|
||||
}
|
||||
|
||||
if (file_exists($filepath)) {
|
||||
echo '<hr size="1" />';
|
||||
|
@ -90,7 +106,11 @@
|
|||
if (empty($lang)) {
|
||||
continue;
|
||||
}
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/resource/type/'. $type .'.html';
|
||||
if ($lang == 'en_utf8') {
|
||||
$filepath = $CFG->dirroot .'/lang/'. $lang .'/help/resource/type/'. $type .'.html';
|
||||
} else {
|
||||
$filepath = $CFG->dataroot .'/lang/'. $lang .'/help/resource/type/'. $type .'.html';
|
||||
}
|
||||
if (file_exists($filepath)) {
|
||||
echo '<hr size="1" />';
|
||||
include($filepath); // The actual helpfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue