}
$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()]);
'$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 <strong>everybody</strong>'),
- '$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'])) {
$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'),