Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.16 diff -u -F^f -r1.16 install.inc --- includes/install.inc 23 Aug 2006 08:25:44 -0000 1.16 +++ includes/install.inc 29 Aug 2006 20:46:37 -0000 @@ -349,6 +349,28 @@ function drupal_install_module($module) } /** + * Calls the uninstall function and updates the system table for a given module. + * + * @param $module + * The module to install. + * @param $confirm + * Provide confirmation message + * @return + * Return confirm string on $confirm and the inverse of the success of uninstall otherwise. + */ +function drupal_uninstall_module($module, $confirm = FALSE) { + module_load_install($module); + if ($confirm) { + return t('You are about to uninstall %module. This can not be undone and you may loose all information associated with %module.', array('%module' => $module)); + } + elseif(!module_invoke($module, 'uninstall')) { + drupal_set_installed_schema_version($module, SCHEMA_UNINSTALLED); + return FALSE; + } + return TRUE; +} + +/** * Verify the state of the specified file. * * @param $file Index: modules/aggregator/aggregator.install =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v retrieving revision 1.6 diff -u -F^f -r1.6 aggregator.install --- modules/aggregator/aggregator.install 24 Aug 2006 06:27:41 -0000 1.6 +++ modules/aggregator/aggregator.install 29 Aug 2006 20:46:37 -0000 @@ -1,6 +1,9 @@