From: Michael Date: Sat, 18 Apr 2020 16:14:38 +0000 (+0000) Subject: Use constants X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c2d1d11123db338be75767b29dcc50929261e67d;p=friendica.git Use constants --- diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 6de872a9e5..c3d1c50162 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -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; }