Merge pull request #6092 from JonnyTischbein/issue_drop_item_return_non-frio

Fix return url when dropping post loaded by update_* in non-frio
This commit is contained in:
Hypolite Petovan 2018-11-06 20:16:28 -05:00 committed by GitHub
commit 27dd913fcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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 "<!DOCTYPE html><html><body>\r\n";

View file

@ -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);
}