1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-20 11:16:36 +02:00

Match each tag separately against user filter regular expression

Each article's tag should be matched against user filter regular
expression separately. Current matching confuses when you want to match
an exact tag. You suppose to write "^tag$", bug now have to write
"(^|,)tag(,|$)" which is very inconvenient and requires knowledge about
how do you process this matching.
This commit is contained in:
Dmitry Konishchev 2013-04-26 15:54:04 +04:00
parent 8cefe38a0a
commit 7b80b5e160

View File

@ -1271,8 +1271,12 @@
$match = @preg_match("/$reg_exp/i", $author);
break;
case "tag":
$tag_string = join(",", $tags);
$match = @preg_match("/$reg_exp/i", $tag_string);
foreach ($tags as $tag) {
if (@preg_match("/$reg_exp/i", $tag)) {
$match = true;
break;
}
}
break;
}