MDL-27695 Documentation : updated the moodle docs link at the footer of pages to point to new docs url
This commit is contained in:
+6
-1
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user