Now docs are showed in a new window based on $CFG->doctonewwindow
Merged from MOODLE_16_STABLE
This commit is contained in:
+6
-1
@@ -4908,6 +4908,11 @@ function page_doc_link($text='', $iconpath='') {
|
||||
$CFG->pagepath = $ME;
|
||||
}
|
||||
|
||||
$target = '';
|
||||
if (!empty($CFG->doctonewwindow)) {
|
||||
$target = ' target="_blank"';
|
||||
}
|
||||
|
||||
$path = str_replace($CFG->httpswwwroot.'/','', $CFG->pagepath); // Because the page could be HTTPSPAGEREQUIRED
|
||||
$path = str_replace('.php', '', $path);
|
||||
|
||||
@@ -4917,7 +4922,7 @@ function page_doc_link($text='', $iconpath='') {
|
||||
|
||||
$lang = str_replace('_utf8', '', current_language());
|
||||
|
||||
$str = '<a href="' .$CFG->docroot. '/' .$lang. '/' .$path. '">';
|
||||
$str = '<a href="' .$CFG->docroot. '/' .$lang. '/' .$path. '"' .$target. '>';
|
||||
|
||||
if (empty($iconpath)) {
|
||||
$iconpath = $CFG->wwwroot . '/pix/docs.gif';
|
||||
|
||||
Reference in New Issue
Block a user