]> git.mxchange.org Git - friendica.git/commitdiff
Return to item if not owned by user or canceld
authorJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 9 Oct 2018 18:40:25 +0000 (20:40 +0200)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 9 Oct 2018 18:40:25 +0000 (20:40 +0200)
include/items.php

index 8b666f1ca24337cd74b0647c56e21c86371acf6b..cfd792e2dabe35800fcf4f6848ed15d3995e8461 100644 (file)
@@ -349,7 +349,7 @@ function drop_item($id)
 
        // locate item to be deleted
 
-       $fields = ['id', 'uid', 'contact-id', 'deleted'];
+       $fields = ['id', 'uid', 'guid', 'contact-id', 'deleted'];
        $item = Item::selectFirstForUser(local_user(), $fields, ['id' => $id]);
 
        if (!DBA::isResult($item)) {
@@ -401,7 +401,7 @@ function drop_item($id)
                }
                // Now check how the user responded to the confirmation query
                if (!empty($_REQUEST['canceled'])) {
-                       goaway('/item/drop/' . $id);
+                       goaway('/display/' . $item['guid']);
                }
 
                // delete the item
@@ -411,7 +411,7 @@ function drop_item($id)
                //NOTREACHED
        } else {
                notice(L10n::t('Permission denied.') . EOL);
-               goaway('/item/drop/' . $id);
+               goaway('/display/' . $item['guid']);
                //NOTREACHED
        }
 }