Do what core does. Do not remove nodes on uninstall. That's better left for a batch process, which is not appropriate for uninstall.<div><br clear="all">Dave Reid<br><a href="mailto:dave@davereid.net">dave@davereid.net</a><br>
<br><br><div class="gmail_quote">On Wed, Jan 26, 2011 at 3:48 PM, <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="direction:ltr" text="#000000" bgcolor="#ffffff">
<p style="margin-bottom:0cm;margin-top:0pt">I have my module
-install- working fine...creating the needed vocabulary, cck
content type with fields, adding the content type to the
vocabulary. Now I'm working on the uninstall, and the seemingly
infinite cleanup that's needed, not that anyone would ever want to
remove my module, once installed!</p>
<p style="margin-bottom:0cm;margin-top:0pt"><br>
</p>
<p style="margin-bottom:0cm;margin-top:0pt">I believe I have the
vocabulary and its data, and the cck content type and its data
accounted for with:</p>
<p style="margin-bottom:0cm;margin-top:0pt"><br>
</p>
<p style="margin-bottom:0cm;margin-top:0pt"></p>
taxonomy_del_vocabulary($vid);
<p style="margin-bottom:0cm;margin-top:0pt">
drupal_load('module', 'content');<br>
content_notify('uninstall', 'my_module');</p>
<p style="margin-bottom:0cm;margin-top:0pt"><br>
</p>
<p style="margin-bottom:0cm;margin-top:0pt">and that brings me
to nodes et al. There will be nodes (and node revisions) to be
removed, and each node can have multiple field instances (cck
image field). I don't seem to see a magic function that, given a
node type, will remove all associated node data for that type.
Also, I think I should remove the files that were uploaded as cck
image content. Any tips on a good example of a complete "undo"? :)<br>
</p>
<p style="margin-bottom:0cm;margin-top:0pt"></p>
<p style="margin-bottom:0cm;margin-top:0pt"></p>
<p style="margin-bottom:0cm;margin-top:0pt"></p>
<p style="margin-bottom:0cm;margin-top:0pt"></p>
<div>-- <br>
<p style="margin-bottom:0in"><img src="cid:part1.05090403.05080200@ayendesigns.com" name="ayenlogo" valign="top" vspace="30" align="LEFT" border="0">
<font style="font-size:8pt" size="1">Ayen Designs </font><font face="Times New Roman, serif"><font style="font-size:8pt" size="1">
<br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
<br>
<font face="Times New Roman, serif"><font style="font-size:8pt" size="1">
404-271-9734<br>
Web:<a href="http://ayendesigns.com" target="_blank">ayendesigns.com</a><br>
Blog: <a href="http://theaccidentalcoder.com" target="_blank">theAccidentalCoder.com</a><br>
Drupal: <a href="http://drupal.org/user/367108" target="_blank">j. ayen
green</a><br>
IRQ: j_ayen_green<br>
IM (Yahoo) baalwww (MSN) <a href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns
<br>
<br>
Ayen Designs is a tradename of the computer services
division of <img src="cid:part2.04030008.09050408@ayendesigns.com" name="acmelogo" align="absmiddle"></font></font></p>
</div>
</div>
</blockquote></div><br></div>