]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Try additional $_SERVER properties to get relative path of Friendica
[friendica.git] / include / items.php
index 8b666f1ca24337cd74b0647c56e21c86371acf6b..27a7db767b4d16c6ee8a8a8a57abc02507524a27 100644 (file)
@@ -316,9 +316,9 @@ function subscribe_to_hub($url, array $importer, array $contact, $hubmode = 'sub
                DBA::update('contact', ['hub-verify' => $verify_token], ['id' => $contact['id']]);
        }
 
-       Network::post($url, $params);
+       $postResult = Network::post($url, $params);
 
-       logger('subscribe_to_hub: returns: ' . $a->get_curl_code(), LOGGER_DEBUG);
+       logger('subscribe_to_hub: returns: ' . $postResult->getReturnCode(), LOGGER_DEBUG);
 
        return;
 
@@ -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,17 +401,17 @@ 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
                Item::deleteForUser(['id' => $item['id']], local_user());
 
-               goaway('/item/drop/' . $id);
+               goaway('/network');
                //NOTREACHED
        } else {
                notice(L10n::t('Permission denied.') . EOL);
-               goaway('/item/drop/' . $id);
+               goaway('/display/' . $item['guid']);
                //NOTREACHED
        }
 }