1 book.install | book_update_1004() |
Uninstall the book_cache contrib module, now part of core.
Related topics
File
- core/
modules/ book/ book.install, line 157 - Install, update and uninstall functions for the book module.
Code
function book_update_1004() {
$module = db_query("SELECT name FROM {system} WHERE name = 'book_cache' AND type = 'module'")->fetchField();
if ($module) {
$path = backdrop_get_path('module', 'book_cache');
backdrop_set_message(t('The contributed module <em>Book Cache</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 Book Cache 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 = 'book_cache' AND type = 'module'");
}
else {
return t('<em>Book Cache</em> module not found. Nothing to be done.');
}
}