SMF icon indicating copy to clipboard operation
SMF copied to clipboard

ReportToMod.php

Open Akyhne opened this issue 12 years ago • 0 comments

function reportPost($msg, $reason) { global $context, $smcFunc, $user_info;

// Get the basic topic information, and make sure they can see it.
$_POST['msg'] = (int) $msg;

$request = $smcFunc['db_query']('', '
    SELECT m.id_topic, m.id_board, m.subject, m.body, m.id_member AS id_poster, m.poster_name, mem.real_name
    FROM {db_prefix}messages AS m
        LEFT JOIN {db_prefix}members AS mem ON (m.id_member = mem.id_member)
    WHERE m.id_msg = {int:id_msg}
        AND m.id_topic = {int:current_topic}
    LIMIT 1',
    array(
        'current_topic' => $topic,
        'id_msg' => $_POST['msg'],
    )

$topic isn't declared.... fix global $context, $smcFunc, $user_info, $topic;

Akyhne avatar Apr 03 '14 08:04 Akyhne