function privatemsg_back_to_list in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_back_to_list()
1 string reference to 'privatemsg_back_to_list'
- privatemsg_menu in ./
privatemsg.module - Implementation of hook_menu().
File
- ./
privatemsg.module, line 1993
Code
function privatemsg_back_to_list($message_id) {
global $user;
$message = db_fetch_object(db_query("SELECT folder, recipient FROM {privatemsg} WHERE id = %d", $message_id));
if ($message->fid > 0) {
drupal_goto('privatemsg/list/' . $fid);
}
else {
drupal_goto('privatemsg' . ($user->uid == $message->recipient ? '' : '/' . $message->recipient));
}
}