mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 13:54:25 +02:00
Implement photo_upload_form hook as Event
This commit is contained in:
parent
f4624b0591
commit
7298ad29c1
4 changed files with 57 additions and 47 deletions
|
@ -12,12 +12,12 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\ACL;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
use Friendica\Event\ArrayFilterEvent;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Photo;
|
||||
|
@ -648,7 +648,11 @@ function photos_content()
|
|||
'default_upload' => true
|
||||
];
|
||||
|
||||
Hook::callAll('photo_upload_form', $ret);
|
||||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
$eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::PHOTO_UPLOAD_FORM, $ret)
|
||||
);
|
||||
|
||||
$default_upload_box = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_box.tpl'), []);
|
||||
$default_upload_submit = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_submit.tpl'), [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue