You are here

function revisioning_install in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning.install \revisioning_install()
  2. 6.4 revisioning.install \revisioning_install()
  3. 6 revisioning.install \revisioning_install()
  4. 6.3 revisioning.install \revisioning_install()

Implements hook_install().

File

./revisioning.install, line 11
Install and uninstall hooks for Revisioning module.

Code

function revisioning_install() {

  /*
   * taxonomy_node_insert() and taxonomy_node_update() hooks must be executed
   * before revisioning_node_insert() and revisioning_node_update(). So increase
   * our weight to 1 or higher.
   * A weight of 6 was chosen based on [#2142429].
   */
  db_update('system')
    ->fields(array(
    'weight' => 6,
  ))
    ->condition('name', 'revisioning')
    ->execute();

  // Panels override fix, see http://drupal.org/node/519924.
  variable_set('page_manager_override_anyway', TRUE);

  // If requested, not yet published and unpublished nodes need to reveal their
  // taxonomy terms in Views and in feeds (subject to permissions).
  if (module_exists('taxonomy') && variable_get('revisioning_in_views_show_unpublished_content_terms', TRUE)) {
    foreach (node_load_multiple(FALSE) as $node) {
      revisioning_update_taxonomy_index($node, TRUE);
    }
  }
}