X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=961a20b240e01548879faad46ffeb5630e16202c;hb=e759497af32681e0932475114bcda8b8adf67df8;hp=887bbb5b685b5d387d0d163d795b6cce82c6e660;hpb=35abc4bb64bbb461e6448beed10484c028b74340;p=friendica.git diff --git a/include/items.php b/include/items.php index 887bbb5b68..961a20b240 100644 --- a/include/items.php +++ b/include/items.php @@ -345,7 +345,7 @@ function drop_items(array $items) } } -function drop_item($id) +function drop_item($id, $return = '') { $a = BaseObject::getApp(); @@ -409,8 +409,15 @@ function drop_item($id) // delete the item Item::deleteForUser(['id' => $item['id']], local_user()); - $a->internalRedirect('network'); - //NOTREACHED + $return_url = hex2bin($return); + if (empty($return_url) || strpos($return_url, 'display') !== false) { + $a->internalRedirect('network'); + //NOTREACHED + } + else { + $a->internalRedirect($return_url); + //NOTREACHED + } } else { notice(L10n::t('Permission denied.') . EOL); $a->internalRedirect('display/' . $item['guid']);