mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:50:11 +00:00
Move Activity/Namespaces defines to constants
This commit is contained in:
parent
978262a718
commit
07cea24430
34 changed files with 467 additions and 403 deletions
|
@ -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'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue