[development] $node namespace woes -- can we fix this in D6?

Earl Miles merlin at logrus.com
Wed May 30 17:10:09 UTC 2007


Moshe Weitzman wrote:
> Earl Miles wrote:
>> Moshe Weitzman wrote:
>>>> i could always just hack project* to always prefix everything it 
>>>> tries to stuff into or read from $node with some kind of custom 
>>>> variable name prefix, like calling this "$node->project_issue_pid" 
>>>> instead of just "$node->pid".
>>>
>>> thata the drupal convention, and IMO it works quite well. Contrib 
>>> modules are second class citizens and should always prefix their 
>>> variables, form fields, node elements, etc. this system works very 
>>> well,  when you use it.
>>
>> I disagree. book.module should be no better than a contrib module. It 
>> should use book_parent, book_etc.
> 
> hey, don't disagree with me. i agree with you. book variables should be 
> named more specifically, along with rest of core and contrib. and yes, 
> this convention should be documented better. we're on the same team, folks.

Oh, my mistake. I thought you were actually saying that book using $node->pid 
and $node->parent was a good thing. I think this is a relatively minor change, 
but I'm not sure if we want to do it ahead of the new book stuff that's being 
done. If it apepars the new book module won't make it in, I think we should 
make a patch to fix this.


More information about the development mailing list