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:
<?php
/**
* 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)
Comments
Post new comment