Skip to content

Commit

Permalink
Post modify bug: wrong function used to get message data. (and a few …
Browse files Browse the repository at this point in the history
…other places).

These two functions are badly named

Signed-off-by: Norv <a.w.norv@gmail.com>
  • Loading branch information
norv committed May 28, 2013
1 parent d530f99 commit bbc8bea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sources/controllers/ProfileAccount.controller.php
Expand Up @@ -326,7 +326,7 @@ function action_issuewarning()
if (isset($_REQUEST['msg']) && 0 < (int) $_REQUEST['msg'])
{
require_once(SUBSDIR . '/Messages.subs.php');
$message = getExistingMessage((int) $_REQUEST['msg']);
$message = getMessageInfo((int) $_REQUEST['msg']);
if (!empty($message))
{
$context['warning_for_message'] = (int) $_REQUEST['msg'];
Expand Down
2 changes: 1 addition & 1 deletion sources/controllers/ProfileInfo.controller.php
Expand Up @@ -326,7 +326,7 @@ function action_showPosts()

// We need msg info for logging.
require_once(SUBSDIR . '/Messages.subs.php');
$info = getExistingMessage((int) $_GET['delete'], true);
$info = getMessageInfo((int) $_GET['delete'], true);

// Trying to remove a message that doesn't exist.
if (empty($info))
Expand Down
2 changes: 1 addition & 1 deletion sources/subs/Post.subs.php
Expand Up @@ -1354,7 +1354,7 @@ function modifyPost(&$msgOptions, &$topicOptions, &$posterOptions)
if (!empty($modSettings['search_custom_index_config']))
{
require_once(SUBSDIR . '/Messages.subs.php');
$message = getExistingMessage($msgOptions['id'], true);
$message = getMessageInfo($msgOptions['id'], true);
$msgOptions['old_body'] = $message['body'];
$db->free_result($request);
}
Expand Down

0 comments on commit bbc8bea

Please sign in to comment.