Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Oct 2005 at 20:59 UTC
Updated:
29 Nov 2005 at 07:40 UTC
Jump to comment: Most recent file
An optional value of Default display mode can be wrong.
comment_default_mode = 0 Flat list - collapsed
comment_default_mode = 1 Flat list - expanded
comment_default_mode = 2 Threaded list - collapsed
comment_default_mode = 3 Threaded list - expanded
Comment controls is not reflected
@@ -888,7 +888,7 @@ function comment_render($node, $cid = 0)
// is global and defined in pager.inc.
$output .= theme('pager', NULL, $comments_per_page, 0, array('comments_per_page' => $comments_per_page));
- if (db_num_rows($result) && (variable_get('comment_controls', 3) == 1 || variable_get('comment_controls', 3) == 3)) {
+ if (db_num_rows($result) && (variable_get('comment_controls', 3) == 1 || variable_get('comment_controls', 3) == 2)) {
$output .= comment_controls($mode, $order, $comments_per_page, $nid, 'bottom');
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | comment_defines_2.patch | 3.35 KB | asimmonds |
| #6 | comment_defines_1.patch | 1.67 KB | asimmonds |
| #4 | comment_defines_0.patch | 18.67 KB | chx |
| #2 | comment_defines.patch | 18.67 KB | asimmonds |
| comment_3.diff | 2.63 KB | p_____n |
Comments
Comment #1
dries commentedIt would be a good idea to introduce some defines.
Comment #2
asimmonds commentedPatch to change all the 'integer' constants used in comment.module to defines, also fixing this bug and http://drupal.org/node/35771
Comment #3
p_____n commentedthe same as a problem of http://drupal.org/node/35771
It moves without the place problem that I adapt myself, and inspected a patch.
Thank you
Comment #4
chx commentedThis is partially my bad, therefore I shoulder this patch from now on. In the early stages of form API conversion, there was a problem with zero values, later this was corrected and I tried to redo comment but it became the sorry mess it is now. Thanks for the patch. I changed only the values of defines so it's zero based and did some testing.
Comment #5
dries commentedCommitted to HEAD. Thanks.
Comment #6
asimmonds commentedPatch for some define substitutions that were missed. Hope that's *all* of them now.
Comment #7
asimmonds commentedAdded some defines for the comment preview optional/required toggle (I'm probably going overboard with the defs now...)
Comment #8
dries commentedGreat. Committed to HEAD. Thanks.
Comment #9
(not verified) commented