function wsfield_storage_enable in Web Service Data 7
@file Storage controller definitions
@author Mathew Winstone <mwinstone@coldfrontlabs.ca> @author David Pascoe-Deslauriers <dpascoed@coldfrontlabs.ca>
File
- modules/
wsfields_storage/ wsfields_storage.install, line 11 - Storage controller definitions
Code
function wsfield_storage_enable() {
// If configure correctly, replace the default cache class for
// fields with the wsfield storage versions
if (class_exists('WsfieldStorageDrupalDatabaseCache')) {
$class = variable_get('cache_class_cache_field');
if (!isset($class)) {
$class = variable_get('cache_default_class', 'DrupalDatabaseCache');
}
if ($class != 'WsfieldStorageDrupalDatabaseCache' and $class != 'WsfieldStorageMemCacheDrupal') {
if ($class == 'MemCacheDrupal') {
variable_set('cache_class_cache_field', 'WsfieldStorageMemCacheDrupal');
}
else {
variable_set('cache_class_cache_field', 'WsfieldStorageDrupalDatabaseCache');
}
}
}
}