Regardless of the options chosen, actions for every flag are executed.

For example, I have 3 flags and 3 send email actions. Each of the actions is assigned to one individual flag only. I flag content using *one* of the flags but get 3 e-mails (every e-mail associated with a different action).

CommentFileSizeAuthor
#1 flag.actions.inc-flag-selection.patch812 bytesarchetwist

Comments

archetwist’s picture

Status: Active » Needs review
StatusFileSize
new812 bytes

I think I have a fix.

mooffie’s picture

Status: Needs review » Fixed

Archetwist, thanks. Your patch works, but I didn't use it eventually.

Problem was because in PHP the following code returns TRUE.

$array = ('alpha', 'bravo', 0, 'charlie');
return in_array('miki', $array);

Fortunately, in_array() gets an optional third parameter, strict, that fixes this. I also sanitized form checkboxes with array_filter.

http://drupal.org/cvs?commit=125234
http://drupal.org/cvs?commit=125236

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.