1.20.x field.install | field_update_1004() |
Uninstall the field_formatter_settings contrib module, now part of core.
File
- modules/
field/ field.install, line 145 - Install, update and uninstall functions for the field module.
Code
function field_update_1004() {
$module = db_query("SELECT name FROM {system} WHERE name = 'field_formatter_settings' AND type = 'module'")->fetchField();
if ($module) {
$path = backdrop_get_path('module', 'field_formatter_settings');
backdrop_set_message(t('The contributed module <em>Field Formatter Settings</em> has been located at %path. The module has been disabled, since its functionality is now provided by Backdrop core. It is recommended that you remove this module from your site.', array('%path' => BACKDROP_ROOT . '/' . $path)), 'warning');
// Remove the entry for the Field Formatter Settings module from the system
// table.
// As this module does not provide any config or settings, there doesn't
// seem to be anything else left to clean up or migrate.
// While the contrib module remains in the filesystem, this entry will be
// recreated, but it will have status 0 (disabled), and schema -1
// (uninstalled), so it is safe to remove.
db_query("DELETE FROM {system} WHERE name = 'field_formatter_settings' AND type = 'module'");
}
else {
return t('<em>Field Formatter Settings</em> not found. Nothing to be done.');
}
}