]> git.mxchange.org Git - friendica.git/commitdiff
Use constants
authorMichael <heluecht@pirati.ca>
Sat, 18 Apr 2020 16:14:38 +0000 (16:14 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 18 Apr 2020 16:14:38 +0000 (16:14 +0000)
src/Model/Tag.php

index 6de872a9e58f3438a9e4285a1c25b8b076efce6d..c3d1c501626c771bb76e1d172937bd70aa494551 100644 (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;
                }