[drupal-devel] [bug] Make node_save() recursion-aware

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Fri Aug 19 07:30:35 UTC 2005



On Thu, 18 Aug 2005, Todd Grimason wrote:

> Well I'm sorta joking, but the key thing here is as far as I can see
> (not very, I'm fairly new to the deep internals of drupal) is having a
> distinction between pre- and post-save  [aka insert/update], since "on
> save" is ambigious isn't it? (well in name at least, the actual behavior
> in this case it appears to actually be a "post save" event, right?).

Right.

> Until I followed all the calls around, I assumed the callbacks had a
> chance to run before node->save was actually called -- like everyone
> gets to do their thing before the node is stored away in the DB -- but
> now I see you actually gotta use your copy and stick it in the database
> yourself, basically overwriting the core functionality -- so potentially
> you could have 0..* saves in response to the insert/update callback,
> yes?
>
> Am I anywhere near understanding what's going on here?

Yes. If you want to change "insert" to "post insert" and introduce "pre
insert" and do the same to "update" I'd welcome the change. Not sure it
would find general approval, though.

Cheers,
	Gerhard





More information about the drupal-devel mailing list