function ad_notify_confirm_delete_validate in Advertisement 6
Same name and namespace in other branches
- 5.2 notify/ad_notify.module \ad_notify_confirm_delete_validate()
- 5 notify/ad_notify.module \ad_notify_confirm_delete_validate()
Validate that the selected notification can be deleted.
File
- notify/
ad_notify.module, line 581 - Receive email notifications regarding ads.
Code
function ad_notify_confirm_delete_validate($form, &$form_state) {
if ($form_state['values']['locked'] && !ad_adaccess($form_state['values']['aid'], 'manage owners')) {
drupal_set_message(t('This notification is locked, you will need to contact the site administrator to delete this notification for you.'), 'error');
if (arg(2) == 'adowners' && arg(4) == 'notifications') {
drupal_goto('node/' . $form_state['values']['aid'] . '/adowners/' . $form_state['values']['uid'] . '/notifications');
}
else {
drupal_goto('node/' . $form_state['values']['aid'] . '/notifications');
}
}
}