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.
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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: moshe weitzman commenteduh, i get it now. you kept existing values. that makes sense. +1
Comment #5
moshe weitzman CreditAttribution: 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 CreditAttribution: Dries commentedNot sure I understood this change:
At a minimum, I'd also consider updating these:
Comment #7
robertDouglass CreditAttribution: robertDouglass commentedGood eyes
Comment #8
robertDouglass CreditAttribution: robertDouglass commentedtracker patch.
Comment #9
Dries CreditAttribution: Dries commentedCommitted to HEAD. TODO: do the same for nodes.
Comment #10
(not verified) CreditAttribution: commented