I am writing a flag reason plugin, and want to use the core functions (to be found in question-submit.php) as much as possible:
require_once QA_INCLUDE_DIR . 'app/votes.php';
$error = qa_flag_error_html($question, $userid, qa_request());
if (!$error) {
if (qa_flag_set_tohide($question, $userid, $handle, $cookieid, $question))
qa_question_set_status($question, QA_POST_STATUS_HIDDEN, null, null, null, $answers, $commentsfollows, $closepost); // hiding not really by this user so pass nulls
return true;
}
But I do not know how I can read the $question variable from within the page module.
After searching a bit, I found the $question defined in pages/question.php:
list($question, $childposts, $achildposts, $parentquestion, $closepost, $duplicateposts, $extravalue, $categories, $favorite) = $questionData;
Any help?