diff --git a/include/items.php b/include/items.php index f28f8f5718..9929f535f0 100644 --- a/include/items.php +++ b/include/items.php @@ -410,6 +410,10 @@ function drop_item($id, $return = '') Item::deleteForUser(['id' => $item['id']], local_user()); $return_url = hex2bin($return); + + // removes update_* from return_url to ignore Ajax refresh + $return_url = str_replace("update_", "", $return_url); + if (empty($return_url) || strpos($return_url, 'display') !== false) { $a->internalRedirect('network'); //NOTREACHED diff --git a/mod/update_contacts.php b/mod/update_contact.php similarity index 96% rename from mod/update_contacts.php rename to mod/update_contact.php index 1144ed1427..361234fea7 100644 --- a/mod/update_contacts.php +++ b/mod/update_contact.php @@ -7,7 +7,7 @@ use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Module\Contact; -function update_contacts_content(App $a) +function update_contact_content(App $a) { header("Content-type: text/html"); echo "\r\n"; diff --git a/view/js/main.js b/view/js/main.js index 384b355230..95e7b1542e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -390,7 +390,7 @@ function NavUpdate() { $('nav').trigger('nav-update', data.result); // start live update - ['network', 'profile', 'community', 'notes', 'display', 'contacts'].forEach(function (src) { + ['network', 'profile', 'community', 'notes', 'display', 'contact'].forEach(function (src) { if ($('#live-' + src).length) { liveUpdate(src); }