Skip to content

Commit

Permalink
[comment] tidiness
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Feb 10, 2025
1 parent 1564098 commit 3a0462f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/comment/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ private function is_dupe(int $image_id, string $comment): bool
WHERE image_id=:image_id AND comment=:comment
", ["image_id" => $image_id, "comment" => $comment]);
}
// do some checks

private function add_comment_wrapper(int $image_id, User $user, string $comment): void
{
Expand Down Expand Up @@ -579,7 +578,7 @@ private function comment_checks(int $image_id, User $user, string $comment): voi

// basic sanity checks
if (!$user->can(Permissions::CREATE_COMMENT)) {
throw new CommentPostingException("Anonymous posting has been disabled");
throw new CommentPostingException("You do not have permission to add comments");
} elseif (is_null(Image::by_id($image_id))) {
throw new CommentPostingException("The image does not exist");
} elseif (trim($comment) == "") {
Expand Down

0 comments on commit 3a0462f

Please sign in to comment.