Commit 89429310 authored by drumm's avatar drumm
Browse files

Issue #3246680: Also match on whether or not versions have an API prefix

parent 98e15a58
......@@ -127,9 +127,12 @@ class project_release_handler_filter_version extends views_handler_filter_field_
foreach ($this->value as &$value) {
if (preg_match('/^(?<type>any|all)_(?<series>.*)$/', $value, $match)) {
if ($match['type'] === 'any') {
// Use option groups which match the version number prefix.
// Use option groups which match the version number prefix and
// existence of an API prefix.
$has_api_tid_regex = project_release_has_api_tid_regex();
$has_api_tid = preg_match($has_api_tid_regex, $match['series']);
foreach (array_filter($this->value_options, 'is_array') as $key => $options) {
if (strpos($key, $match['series']) === 0) {
if (strpos($key, $match['series']) === 0 && preg_match($has_api_tid_regex, $key) === $has_api_tid) {
$this->value += $options;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment