[development] $node namespace woes -- can we fix this in D6?
Derek Wright
drupal at dwwright.net
Thu May 31 18:47:32 UTC 2007
On May 29, 2007, at 8:11 PM, Moshe Weitzman wrote:
> book variables should be named more specifically, along with rest
> of core and contrib. and yes, this convention should be documented
> better.
untested/unconfirmed, but i think there must be a serious bug in
core, since both path.module and book.module assume they own $node-
>pid. :( furthermore, the best place to document this convention is
in the code for core. that's how i learned drupal, and where i
regularly look for best practice on how to do anything...
so, we have 2 options:
1) http://drupal.org/node/145684 -- we make a push for parts of
nedjo's great ideas about Data API and at least tackle the $node
object stuff for D6 that way.
2) i submit a separate issue for D6 that fixes our bugs by moving all
of core's loading/reading of stuff out of $node into arrays of values
based on the module doing the loading. e.g.
$node->book['pid']
$node->path['pid']
...
gerhard does that with event.module, and that's what i'll be doing to
project* [1], and it seems cleaner/better than prefixing everything
($node->book_pid).
what's it going to be? this bug is (clearly) driving me insane, so
i'll throw a few hours at fixing it today. i just don't want to
waste the effort. can a core maintainer please comment on what's
most likely to make it into D6?
> we're on the same team, folks.
agreed. sorry if my tone implied otherwise. i'm having a really bad
couple of weeks, and i've been letting that leak into my interactions
at work and in drupalandia. :( my apologies.
-derek (dww)
[1] http://drupal.org/node/98278
More information about the development
mailing list