[development] is nodeapi hook a requirement or not?

Moshe Weitzman weitzman at tejasa.com
Thu Mar 8 05:06:24 UTC 2007


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 {node} 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.

since this page only allows for changing 50 modes at a time, i think it 
wouldn't be too slow to call node_save() on each selected node. i think 
thats the best way to assure integrity for all those modules which expect to 
hear about node changes. this form doesn't have to be lightening fast.

folks might also be interested in a Views powered version of this page which 
i've specced out at http://drupal.org/node/125810. conversation about this 
Views plugin should stay within that issue.



More information about the development mailing list