* @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ * * * @uses $vars['entity'] Optionally, the message to view * @uses get_input('type') If the user accesses the message from their sentbox, this variable is passed * and used to make sure the correct icon and name is displayed */ // set some variables to use below if(get_input("type") == "sent"){ // send back to the users sentbox $url = $vars['url'] . "mod/messages/sent.php"; //this is used on the delete link so we know which type of message it is $type = "sent"; } else { //send back to the users inbox $url = $vars['url'] . "pg/messages/" . $vars['user']->username; //this is used on the delete link so we know which type of message it is $type = "inbox"; } // fix for RE: RE: RE: that builds on replies $reply_title = $vars['entity']->title; if (strncmp($reply_title, "RE:", 3) != 0) { $reply_title = "RE: " . $reply_title; } if (isloggedin()) if (isset($vars['entity'])) { if ($vars['entity']->toId == $vars['user']->guid || $vars['entity']->owner_guid == $vars['user']->guid) { ?>