X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=3868db40a29770b186d918baa3d0651706bfb568;hb=b2d17abc7b481321bcac0b6f995a6fc3703c99f3;hp=c5d8fc023d6558d7f3da77b2338522db16877a5b;hpb=ec66553032820d6fff718a716e5cfdb2c38cd6cd;p=friendica.git diff --git a/include/items.php b/include/items.php index c5d8fc023d..3868db40a2 100644 --- a/include/items.php +++ b/include/items.php @@ -13,6 +13,7 @@ use Friendica\Core\PConfig; 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; @@ -41,7 +42,7 @@ function add_page_info_data(array $data, $no_photos = false) $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 ""; @@ -326,7 +327,7 @@ function drop_items(array $items) { $uid = 0; - if (!local_user() && !remote_user()) { + if (!Session::isAuthenticated()) { return; } @@ -362,7 +363,7 @@ function drop_item($id, $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']; }