Skip to content

Timhibberd patch issue238#239

Open
timhibberd wants to merge 8 commits intodesignwall:masterfrom
SkyBind:timhibberd-patch-issue238
Open

Timhibberd patch issue238#239
timhibberd wants to merge 8 commits intodesignwall:masterfrom
SkyBind:timhibberd-patch-issue238

Conversation

@timhibberd
Copy link

The following is a tested fix for issue #238 .

Fix included here involves:
1) passing in the commentid;
2) using the commentid in place of the postid for the comment author check; and;
3) initialising the postid used in the author question/answer author check when it is not passed in.

See issue designwall#238 for details.
Fix included here involves:
1) passing in the postid/commentid.

See issue designwall#238 for details.
When a user tried to delete a comment or answer they got an incorrect prompt 'Are you sure to delete this question' which was confusing especially when someone is deleting their comment associated with a question.
This bug fix ensures the comment_ID is passed correctly to eliminate a false error when a user went to delete their own comment they added to their own question.
Needed to pass the comment_id through to the permissions check in the case of a comment delete.
Corrected reference to comment_ID and added the extra parameter passing to delete_comment as well.
The code was checking the user's answer permissions to proceed with the user's question deletion. This should have checked the quesiton permissions and passed through the question postid to the permissions checker.
Needed to pass questionid to permissions checker. Also found another call involving answer_id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant