]> git.mjollnir.org Git - moodle.git/commitdiff
Moodle Docs link on home page could be a bit confusing
authormoodler <moodler>
Sun, 16 Apr 2006 16:21:50 +0000 (16:21 +0000)
committermoodler <moodler>
Sun, 16 Apr 2006 16:21:50 +0000 (16:21 +0000)
lib/weblib.php

index f71ddd4efcd72378f6dbec336e07c2e08d7c158c..0c4799a3388dd840dc82eea702fd383f62f51ae1 100644 (file)
@@ -4859,6 +4859,11 @@ function page_doc_link($text='', $iconpath='') {
 
     $path = str_replace($CFG->httpswwwroot.'/','', $CFG->pagepath);  // Because the page could be HTTPSPAGEREQUIRED
     $path = str_replace('.php', '', $path);
+
+    if (empty($path)) {   // Not for home page
+        return '';
+    }
+
     $lang = str_replace('_utf8', '', current_language());
 
     $str = '<a href="' .$CFG->docroot. '/' .$lang. '/' .$path. '">';