You are here

function library_install in Library 6

Same name and namespace in other branches
  1. 5.2 library.install \library_install()
  2. 6.2 library.install \library_install()
  3. 7 library.install \library_install()

Implementation of hook_install()

File

./library.install, line 138
@author Jess Straatmann library.install Install and uninstall all required databases. Also do incremental database updates.

Code

function library_install() {
  drupal_install_schema('library');
  db_query("INSERT INTO {library_actions} (name, status_change) VALUES ('%s', %d)", 'Check Out', 1);
  db_query("INSERT INTO {library_actions} (name, status_change) VALUES ('%s', %d)", 'Check In', 2);
  global $base_url;

  // Notify of changes
  drupal_set_message(t('Library module successfully installed. You can configure library settings <a href="@link">here</a>. To start creating library items, edit one or more content types to be included in the library.', array(
    '@link' => $base_url . '/admin/settings/library',
  )));
}