Skip to content
Snippets Groups Projects
Commit 66988595 authored by mouad jamaoui's avatar mouad jamaoui Committed by Stephen Mustgrave
Browse files

Issue #3276467: Event_log_track table exists after reinstalling the module

parent cb6032f1
No related branches found
Tags 3.0.1
No related merge requests found
......@@ -84,6 +84,17 @@ function event_log_track_schema() {
return $schema;
}
/**
* Implements hook_uninstall().
*/
function event_log_track_uninstall() {
// Delete table on module uninstall.
$schema = Database::getConnection()->schema();
if ($schema->tableExists('event_log_track')) {
$schema->dropTable('event_log_track');
}
}
/**
* Increase "ref_char" field size.
*/
......
......@@ -197,23 +197,6 @@ function event_log_track_add_submit_handler(array &$element, string $callback) {
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function event_log_track_form_system_modules_uninstall_alter(&$form, &$form_state) {
foreach ($form['uninstall'] as $name => &$module) {
if (str_starts_with($name, 'event_log_track')) {
$form['uninstall'][$name]['#disabled'] = TRUE;
$form['uninstall'][$name]['#description'] = '<strong>' . t('LOCKED.') . '</strong>';
$form['modules'][$name]['description']['#markup'] =
$form['modules'][$name]['description']['#markup'] . '<br/><strong>'
. t('CANNOT BE UNINSTALLED.') . '</strong>';
}
}
}
/**
* Implements hook_cron().
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment