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');
       }
     }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

It would be a good idea to introduce some defines.

asimmonds’s picture

Assigned: Unassigned » asimmonds
Priority: Critical » Normal
Status: Active » Needs review
FileSize
18.67 KB

Patch to change all the 'integer' constants used in comment.module to defines, also fixing this bug and http://drupal.org/node/35771

p_____n’s picture

the 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

chx’s picture

Assigned: asimmonds » chx
Status: Needs review » Reviewed & tested by the community
FileSize
18.67 KB

This 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.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

asimmonds’s picture

Status: Fixed » Needs review
FileSize
1.67 KB

Patch for some define substitutions that were missed. Hope that's *all* of them now.

asimmonds’s picture

FileSize
3.35 KB

Added some defines for the comment preview optional/required toggle (I'm probably going overboard with the defs now...)

Dries’s picture

Status: Needs review » Fixed

Great. Committed to HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)