X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Feditpost.php;h=780145ed3f72d885791cc6f6be7c1a3bfbe574d3;hb=cbc898d90296fba04b01772cef6f553eee7616cd;hp=61dfcf911d2d7e07dc0c95a2d463fe925a92c002;hpb=807ad145218ab6d4c57b6d200f4c89f63620502f;p=friendica.git diff --git a/mod/editpost.php b/mod/editpost.php index 61dfcf911d..780145ed3f 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -21,20 +21,14 @@ function editpost_content(App $a) } $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); - $return_url = (($a->argc > 1) ? base64_decode($a->argv[2]) : ''); if (!$post_id) { notice(L10n::t('Item not found') . EOL); return; } - // Fallback to SESSION return_path - if (empty($return_url)) { - $return_url = $_SESSION['return_path']; - } - $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', - 'type', 'body', 'title', 'file', 'wall', 'post-type']; + 'type', 'body', 'title', 'file', 'wall', 'post-type', 'guid']; $item = Item::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]); @@ -57,15 +51,6 @@ function editpost_content(App $a) '$nickname' => $a->user['nickname'] ]); - $tpl = get_markup_template('jot-end.tpl'); - $a->page['end'] .= replace_macros($tpl, [ - '$baseurl' => System::baseUrl(), - '$ispublic' => ' ', // L10n::t('Visible to everybody'), - '$geotag' => $geotag, - '$nickname' => $a->user['nickname'] - ]); - - $tpl = get_markup_template("jot.tpl"); if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) { @@ -101,7 +86,7 @@ function editpost_content(App $a) $o .= replace_macros($tpl, [ '$is_edit' => true, - '$return_path' => $return_url, + '$return_path' => '/display/' . $item['guid'], '$action' => 'item', '$share' => L10n::t('Save'), '$upload' => L10n::t('Upload photo'),