Commit fc3f188b authored by Chris Shantz's avatar Chris Shantz
Browse files

Added code to the enable function in the .install to disable non-resp. event...

Added code to the enable function in the .install to disable non-resp. event views if responsive config is enabled.
parent 268ce07f
......@@ -66,6 +66,21 @@ function uw_ct_event_enable() {
if (function_exists('views_invalidate_cache')) { //clear the views cache
views_invalidate_cache();
}
if (!module_exists('uw_cfg_responsive')) {
$views_status['events_responsive'] = TRUE; //add the responsive view to the disabled list
variable_set('views_defaults', $views_status); //reset the variable with the new list
if (function_exists('views_invalidate_cache')) { //clear the views cache
views_invalidate_cache();
}
} else {
watchdog('uw_ct_event', 'enable responsive view');
unset($views_status['events_responsive']); //remove the responsive ones from the disabled list
$views_status['events'] = TRUE; // add the standard view to the disabled list
variable_set('views_defaults', $views_status); //reset the variable with the new list
if (function_exists('views_invalidate_cache')) { //clear the views cache
views_invalidate_cache();
}
}
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment