MDL-24848 prevent undefined docs url problems in install

This commit is contained in:
Petr Skoda 2010-10-26 08:01:22 +00:00
parent 14a0e7ddff
commit 8260ca36d5

View File

@ -2786,7 +2786,11 @@ function convert_tabrows_to_tree($tabrows, $selected, $inactive, $activated) {
*/
function get_docs_url($path) {
global $CFG;
return $CFG->docroot . '/' . current_language() . '/' . $path;
if (!empty($CFG->docroot)) {
return $CFG->docroot . '/' . current_language() . '/' . $path;
} else {
return 'http://docs.moodle.org/en/'.$path;
}
}