Index: hooks/core.php =================================================================== RCS file: /cvs/drupal/contributions/docs/developer/hooks/core.php,v retrieving revision 1.195 diff -u -p -r1.195 core.php --- hooks/core.php 6 Sep 2008 23:30:05 -0000 1.195 +++ hooks/core.php 10 Sep 2008 07:49:41 -0000 @@ -2147,6 +2147,81 @@ function custom_url_rewrite_inbound(&$re } } +/** + * Perform necessary actions after a module is installed. + * + * This function differs from hook_install() as it gives all other + * modules a chance to perform actions when a module is installed, + * whereas hook_install() will only be called on the module actually + * being installed. + * + * @see hook_install() + * + * @param $module + * The name of the module that has been installed. + */ +function hook_module_install($module) { + if ($module == 'lousymodule') { + variable_set('lousymodule_conflicting_variable', FALSE); + } +} + +/** + * Perform necessary actions after a module is enabled. + * + * This function differs from hook_enable() as it gives all other + * modules a chance to perform actions when a module is enabled, + * whereas hook_enable() will only be called on the module actually + * being enabled. + * + * @see hook_enable() + * + * @param $module + * The name of the module that has been enabled. + */ +function hook_module_enable($module) { + if ($module == 'upload') { + mymodule_cache_rebuild(); + } +} + +/** + * Perform necessary actions after a module is disabled. + * + * This function differs from hook_disable() as it gives all other + * modules a chance to perform actions when a module is disabled, + * whereas hook_disable() will only be called on the module actually + * being disabled. + * + * @see hook_disable() + * + * @param $module + * The name of the module that has been disabled. + */ +function hook_module_disable($module) { + if ($module == 'upload') { + mymodule_cache_rebuild(); + } +} + +/** + * Perform necessary actions after a module is uninstalled. + * + * This function differs from hook_uninstall() as it gives all other + * modules a chance to perform actions when a module is uninstalled, + * whereas hook_uninstall() will only be called on the module actually + * being uninstalled. + * + * @see hook_uninstall() + * + * @param $module + * The name of the module that has been uninstalled. + */ +function hook_module_uninstall($module) { + if ($module == 'upload') { + mymodule_cache_rebuild(); + } +} /** * @} End of "addtogroup hooks".