Use constants

This commit is contained in:
Michael 2020-04-18 16:14:38 +00:00
parent 0f2215bc17
commit c2d1d11123

View File

@ -149,8 +149,12 @@ class Tag
* @param string $body Body of the post
* @param string $tags Accepted tags
*/
public static function storeFromBody(int $uriid, string $body, string $tags = '#@!')
public static function storeFromBody(int $uriid, string $body, string $tags = null)
{
if (is_null($tags)) {
$tags = self::TAG_CHARACTER[self::HASHTAG] . self::TAG_CHARACTER[self::MENTION] . self::TAG_CHARACTER[self::EXCLUSIVE_MENTION];
}
if (!preg_match_all("/([" . $tags . "])\[url\=([^\[\]]*)\]([^\[\]]*)\[\/url\]/ism", $body, $result, PREG_SET_ORDER)) {
return;
}