Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: Dries commentedIt would be a good idea to introduce some defines.
Comment #2
asimmonds CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #6
asimmonds CreditAttribution: asimmonds commentedPatch for some define substitutions that were missed. Hope that's *all* of them now.
Comment #7
asimmonds CreditAttribution: asimmonds commentedAdded some defines for the comment preview optional/required toggle (I'm probably going overboard with the defs now...)
Comment #8
Dries CreditAttribution: Dries commentedGreat. Committed to HEAD. Thanks.
Comment #9
(not verified) CreditAttribution: commented