From 509dc29b2d065341dd27cdc3735a5fc06bacf8ac Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Tue, 6 Nov 2018 21:37:10 +0100 Subject: [PATCH 1/2] Fix return url when dropping post loaded by update_* in non-frio --- include/items.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/items.php b/include/items.php index f28f8f571..9929f535f 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 From 93d50af700e94d3f099559f86c31b406520fc309 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Tue, 6 Nov 2018 22:22:42 +0100 Subject: [PATCH 2/2] move live update: update_contacts to update_contact --- mod/{update_contacts.php => update_contact.php} | 2 +- view/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename mod/{update_contacts.php => update_contact.php} (96%) 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 1144ed142..361234fea 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 384b35523..95e7b1542 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); }