Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.49 -r1.50 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 8 Sep 2008 11:22:37 -0000 1.49 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 9 Sep 2008 12:43:57 -0000 1.50 @@ -1221,14 +1221,22 @@ my instvar __including_page set item_id [$__including_page item_id] set gc_return_url [$package_id url] - set gc_link [general_comments_create_link \ - -object_name [$__including_page title] \ - $item_id $gc_return_url] + # Even, if general_comments is turned on, don't offer the + # link to add comments, unless the user is logged in. + # Otherwise, this attracts spammers and search bots + if {[::xo::cc user_id] != 0} { + set gc_link [general_comments_create_link \ + -object_name [$__including_page title] \ + $item_id $gc_return_url] + set gc_link

$gc_link

+ } else { + set gc_link "" + } set gc_comments [general_comments_get_comments $item_id $gc_return_url] if {$gc_comments ne ""} { - return "

#general-comments.Comments#

$gc_link

" + return "

#general-comments.Comments#

$gc_link" } else { - return "

$gc_link

" + return "$gc_link" } }