Now docs are showed in a new window based on $CFG->doctonewwindow

Merged from MOODLE_16_STABLE
This commit is contained in:
stronk7
2006-06-20 13:53:09 +00:00
parent d3b9dbad78
commit 7038fe44bf
+6 -1
View File
@@ -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';