[drupal-devel] [task] Make status values in comment.module defined constants for readability

moshe weitzman drupal-devel at drupal.org
Mon Apr 25 03:00:44 UTC 2005

Issue status update for http://drupal.org/node/21221

 Project:      Drupal
 Version:      cvs
 Component:    comment.module
 Category:     tasks
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  robertDouglass
 Updated by:   moshe weitzman
-Status:       active
+Status:       patch

resetting back to patch ... i think unifying the values of node vs.
comment could be done in a separate patch. the defines are worthwhile
adding on their own.

moshe weitzman

Previous comments:

April 24, 2005 - 10:55 : robertDouglass

Attachment: http://drupal.org/files/issues/comment_constants.patch.txt (9.89 KB)

Reading the comment.module is more confusing than necessary because of
all the comparisons $status = 0 or $status = 1. What does this mean? If
one were to go by the example in node or users, 0 would be unpublished.
Not so with comments, thus the confusion. The fix is to define
constants and use them instead of 0 and 1. That's what this patch does.


April 24, 2005 - 11:38 : Dries

The next logical step is to do the same for node.module and to unify
both (they are inverse now) to STATUS_PUBLISHED and


April 24, 2005 - 13:33 : Bèr Kessels

This issue was in the queue already
 (http://drupal.org/node/19968). That other one is marked duplicate


April 24, 2005 - 21:58 : moshe weitzman

certainly a step in the right direction ... in order for this to get
committed though, i think forum.module and tracker.module need updates
(and maybe others), and we need an updates.inc entry as well.


April 24, 2005 - 21:59 : moshe weitzman

uh, i get it now. you kept existing values. that makes sense. +1

More information about the drupal-devel mailing list