#31 Add Comment link exists on readonly topics

closed-fixed
nobody
None
5
2006-06-11
2005-10-21
Anonymous
No

From: ed.torbett@simulation-systems.co.uk

When a topic containing a comment is set to readonly,
topics can still be added by hovering over a commentto
produce a popup and clicking the "add comment" link.
This can be fixed with the following patch:

diff lib/Codestriker/Http/Response.pm
lib/Codestriker/Http/Response.pm.new
374,375c374,378
< $overlib_html .= "<a
href=\"javascript:add_comment_tooltip($1,$2,$3)" .
< "; void(0);\">Add Comment<\\/a> | ";
---
>
> if
(!Codestriker::topic_readonly($topic->{topic_state})) {
> $overlib_html .= "<a
href=\"javascript:add_comment_tooltip($1,$2,$3)" .
> "; void(0);\">Add Comment<\\/a> | ";
> }

Discussion

  • David Sitsky

    David Sitsky - 2006-06-11
    • status: open --> closed-fixed
     
  • David Sitsky

    David Sitsky - 2006-06-11

    Logged In: YES
    user_id=208928

    Thanks for the report. I've finally committed this into CVS.

    I've also modified SubmitNewComment.pm, to ensure as a last
    line of defence that a comment can't be added to a read-only
    topic.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks