function commons_groups_help in Drupal Commons 7.3
Implements hook_help(). Used for the 3.2 -> 3.3 migration to warn users who have out-of-date groups to make sure they update the group privacy settings. See https://drupal.org/node/2059857 for more information
File
- modules/
commons/ commons_groups/ commons_groups.module, line 68
Code
function commons_groups_help($path, $arg) {
if (variable_get('commons_groups_needs_update', FALSE)) {
$message = '<p>' . t("Drupal Commons 3.3 added a new, required field to control group privacy. Please edit your group(s) select one of the privacy options. Once all groups are\n set, an administrator can dismiss the update notice.") . '</p>';
if ($path == 'admin/content/groups/update') {
return $message;
}
elseif ($arg[0] == 'node' && $arg[2] == 'edit') {
$node = menu_get_object();
if ($node->type == 'group' && empty($node->field_og_subscribe_settings)) {
return $message;
}
}
if (user_access('edit any group content')) {
$message = t("Group privacy settings !updated.", array(
'!updated' => l('need to be updated', 'admin/content/groups/update'),
));
drupal_set_message($message, 'warning', FALSE);
}
}
}