Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following is a tested fix for issue #238 .