Agora_Driver::replyMessage PHP Method

replyMessage() public method

Returns a hash with all information necessary to reply to a message.
public replyMessage ( mixed $message ) : array
$message mixed The ID of the parent message to reply to, or arry of its data.
return array A hash with all relevant information.
    public function replyMessage($message)
    {
        if (!is_array($message)) {
            $message = $this->getMessage($message);
        }
        /* Set up the form subject with the parent subject. */
        if (Horde_String::lower(Horde_String::substr($message['message_subject'], 0, 3)) != 're:') {
            $message['message_subject'] = 'Re: ' . $message['message_subject'];
        }
        /* Prepare the message quite body . */
        $message['body'] = sprintf(_("Posted by %s on %s"), htmlspecialchars($message['message_author']), strftime($GLOBALS['prefs']->getValue('date_format'), $message['message_timestamp'])) . "\n-------------------------------------------------------\n" . $message['body'];
        $message['body'] = "\n> " . Horde_String::wrap($message['body'], 60, "\n> ");
        return $message;
    }