You are here

function _privatemsg_view in Privatemsg 5.3

Same name and namespace in other branches
  1. 5 privatemsg.module \_privatemsg_view()
1 call to _privatemsg_view()
privatemsg_view in ./privatemsg.module
Display a private message to a user.

File

./privatemsg.module, line 1837

Code

function _privatemsg_view($message) {
  global $user;

  // Allow other modules to change the message.
  privatemsg_invoke_privatemsg($message, 'view');
  if ($message->newmsg && $user->uid == $message->recipient) {
    db_query("UPDATE {privatemsg} SET newmsg = 0 WHERE id = %d", $message->id);
  }
  return theme('privatemsg_view', $message, FALSE);
}