Closed (fixed)
Project:
Drupal core
Component:
comment.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2005 at 15:55 UTC
Updated:
19 May 2005 at 20:59 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | tracker_comment_constant.patch.txt | 2.04 KB | robertdouglass |
| #7 | comment_constants.patch2.txt | 9.89 KB | robertdouglass |
| comment_constants.patch.txt | 9.89 KB | robertdouglass |
Comments
Comment #1
dries commentedThe next logical step is to do the same for node.module and to unify both (they are inverse now) to STATUS_PUBLISHED and STATUS_NOT_PUBLISHED.
Comment #2
Bèr Kessels commentedThis issue was in the queue already
(http://drupal.org/node/19968). That other one is marked duplicate now.
Comment #3
moshe weitzman commentedcertainly 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.
Comment #4
moshe weitzman commenteduh, i get it now. you kept existing values. that makes sense. +1
Comment #5
moshe weitzman commentedresetting 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.
Comment #6
dries commentedNot sure I understood this change:
At a minimum, I'd also consider updating these:
Comment #7
robertdouglass commentedGood eyes
Comment #8
robertdouglass commentedtracker patch.
Comment #9
dries commentedCommitted to HEAD. TODO: do the same for nodes.
Comment #10
(not verified) commented