mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 20:04:32 +02:00
Rename events to insert local post
This commit is contained in:
parent
9aeb68231d
commit
9c6f5f222d
8 changed files with 23 additions and 23 deletions
|
@ -46,7 +46,7 @@ function item_post()
|
|||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
$_REQUEST = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::POST_LOCAL_START, $_REQUEST)
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL_START, $_REQUEST)
|
||||
)->getArray();
|
||||
|
||||
$return_path = $_REQUEST['return'] ?? '';
|
||||
|
@ -282,7 +282,7 @@ function item_process(array $post, array $request, bool $preview, string $return
|
|||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
$post = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::POST_LOCAL, $post)
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL, $post)
|
||||
)->getArray();
|
||||
|
||||
unset($post['edit']);
|
||||
|
|
|
@ -1012,7 +1012,7 @@ class Item
|
|||
}
|
||||
|
||||
$post = $this->eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::POST_LOCAL_END, $post)
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL_END, $post)
|
||||
)->getArray();
|
||||
|
||||
$author = DBA::selectFirst('contact', ['thumb'], ['uid' => $post['uid'], 'self' => true]);
|
||||
|
|
|
@ -43,9 +43,9 @@ final class HookEventBridge
|
|||
ArrayFilterEvent::NAV_INFO => 'nav_info',
|
||||
ArrayFilterEvent::FEATURE_ENABLED => 'isEnabled',
|
||||
ArrayFilterEvent::FEATURE_GET => 'get',
|
||||
ArrayFilterEvent::POST_LOCAL_START => 'post_local_start',
|
||||
ArrayFilterEvent::POST_LOCAL => 'post_local',
|
||||
ArrayFilterEvent::POST_LOCAL_END => 'post_local_end',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_START => 'post_local_start',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL => 'post_local',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_END => 'post_local_end',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE => 'post_remote',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE_END => 'post_remote_end',
|
||||
ArrayFilterEvent::PHOTO_UPLOAD_FORM => 'photo_upload_form',
|
||||
|
@ -101,9 +101,9 @@ final class HookEventBridge
|
|||
ArrayFilterEvent::NAV_INFO => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::FEATURE_ENABLED => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::FEATURE_GET => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL_START => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_START => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::PHOTO_UPLOAD_FORM => 'onArrayFilterEvent',
|
||||
|
|
|
@ -24,11 +24,11 @@ final class ArrayFilterEvent extends Event
|
|||
|
||||
public const FEATURE_GET = 'friendica.data.feature_get';
|
||||
|
||||
public const POST_LOCAL_START = 'friendica.data.post_local_start';
|
||||
public const INSERT_POST_LOCAL_START = 'friendica.data.insert_post_local_start';
|
||||
|
||||
public const POST_LOCAL = 'friendica.data.post_local';
|
||||
public const INSERT_POST_LOCAL = 'friendica.data.insert_post_local';
|
||||
|
||||
public const POST_LOCAL_END = 'friendica.data.post_local_end';
|
||||
public const INSERT_POST_LOCAL_END = 'friendica.data.insert_post_local_end';
|
||||
|
||||
public const INSERT_POST_REMOTE = 'friendica.data.insert_post_remote';
|
||||
|
||||
|
|
|
@ -847,7 +847,7 @@ class Item
|
|||
}
|
||||
|
||||
$item = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::POST_LOCAL, $item)
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL, $item)
|
||||
)->getArray();
|
||||
|
||||
if ($dummy_session) {
|
||||
|
|
|
@ -154,7 +154,7 @@ EOT;
|
|||
$post['id'] = $post_id;
|
||||
|
||||
$post = $this->eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::POST_LOCAL_END, $post)
|
||||
new ArrayFilterEvent(ArrayFilterEvent::INSERT_POST_LOCAL_END, $post)
|
||||
)->getArray();
|
||||
|
||||
$post = Post::selectFirst(['uri-id', 'uid'], ['id' => $post_id]);
|
||||
|
|
|
@ -32,9 +32,9 @@ class HookEventBridgeTest extends TestCase
|
|||
ArrayFilterEvent::NAV_INFO => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::FEATURE_ENABLED => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::FEATURE_GET => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL_START => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::POST_LOCAL_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_START => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_LOCAL_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::INSERT_POST_REMOTE_END => 'onArrayFilterEvent',
|
||||
ArrayFilterEvent::PHOTO_UPLOAD_FORM => 'onArrayFilterEvent',
|
||||
|
@ -313,9 +313,9 @@ class HookEventBridgeTest extends TestCase
|
|||
[ArrayFilterEvent::NAV_INFO, 'nav_info'],
|
||||
[ArrayFilterEvent::FEATURE_ENABLED, 'isEnabled'],
|
||||
[ArrayFilterEvent::FEATURE_GET, 'get'],
|
||||
[ArrayFilterEvent::POST_LOCAL_START, 'post_local_start'],
|
||||
[ArrayFilterEvent::POST_LOCAL, 'post_local'],
|
||||
[ArrayFilterEvent::POST_LOCAL_END, 'post_local_end'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL_START, 'post_local_start'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL, 'post_local'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL_END, 'post_local_end'],
|
||||
[ArrayFilterEvent::INSERT_POST_REMOTE, 'post_remote'],
|
||||
[ArrayFilterEvent::INSERT_POST_REMOTE_END, 'post_remote_end'],
|
||||
[ArrayFilterEvent::PHOTO_UPLOAD_FORM, 'photo_upload_form'],
|
||||
|
|
|
@ -29,9 +29,9 @@ class ArrayFilterEventTest extends TestCase
|
|||
[ArrayFilterEvent::NAV_INFO, 'friendica.data.nav_info'],
|
||||
[ArrayFilterEvent::FEATURE_ENABLED, 'friendica.data.feature_enabled'],
|
||||
[ArrayFilterEvent::FEATURE_GET, 'friendica.data.feature_get'],
|
||||
[ArrayFilterEvent::POST_LOCAL_START, 'friendica.data.post_local_start'],
|
||||
[ArrayFilterEvent::POST_LOCAL, 'friendica.data.post_local'],
|
||||
[ArrayFilterEvent::POST_LOCAL_END, 'friendica.data.post_local_end'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL_START, 'friendica.data.insert_post_local_start'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL, 'friendica.data.insert_post_local'],
|
||||
[ArrayFilterEvent::INSERT_POST_LOCAL_END, 'friendica.data.insert_post_local_end'],
|
||||
[ArrayFilterEvent::INSERT_POST_REMOTE, 'friendica.data.insert_post_remote'],
|
||||
[ArrayFilterEvent::INSERT_POST_REMOTE_END, 'friendica.data.insert_post_remote_end'],
|
||||
[ArrayFilterEvent::PHOTO_UPLOAD_FORM, 'friendica.data.photo_upload_form'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue