lockr_field_encrypt.install in Lockr 7.2
File
modules/lockr_field_encrypt/lockr_field_encrypt.install
View source
<?php
function lockr_field_encrypt_enable() {
cache_clear_all('*', 'cache_field', TRUE);
$old_cache = variable_get('cache_class_cache_field', NULL);
if (substr($old_cache, 0, 12) == 'FieldEncrypt') {
variable_set('lockr_field_encrypt_old_cache', $old_cache);
variable_del('cache_class_cache_field');
}
}
function lockr_field_encrypt_disable() {
cache_clear_all('*', 'cache_field', TRUE);
$old_cache = variable_get('lockr_field_encrypt_old_cache', NULL);
if ($old_cache === NULL) {
variable_del('cache_class_cache_field');
}
else {
variable_set('cache_class_cache_field', $old_cache);
}
variable_del('lockr_field_encrypt_old_cache');
}