function domain_update_7308 in Domain Access 7.3
Replace domain_behavior with default node access settings.
File
- ./
domain.install, line 387 - Install file.
Code
function domain_update_7308(&$sandbox) {
$behavior = variable_get('domain_behavior', 0);
if (function_exists('node_type_get_types')) {
$types = node_type_get_types();
foreach ($types as $key => $type) {
$node_access_values = array(
'DOMAIN_ACTIVE',
);
$all_sites = variable_get('domain_node_' . $key, 0);
if ($behavior == 1 || $all_sites == 1) {
$node_access_values[] = 'DOMAIN_ALL';
}
variable_set('domain_node_' . $key, $node_access_values);
}
}
variable_del('domain_behavior');
return t('Ported domain behavior to default node access settings.');
}