]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Fix small typo / Workerqueue count now only counts non deferred entries
[friendica.git] / include / items.php
index 887bbb5b685b5d387d0d163d795b6cce82c6e660..961a20b240e01548879faad46ffeb5630e16202c 100644 (file)
@@ -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']);