You are here

function revisioning_uninstall in Revisioning 6.3

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

Implementation of hook_uninstall().

File

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

Code

function revisioning_uninstall() {

  // Delete all revisioning_* variables at once
  db_query("DELETE FROM {variable} WHERE name LIKE 'revisioning_%%'");
  variable_del('page_manager_override_anyway');

  // see above
  foreach (node_get_types() as $type) {

    // Maybe revisioning_auto_publish_<type> and new_revisions_<type>
    // should be used in array, like 'revision_moderation' below?
    variable_del('new_revisions_' . $type->type);

    // Remove 'revision_moderation' from all node_options_<content_type> variables
    $variable_name = 'node_options_' . $type->type;
    if ($node_options = variable_get($variable_name, NULL)) {
      $node_options = array_diff($node_options, array(
        'revision_moderation',
      ));
      variable_set($variable_name, $node_options);
    }
  }
}