]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/BBCode.php
Move Activity/Namespaces defines to constants
[friendica.git] / src / Content / Text / BBCode.php
index 75f5d506e1b60339943db55943c7ae1afc71c96d..8187521582ff253a665b7acd45031d7c3fd54c66 100644 (file)
@@ -24,6 +24,7 @@ use Friendica\Model\Event;
 use Friendica\Model\Photo;
 use Friendica\Network\Probe;
 use Friendica\Object\Image;
+use Friendica\Protocol\Activity;
 use Friendica\Util\Map;
 use Friendica\Util\Network;
 use Friendica\Util\ParseUrl;
@@ -276,7 +277,7 @@ class BBCode extends BaseObject
 
                        if (preg_match_all("(\[url=(.*?)\]\s*\[img\](.*?)\[\/img\]\s*\[\/url\])ism", $body, $pictures, PREG_SET_ORDER)) {
                                if ((count($pictures) == 1) && !$has_title) {
-                                       if (!empty($item['object-type']) && ($item['object-type'] == ACTIVITY_OBJ_IMAGE)) {
+                                       if (!empty($item['object-type']) && ($item['object-type'] == Activity::OBJ_IMAGE)) {
                                                // Replace the preview picture with the real picture
                                                $url = str_replace('-1.', '-0.', $pictures[0][2]);
                                                $data = ['url' => $url, 'type' => 'photo'];