From 3f5cfc8fa2bbce74dd899b9cee65d1fc3891e8e1 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 18 Jun 2024 07:18:09 +0000 Subject: fix return to blank page after editing post under some circumstances --- Zotlabs/Module/Editpost.php | 2 +- Zotlabs/Module/Item.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Editpost.php b/Zotlabs/Module/Editpost.php index 5e405bdbc..6f524cdb8 100644 --- a/Zotlabs/Module/Editpost.php +++ b/Zotlabs/Module/Editpost.php @@ -84,7 +84,7 @@ class Editpost extends \Zotlabs\Web\Controller { 'item' => $itm[0], 'editor_autocomplete'=> true, 'bbco_autocomplete'=> 'bbcode', - 'return_path' => $_SESSION['return_url'], + 'return_path' => 'hq', 'button' => t('Submit'), 'hide_voting' => true, 'hide_future' => true, diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 0b46f2baf..3d13655d2 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1262,6 +1262,11 @@ class Item extends Controller { if ((x($_REQUEST, 'return')) && strlen($return_path)) { logger('return: ' . $return_path); + + if ($return_path === 'hq') { + goaway(z_root() . '/hq/' . $datarray['uuid']); + } + goaway(z_root() . "/" . $return_path); } killme(); -- cgit v1.2.3