function apps_app_uninstall in Apps 7
Callback for app uninstall
1 string reference to 'apps_app_uninstall'
- apps_menu in ./
apps.module - Implements hook_menu().
File
- ./
apps.pages.inc, line 393 - The page callbacks for the Apps module.
Code
function apps_app_uninstall($app) {
$token_name = 'uninstall-' . $app['machine_name'];
if ($confirm_form = apps_display_confirm_form(t('Are you sure you want to uninstall @name?', array(
'@name' => $app['name'],
)), $token_name)) {
return $confirm_form;
}
require_once DRUPAL_ROOT . '/includes/install.inc';
$uninstall[] = $app['machine_name'];
if (isset($app['demo content module']) && $app['demo content module']) {
array_unshift($uninstall, $app['demo content module']);
}
if (drupal_uninstall_modules($uninstall)) {
drupal_flush_all_caches();
drupal_set_message(t("Uninstalled @name app", array(
'@name' => $app['name'],
)));
}
else {
drupal_set_message(t("Uninstalling @name app failed. Please ensure all modules that depend on this module are also uninstalled", array(
'@name' => $app['name'],
)));
}
$next = apps_app_page_path($app);
drupal_goto($next);
}