From: moodler Date: Sat, 1 Jan 2005 04:37:40 +0000 (+0000) Subject: Fixed up some history linking X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=62119d659d6e26c4267184401a882f8c8f10af10;p=moodle.git Fixed up some history linking --- diff --git a/message/lib.php b/message/lib.php index 3478d48afc..68480fdd85 100644 --- a/message/lib.php +++ b/message/lib.php @@ -547,6 +547,24 @@ function message_contact_link ($userid, $linktype='add', $returnstr=false) { } } +function message_history_link ($userid1, $userid2=0, $returnstr=false) { + global $USER; + + if (!$userid2) { + $userid2 = $USER->id; + } + + $str = link_to_popup_window("/message/history.php?user1=$userid1&user2=$userid2", "message_history_$user->id", + get_string('messagehistory', 'message'), 500, 500, '', + 'menubar=0,location=0,statusbar,scrollbars,resizable,width=500,height=500', true); + + if ($returnstr) { + return $str; + } else { + echo $str; + return true; + } +} /** diff --git a/message/user.php b/message/user.php index 7de2486533..0085571948 100644 --- a/message/user.php +++ b/message/user.php @@ -1,6 +1,7 @@ '; - echo '
'; - echo 'id", "message_history_$user->id", - get_string('messagehistory', 'message'), 500, 500, ''); + echo '
'; + message_history_link($user->id); echo ''; echo ''; echo ''; // Close possible theme tables off