mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 12:34:39 +02:00
Wrap item in INSERT_POST_LOCAL in separate array
This commit is contained in:
parent
59359f7d9d
commit
1ddd5674e1
5 changed files with 54 additions and 7 deletions
10
mod/item.php
10
mod/item.php
|
@ -281,10 +281,16 @@ function item_process(array $post, array $request, bool $preview, string $return
|
|||
|
||||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
$post = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL, $post)
|
||||
$hook_data = [
|
||||
'item' => $post,
|
||||
];
|
||||
|
||||
$hook_data = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL, $hook_data)
|
||||
)->getArray();
|
||||
|
||||
$post = $hook_data['item'] ?? $post;
|
||||
|
||||
unset($post['edit']);
|
||||
unset($post['self']);
|
||||
unset($post['api_source']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue