MDL-27695 Documentation : updated the moodle docs link at the footer of pages to point to new docs url

This commit is contained in:
Aparup Banerjee
2011-06-08 13:42:00 +08:00
parent 59d8944377
commit 7bfc8766bc
+6 -1
View File
@@ -6968,7 +6968,12 @@ function doc_link($path='', $text='', $iconpath='') {
$lang = str_replace('_utf8', '', current_language());
$str = '<a href="' .$CFG->docroot. '/' .$lang. '/' .$path. '"' .$target. '>';
//derive branch from the first three letters of version.php's $release with the period taken out.($CFG->release isn't populated yet during upgrade)
include($CFG->dirroot.'/version.php');
preg_match('/^(.)\.(.)/', $release, $matches);
$branch = $matches[1].$matches[2];
$str = '<a href="' .$CFG->docroot. '/' .$branch. '/' .$lang. '/' .$path. '"' .$target. '>';
if (empty($iconpath)) {
$iconpath = $CFG->httpswwwroot . '/pix/docs.gif';