function notifications_manage_subscriptions_form_validate in Notifications 7
Same name and namespace in other branches
- 6.4 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 6 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 6.2 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
- 6.3 notifications.manage.inc \notifications_manage_subscriptions_form_validate()
Validate notifications_admin_subscriptions form submissions.
Check if any items have been selected to perform the chosen 'Update option' on.
1 string reference to 'notifications_manage_subscriptions_form_validate'
- notifications_manage_subscriptions_form_options in ./
notifications.manage.inc - Form options
File
- ./
notifications.manage.inc, line 136 - Common functions for bulk management of subscriptions
Code
function notifications_manage_subscriptions_form_validate($form, &$form_state) {
$items = array_filter($form_state['values']['subscriptions']);
if (count($items) == 0) {
form_set_error('', t('No items selected.'));
}
elseif (!notifications_manage_subscriptions_access(array_keys($items))) {
form_set_error('', t('You don\'t have permissions to manage these subscriptions'));
}
}