when using a VBO view with more than one argument in a rules component the arguments are specified in a text area, one argument per line.
however this breaks if the new line delimiter is \n or \n\r since _views_bulk_operations_rules_get_field() uses explode("\r", $args)
I'm not sure if newline delimiter varies by server OS or browser, attached patch works for me by exploding on the PHP_EOL constant then trimming result. but it might be a better idea to preg_split on all possibilities (I think that's how core deals with similar textareas like the block visibility one).
Comments
Comment #1
bojanz commentedGood catch.
I have no idea why I went with \r, it makes absolutely no sense.
PHP_EOL is wrong because it points to the server newline, and in this case it's the client who enters different newlines.
Try this patch. It uses the approach taken from the Field module (the "Allowed values" textbox).
Comment #2
alaa commentedworks fine, are we sure there will never be a views argument that starts or ends with white space?
Comment #3
bojanz commentedI'm prepared to take that risk.
Committed: http://drupalcode.org/project/views_bulk_operations.git/commit/da61a23
Thank you for contributing to VBO!