From 773446596333bc2a67702bedbf92fd667c3d2f00 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 4 Jan 2008 06:45:55 +0000 Subject: [PATCH] =?utf8?q?MDL-12429=20Applied=20and=20tested=20Fran=E7ois'?= =?utf8?q?=20patches=20to=201.8,=201.9=20and=20head.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/weblib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 224ff4932e..8681aca026 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -7,7 +7,7 @@ // Moodle - Modular Object-Oriented Dynamic Learning Environment // // http://moodle.com // // // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // +// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // // // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // @@ -6852,15 +6852,16 @@ function doc_link($path='', $text='', $iconpath='') { if (empty($CFG->docroot)) { return ''; } + + $lang = str_replace('_utf8', '', current_language()); + $url = $CFG->docroot. '/' .$lang. '/' .$path; $target = ''; if (!empty($CFG->doctonewwindow)) { - $target = ' target="_blank"'; + $target = " onclick=\"window.open('$url'); return false;\""; } - $lang = str_replace('_utf8', '', current_language()); - - $str = ''; + $str = ""; if (empty($iconpath)) { $iconpath = $CFG->httpswwwroot . '/pix/docs.gif'; -- 2.39.5