use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
+use Friendica\Model\Profile;
use Friendica\Object\Post;
use Friendica\Object\Thread;
use Friendica\Util\DateTimeFormat;
$obj = $r[0];
- $author = '[url=' . Contact::magicLink($item['author-link']) . ']' . $item['author-name'] . '[/url]';
- $objauthor = '[url=' . Contact::magicLink($obj['author-link']) . ']' . $obj['author-name'] . '[/url]';
+ $author = '[url=' . Contact::magicLinkById($item['author-id']) . ']' . $item['author-name'] . '[/url]';
+ $objauthor = '[url=' . Contact::magicLinkById($obj['author-id']) . ']' . $obj['author-name'] . '[/url]';
switch ($obj['verb']) {
case ACTIVITY_POST:
// add zrl's to public images
$photo_pattern = "/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is";
if (preg_match($photo_pattern, $item['body'])) {
- $photo_replace = '[url=' . Contact::magicLink('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]';
+ $photo_replace = '[url=' . Profile::zrl('$1' . '/photos/' . '$2' . '/image/' . '$3' ,true) . '][img' . '$4' . ']h' . '$5' . '[/img][/url]';
$item['body'] = BBCode::pregReplaceInTag($photo_pattern, $photo_replace, 'url', $item['body']);
}
// add sparkle links to appropriate permalinks
- $item['plink'] = Contact::magicLink($item['author-link'], $item['plink']);
+ $item['plink'] = Contact::magicLinkById($item['author-id'], $item['plink']);
}
/**
$tags = \Friendica\Model\Term::populateTagsFromItem($item);
- $profile_link = Contact::magicLink($item['author-link']);
+ $profile_link = Contact::magicLinkbyId($item['author-id']);
if (strpos($profile_link, 'redir/') === 0) {
$sparkle = ' sparkle';
$sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
}
- $profile_link = Contact::magicLink($item['author-link']);
+ $profile_link = Contact::magicLinkById($item['author-id']);
$sparkle = (strpos($profile_link, 'redir/') === 0);
$cid = 0;
}
if (activity_match($item['verb'], $verb) && ($item['id'] != $item['parent'])) {
- $url = Contact::MagicLink($item['author-link']);
+ $url = Contact::MagicLinkbyId($item['author-id']);
if (strpos($url, 'redir/') === 0) {
$sparkle = ' class="sparkle" ';
}
$profile_name = $item['author-link'];
}
- $profile_link = Contact::magicLink($item['author-link']);
+ $profile_link = Contact::magicLinkById($item['author-id']);
if (strpos($profile_link, 'redir/') === 0) {
$sparkle = ' sparkle';
}
$this->owner_photo = $this->getDataValue('owner-avatar');
$this->owner_name = $this->getDataValue('owner-name');
$this->wall_to_wall = true;
- $this->owner_url = Contact::magicLink($this->getDataValue('owner-link'));
+ $this->owner_url = Contact::magicLinkById($this->getDataValue('owner-id'));
}
}
}