You are here

function acquia_purge_install in Acquia Purge 7

Same name and namespace in other branches
  1. 6 acquia_purge.install \acquia_purge_install()

Implements hook_install().

File

./acquia_purge.install, line 11
Installation file for the Acquia Purge module.

Code

function acquia_purge_install() {

  // Enable Expire 7.x-2.x's most important expiration rules by default.
  $defaults = array(
    'expire_status' => EXPIRE_STATUS_ENABLED_EXTERNAL,
    'expire_debug' => EXPIRE_DEBUG_DISABLED,
    'expire_include_base_url' => FALSE,
    'expire_node_actions' => array(
      1,
      2,
      3,
    ),
    'expire_node_front_page' => 1,
    'expire_node_term_pages' => 1,
    'expire_comment_actions' => array(
      1,
      2,
      3,
      4,
      5,
    ),
    'expire_comment_front_page' => 1,
    'expire_comment_node_term_pages' => 1,
    'expire_user_actions' => array(
      1,
      2,
      3,
      4,
    ),
    'expire_user_front_page' => 1,
    'expire_file_actions' => array(
      1,
      2,
    ),
    'expire_file_front_page' => 1,
  );
  foreach ($defaults as $variable => $values) {
    $value = is_array($values) ? array() : $values;
    if (is_array($values)) {
      foreach ($values as $int) {
        $value[(string) $int] = (string) $int;
      }
    }
    variable_set($variable, $value);
  }
}