use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\System;
+use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\Model\Item;
use Friendica\Protocol\DFRN;
$data["type"] = "link";
}
- $data["title"] = defaults($data, "title", "");
+ $data["title"] = $data["title"] ?? '';
if ((($data["type"] != "link") && ($data["type"] != "video") && ($data["type"] != "photo")) || ($data["title"] == $data["url"])) {
return "";
{
$uid = 0;
- if (!local_user() && !remote_user()) {
+ if (!Session::isAuthenticated()) {
return;
}
$contact_id = 0;
// check if logged in user is either the author or owner of this item
- if (remote_user($item['uid']) == $item['contact-id']) {
+ if (Session::getRemoteContactID($item['uid']) == $item['contact-id']) {
$contact_id = $item['contact-id'];
}