This patch does two things when the time limit for editing a comment has passed:

1. Uses a drupal access check and returns access denied instead of making the edit form read-only.
2. Removes the edit links from the comment so the user can't even try to edit the comment. This uses hook_link_alter, which required a patch to drupal in 6.17 to make it work. See #374463: Alter comment links..

It should be no problem on drupal < 6.17 - it will still work but the edit links will not be removed (like the module now). But when they are clicked the user will get an access denied message instead of a disabled edit form.

Users on drupal >= 6.17 will not see edit links for comments they cannot edit, so they will only ever see the access denied message if they hand craft the edit URL.

CommentFileSizeAuthor
comment_edited.module.patch3.25 KBmr.j

Comments

boiky’s picture

Hi mr.j

This is exactly what I was looking for in addition to this brilliant module!
Tnanks a lot for publishing it.
I've applied patch to my comment_edited.module file and it works fine!
So tested by 1 more user.

May be snufkin (module author) can include this patch into the next release to make it official?

Rgds,
Ivan.

boiky’s picture

-

boiky’s picture

Tested with Acquia Prosper theme, works fine as well.