From: moodler Date: Sat, 1 Jan 2005 04:22:19 +0000 (+0000) Subject: Added parameter to print_user_picture to allow links with target windows X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f66e1977bb1ad1b1183159b41113c6efa62090eb;p=moodle.git Added parameter to print_user_picture to allow links with target windows --- diff --git a/lib/weblib.php b/lib/weblib.php index f5a56c2387..4bd81931a5 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1981,11 +1981,14 @@ function print_file_picture($path, $courseid=0, $height='', $width='', $link='') * return string * @todo Finish documenting this function */ -function print_user_picture($userid, $courseid, $picture, $size=0, $returnstring=false, $link=true) { +function print_user_picture($userid, $courseid, $picture, $size=0, $returnstring=false, $link=true, $target='') { global $CFG; if ($link) { - $output = ''; + if ($target) { + $target=' target="_blank"'; + } + $output = ''; } else { $output = ''; }