From 8260ca36d5334cfac66459b104985e8b733be822 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 26 Oct 2010 08:01:22 +0000 Subject: [PATCH] MDL-24848 prevent undefined docs url problems in install --- lib/weblib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index ff9d755d077..cdf51a68eb7 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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; + } } -- 2.43.0