+ // Fallback to SESSION return_path
+ if (empty($return_url)) {
+ $return_url = $_SESSION['return_url'];
+ }
+
+ $fields = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
+ 'type', 'body', 'title', 'file', 'wall', 'post-type'];
+
+ $item = Item::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]);