List Info

Thread: is nodeapi hook a requirement or not?




is nodeapi hook a requirement or not?
user name
2007-03-08 09:14:46
In response to Moshe's suggestion, I'll just comment that
while this
is a good idea, there needs to be more consistency or
guidelines about
the way that nodes are loaded/saved for this to be sure to
work with
contrib modules.  I've had experience with the Clone module
where some
node types expect to only be saved via the node form, and
break if you
do a direct node_save():

http://drupal.org/node/
119140
http://drupal.org/node/9
2175

-Peter

----
From: Moshe Weitzman <weitzmantejasa.com>
To: Junyor <developmentdrupal.org>
Date: Thu, 08 Mar 2007 00:06:24 -0500
Subject: [development] is nodeapi hook a requirement or
not?
i've bumped into a limitation in node.module that i makes me
squirm. our
bulk node operations on admin/content/node are very
efficient because they
perform single UPDATE statements like (make these nodes
promoted):

db_query('UPDATE  SET status = 1, promote = 1 WHERE
nid IN(%s)',
implode(',', $nodes));

the problem is that we don't let modules know about these
changes via
nodeapi. so modules which listen on nodeapi('update') never
know about this
change. oddly, the delete operation does do one by one
deletion which is
good because we aren't leaving behind cruft in ancillary
node tables.

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )