Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2012 at 10:27 UTC
Updated:
4 Aug 2012 at 09:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
nick_vhThis is the bad code!
Is there a way to easily see if a node can have comments or not?
Comment #2
nick_vhComment #3
willmoy commentedThanks for the quick response!
From node_schema:
That becomes $node->comment
So if $node->comment == 0;
a comment count shouldn't be displayed.
I suggest also that if $node->comment == 1 and there are no comments, it shouldn't be displayed (because probably comments have always been turned off and displaying 0 comments in that case would be unhelpful).
Comment #4
nick_vhMarking as feature request, not critical for now. Hopefully someone can provide us with a patch
Comment #5
willmoy commentedWell, I can provide a patch (which I think is trival). I've attached it. The problem is I can't test it because we don't run dev, the test suite won't run on the version we have installed, and I don't have a test installation. But here it is for what it's worth!
I defer to you, but I think it is a bug to say something has 0 comments when comments aren't even enable on the site (even if not a very important one) — but the way the markup is you can't hide just the comments bit with CSS.
Comment #6
nick_vhThis looks a little cleaner to me. Can you confirm this works for you?
Comment #7
nick_vhSeems like there was more crap in that function
Comment #8
nick_vhComment #9
nick_vhCommitted to D7, needs backport for D6.
Thanks for raising this issue
Comment #10
nick_vhCommitted to 6.x-3.x. Thanks!
Comment #11
nick_vhComment #11.0
swentel commentedAdding version info