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:
parent
8cefe38a0a
commit
7b80b5e160
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue