MDL-22320 Fixed broken message links in message block
authorMartin Dougiamas <martin@moodle.com>
Sun, 3 Oct 2010 16:50:23 +0000 (16:50 +0000)
committerMartin Dougiamas <martin@moodle.com>
Sun, 3 Oct 2010 16:50:23 +0000 (16:50 +0000)
blocks/messages/block_messages.php

index 4ed83c0..20b5ee9 100644 (file)
@@ -49,10 +49,10 @@ class block_messages extends block_base {
                 $this->content->text .= $OUTPUT->user_picture($user, array('courseid'=>SITEID)); //TODO: user might not have capability to view frontpage profile :-(
                 $this->content->text .= fullname($user).'</a></div>';
 
                 $this->content->text .= $OUTPUT->user_picture($user, array('courseid'=>SITEID)); //TODO: user might not have capability to view frontpage profile :-(
                 $this->content->text .= fullname($user).'</a></div>';
 
-                $link = '/message/discussion.php?id='.$user->id;
+                $link = '/message/index.php?usergroup=unread&id='.$user->id;
                 $anchortagcontents = '<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="" />&nbsp;'.$user->count;
 
                 $anchortagcontents = '<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="" />&nbsp;'.$user->count;
 
-                $action = new popup_action('click', $link, 'message_'.$user->id);
+                $action = null; // popup is gone now
                 $anchortag = $OUTPUT->action_link($link, $anchortagcontents, $action);
 
                 $this->content->text .= '<div class="message">'.$anchortag.'</div></li>';
                 $anchortag = $OUTPUT->action_link($link, $anchortagcontents, $action);
 
                 $this->content->text .= '<div class="message">'.$anchortag.'</div></li>';