User login

Getting rid of modules entirely, with update function for cleanup

When deleting modules in code you can clean up after the fact, esp. for modules that don't clean up after themselves well enough on uninstall.

git rm -r sites/all/modules/contrib/hashcash

git rm -r sites/all/modules/contrib/imageapi

To your update module, we can add:

 * Remove all traces of unwanted Drupal 6 modules.
function anjaliup_update_7000() {
  // Delete hashcash module from the {system} table.
  db_delete('system')->condition('name', 'hashcash')->execute();

  // Delete imageapi module from the {system} table.
  db_delete('system')->condition('name', 'imageapi')->execute();

select name, schema_version from system where type='module';

select name from variable where name like 'hashcash%';

| name |
| hashcash_addorignore |
| hashcash_expire |
| hashcash_form_ids |
| hashcash_submit_disabled |
4 rows in set (0.00 sec)


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.