message MDLSITE-1039 made clicking on a contacts name work on the message search...
authorAndrew Davis <andrew@affinitysoftware.net>
Wed, 6 Oct 2010 07:41:23 +0000 (07:41 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Wed, 6 Oct 2010 07:41:23 +0000 (07:41 +0000)
message/contacts.php

index 820bad5..d83fc85 100644 (file)
@@ -44,6 +44,13 @@ $unblockcontact = optional_param('unblockcontact', 0, PARAM_INT); // unblocking
 $advancedsearch = optional_param('advanced', 0, PARAM_INT);
 $usergroup = optional_param('usergroup', VIEW_UNREAD_MESSAGES, PARAM_ALPHANUMEXT);
 
+//id will be supplied if they've clicked on someone in their contact list
+//if they have redirect to recent messages exchanged with that user
+$user2 = optional_param('id', 0, PARAM_INT);
+if (!empty($user2)) {
+    redirect('index.php?id='.$user2);
+}
+
 $url = new moodle_url('/message/contacts.php');
 /*if ($addcontact !== 0) {
     $url->param('addcontact', $addcontact);