Commit 51b50454 authored by Derek Wright's avatar Derek Wright
Browse files

[#397458] by dww: Fixed validation to prevent duplicate project settings.

parent 67a8357b
Loading
Loading
Loading
Loading
+3 −0
Changes for includes/notification.inc: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -158,6 +158,9 @@ function project_issue_notification_user_form_validate($form, &$form_state) {
    if (empty($nid)) {
      form_set_error('projects][new][title', t('The name you entered (%title) is not a valid project.', array('%title' => $new_project['title'])));
    }
    elseif (!empty($form_state['values']['projects'][$nid])) {
      form_set_error('projects][new][title', t('You have already defined issue notification settings for the %title project.', array('%title' => $new_project['title'])));
    }
    else {
      $form_state['values']['projects']['new']['nid'] = $nid;
    }