You are here

seckit.install in Security Kit 2.x

Same filename and directory in other branches
  1. 8 seckit.install
  2. 6 seckit.install
  3. 7 seckit.install

Install, update and uninstall functions for the seckit module.

File

seckit.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the seckit module.
 */

/**
 * Remove x_content_type from seckit module configuration.
 */
function seckit_update_8101() {
  \Drupal::configFactory()
    ->getEditable('seckit.settings')
    ->clear('seckit_xss.x_content_type')
    ->save();
}

/**
 * Replace "empty" with an empty string for the Referrer-Policy.
 */
function seckit_update_8102() {
  $config = \Drupal::configFactory()
    ->getEditable('seckit.settings');
  if ($config
    ->get('seckit_various.referrer_policy_policy') == 'empty') {
    $config
      ->set('seckit_various.referrer_policy_policy', '""')
      ->save(TRUE);
  }
}

Functions

Namesort descending Description
seckit_update_8101 Remove x_content_type from seckit module configuration.
seckit_update_8102 Replace "empty" with an empty string for the Referrer-Policy.