function qa_flags_clear_all($post, $userid, $handle, $cookieid) { require_once QA_INCLUDE_DIR . 'qa-db-votes.php'; require_once QA_INCLUDE_DIR . 'qa-app-limits.php'; qa_db_userflags_clear_all($post['postid']); qa_db_post_recount_flags($post['postid']); switch ($post['basetype']) { case 'Q': $action = 'q_clearflags'; break; case 'A': $action = 'a_clearflags'; break; case 'C': $action = 'c_clearflags'; break; } qa_report_write_action($userid, null, $action, $post['basetype'] == 'Q' ? $post['postid'] : null, $post['basetype'] == 'A' ? $post['postid'] : null, $post['basetype'] == 'C' ? $post['postid'] : null); qa_report_event($action, $userid, $handle, $cookieid, array('postid' => $post['postid'])); }
function qa_flags_clear_all($oldpost, $userid, $handle, $cookieid) { if (qa_to_override(__FUNCTION__)) { $args = func_get_args(); return qa_call_override(__FUNCTION__, $args); } require_once QA_INCLUDE_DIR . 'db/votes.php'; require_once QA_INCLUDE_DIR . 'app/limits.php'; require_once QA_INCLUDE_DIR . 'db/post-update.php'; qa_db_userflags_clear_all($oldpost['postid']); qa_db_post_recount_flags($oldpost['postid']); qa_db_flaggedcount_update(); switch ($oldpost['basetype']) { case 'Q': $event = 'q_clearflags'; break; case 'A': $event = 'a_clearflags'; break; case 'C': $event = 'c_clearflags'; break; } qa_report_event($event, $userid, $handle, $cookieid, array('postid' => $oldpost['postid'], 'oldpost' => $oldpost)); }