<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 31 Aug 2006, at 10:01 PM, Jeff Eaton wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Perhaps what we should ask is, 'OTHER than rolling back an important</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">piece of code recapturing, how can we make the new mechanism as easy for</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">developers as the old one was?' Not _the same as_ but _as easy as_.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Perhaps a helper function to 'register' your module's CRUD without</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">altering any form arrays? Perhaps node_save() existing as a wrapper</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">function for the functionality?</FONT></P> </BLOCKQUOTE></DIV>I've mentioned this before, but hooks are also callbacks, you could make the node<BR><DIV>form register them automatically.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ie:</DIV><DIV>if (function_exists($node-&gt;type . '_validate')) {</DIV><DIV>  $form['#validate][$node-&gt;type . '_validate'] = array();</DIV><DIV>} </DIV><DIV>foreach (module_implements('nodeapi') as $module) {</DIV><DIV>  $form['#validate'][$module . '_nodeapi'] = array('validate');</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>that would remove all unneccesary form alters, but would require the function definition of node api to change.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>