Commit ad7de9cc by Scott

Shorten function name to qa_db_uservote_remove_own

And some minor formatting
parent d5e23e1b
......@@ -478,7 +478,7 @@
$postid = $oldquestion['postid'];
qa_db_post_set_userid($postid, $userid);
qa_db_remove_owner_votes_from_post($postid);
qa_db_uservote_remove_own($postid);
qa_db_post_recount_votes($postid);
qa_db_points_update_ifuser($oldquestion['userid'], array('qposts', 'aselects', 'qvoteds', 'upvoteds', 'downvoteds'));
......@@ -737,7 +737,7 @@
$postid = $oldanswer['postid'];
qa_db_post_set_userid($postid, $userid);
qa_db_remove_owner_votes_from_post($postid);
qa_db_uservote_remove_own($postid);
qa_db_post_recount_votes($postid);
qa_db_points_update_ifuser($oldanswer['userid'], array('aposts', 'aselecteds', 'avoteds', 'upvoteds', 'downvoteds'));
......@@ -1047,7 +1047,7 @@
$postid = $oldcomment['postid'];
qa_db_post_set_userid($postid, $userid);
qa_db_remove_owner_votes_from_post($postid);
qa_db_uservote_remove_own($postid);
qa_db_post_recount_votes($postid);
qa_db_points_update_ifuser($oldcomment['userid'], array('cposts'));
......
......@@ -153,15 +153,12 @@
/**
* Remove all votes assigned to a post that had been cast by the owner of the post.
*
* @param int $postid The post id which will be removed all votes from its owner.
* @param int $postid The post ID from which the owner's votes will be removed.
*/
function qa_db_remove_owner_votes_from_post($postid)
function qa_db_uservote_remove_own($postid)
{
qa_db_query_sub(
'DELETE uv FROM ^uservotes uv ' .
'JOIN ^posts p ' .
'ON uv.postid = p.postid AND uv.userid = p.userid ' .
'WHERE uv.postid = #', $postid
'DELETE uv FROM ^uservotes uv JOIN ^posts p ON uv.postid=p.postid AND uv.userid=p.userid WHERE uv.postid=#', $postid
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment