You are here

function node_revision_delete_install in Node Revision Delete 7.3

Same name and namespace in other branches
  1. 7 node_revision_delete.install \node_revision_delete_install()
  2. 7.2 node_revision_delete.install \node_revision_delete_install()

Implements hook_install().

File

./node_revision_delete.install, line 11
Install, update and uninstall functions for the Node Revision Delete module.

Code

function node_revision_delete_install() {

  // Number of revisions to remove in each cron run.
  variable_set('node_revision_delete_cron', 50);

  // Last time that the node revision delete was made.
  variable_set('node_revision_delete_last_execute', 0);

  // Frequency with which to delete revisions while cron is running.
  variable_set('node_revision_delete_time', -1);

  // Time configuration to know when the revision should be deleted.
  $node_revision_delete_when_to_delete_time = array(
    'max_number' => 12,
    'time' => 'months',
  );
  variable_set('node_revision_delete_when_to_delete_time', $node_revision_delete_when_to_delete_time);

  // Time configuration to know the minimum age that the revision should have
  // to be deleted.
  $node_revision_delete_minimum_age_to_delete_time = array(
    'max_number' => 12,
    'time' => 'months',
  );
  variable_set('node_revision_delete_minimum_age_to_delete_time', $node_revision_delete_minimum_age_to_delete_time);

  // Configuration for each content_type.
  variable_set('node_revision_delete_track', array());
}