diff --git a/privatemsg.module b/privatemsg.module index 26db22b..3e96eb1 100644 --- a/privatemsg.module +++ b/privatemsg.module @@ -507,7 +507,7 @@ function privatemsg_thread_load($thread_id, $account = NULL, $start = NULL, $use if (!$thread['read_all']) { $conditions['account'] = $account; } - $thread['messages'] = privatemsg_message_load_multiple($query->execute()->fetchCol(), $conditions); + $thread['messages'] = privatemsg_msg_load_multiple($query->execute()->fetchCol(), $conditions); // If there are no messages, don't allow access to the thread. if (empty($thread['messages'])) { @@ -569,7 +569,7 @@ function privatemsg_cron() { $query = _privatemsg_assemble_query('deleted', variable_get('privatemsg_flush_days', 30), variable_get('privatemsg_flush_max', 200)); foreach ($query->execute()->fetchCol() as $mid) { - $message = privatemsg_message_load($mid); + $message = privatemsg_msg_load($mid); module_invoke_all('privatemsg_message_flush', $message); // Delete recipients of the message. @@ -1641,7 +1641,7 @@ function privatemsg_reply($thread_id, $body, $options = array()) { // We don't know the subject and the recipients, so we need to load them.. // thread_id == mid on the first message of the thread - $first_message = privatemsg_message_load($thread_id, $message->author); + $first_message = privatemsg_msg_load($thread_id, $message->author); if (!$first_message) { return array( 'success' => FALSE, @@ -1916,12 +1916,12 @@ function privatemsg_get_link($recipients, $account = array(), $subject = NULL) { * * @ingroup api */ -function privatemsg_message_load($pmid, $account = NULL) { +function privatemsg_msg_load($pmid, $account = NULL) { $conditions = array(); if ($account) { $conditions['account'] = $account; } - $messages = privatemsg_message_load_multiple(array($pmid), $conditions); + $messages = privatemsg_msg_load_multiple(array($pmid), $conditions); return current($messages); } @@ -1936,7 +1936,7 @@ function privatemsg_message_load($pmid, $account = NULL) { * * @ingroup api */ -function privatemsg_message_load_multiple(array $pmids, array $conditions = array(), $reset = FALSE) { +function privatemsg_msg_load_multiple(array $pmids, array $conditions = array(), $reset = FALSE) { $result = entity_load('privatemsg_message', $pmids, $conditions, $reset); return $result; } diff --git a/privatemsg.theme.inc b/privatemsg.theme.inc index db3040a..dea0256 100644 --- a/privatemsg.theme.inc +++ b/privatemsg.theme.inc @@ -100,7 +100,7 @@ function theme_privatemsg_list_field__subject($variables) { } $subject = $thread['subject']; if ($thread['has_tokens']) { - $message = privatemsg_message_load($thread['thread_id']); + $message = privatemsg_msg_load($thread['thread_id']); $subject = privatemsg_token_replace($subject, array('privatemsg_message' => $message), array('sanitize' => TRUE, 'privatemsg-show-span' => FALSE)); } $field['data'] = l($subject, 'messages/view/' . $thread['thread_id'], $options) . $is_new;