]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #7858 from annando/diaspora-date
[friendica.git] / include / items.php
index c5d8fc023d6558d7f3da77b2338522db16877a5b..3868db40a29770b186d918baa3d0651706bfb568 100644 (file)
@@ -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'];
        }