You are here

function devel_reinstall_submit in Devel 5

Same name and namespace in other branches
  1. 6 devel.module \devel_reinstall_submit()
  2. 7 devel.pages.inc \devel_reinstall_submit()

Process reinstall menu form submissions.

File

./devel.module, line 913

Code

function devel_reinstall_submit($form_id, $form_values) {
  include_once './includes/install.inc';
  $module = str_replace('devel_reinstall_', '', $form_id);
  module_load_install($module);
  $versions = drupal_get_schema_versions($module);
  drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
  module_invoke($module, 'uninstall');
  module_invoke($module, 'install');
  drupal_set_message(t('Reinstalled the %name module.', array(
    '%name' => $module,
  )));
}