Implement hook_disable() to prevent potential problems with CCK
styro - December 10, 2008 - 21:27
| Project: | Asset |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I'm not an Asset user, but looking into this thread ( http://drupal.org/node/345088 ) leads me to wonder if it could be avoided by using hook_disable() to notify CCK that the module is disabled. Without that CCK can end up calling a function that no longer exists.
It doesn't look like the user wants to submit an issue, so I'm doing it in the hope it might benefit someone else :)
eg:
<?php
function asset_disable() {
if (module_exists('content')) content_notify('disable', 'asset');
}
?>I just copied asset_uninstall() for that (uninstalling works), I haven't tested whether or not it would work though.
