diff --git a/modules/book/book.install b/modules/book/book.install index e92aca6..bd9d6de 100644 --- a/modules/book/book.install +++ b/modules/book/book.install @@ -14,6 +14,32 @@ function book_install() { } /** + * Implements hook_enable(). + */ +function book_enable() { + // Enable node type, which may have been disabled if the module was disabled. + db_merge('node_type') + ->key(array( + 'type' => 'book', + )) + ->fields(array('disabled' => 0)) + ->execute(); +} + +/** + * Implements hook_disable(). + */ +function book_disable() { + // Disable node type. + db_merge('node_type') + ->key(array( + 'type' => 'book', + )) + ->fields(array('disabled' => 1)) + ->execute(); +} + +/** * Implements hook_uninstall(). */ function book_uninstall() {