]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge branch 'master' of https://github.com/friendica/friendica into threaded_items
[friendica.git] / include / items.php
index a2b0fe053c4c1e015edb9df936c93701bd1f589c..7b43bf500a60c9bc55bc5053b6271841b893ca1f 100755 (executable)
@@ -2122,8 +2122,11 @@ function local_delivery($importer,$data) {
 
 
        $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'owner');
-       if(! $rawtags)
-               $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
+
+// Fallback should not be needed here. If it isn't DFRN it won't have DFRN updated tags
+//     if(! $rawtags)
+//             $rawtags = $feed->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author');
+
        if($rawtags) {
                $elems = $rawtags[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10];
                if($elems['name'][0]['attribs'][NAMESPACE_DFRN]['updated']) {
@@ -3712,9 +3715,21 @@ function drop_item($id,$interactive = true) {
 
        $owner = $item['uid'];
 
+       $cid = 0;
+
        // check if logged in user is either the author or owner of this item
 
-       if((local_user() == $item['uid']) || (remote_user() == $item['contact-id']) || (! $interactive)) {
+       if(is_array($_SESSION['remote'])) {
+               foreach($_SESSION['remote'] as $visitor) {
+                       if($visitor['uid'] == $item['uid'] && $visitor['cid'] == $item['contact-id']) {
+                               $cid = $visitor['cid'];
+                               break;
+                       }
+               }
+       }
+
+
+       if((local_user() == $item['uid']) || ($cid) || (! $interactive)) {
 
                logger('delete item: ' . $item['id'], LOGGER_DEBUG);
                // delete the item