Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/dav/appinfo/v1/publicwebdav.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
*
*/

use OCP\EventDispatcher\IEventDispatcher;
use OCP\SabrePublicPluginEvent;
use Psr\Log\LoggerInterface;

// load needed apps
Expand Down Expand Up @@ -111,6 +113,11 @@

$server->addPlugin($linkCheckPlugin);
$server->addPlugin($filesDropPlugin);
// allow setup of additional plugins
$event = new SabrePublicPluginEvent($server);
/** @var IEventDispatcher $eventDispatcher */
$eventDispatcher = \OC::$server->get(IEventDispatcher::class);
$eventDispatcher->dispatchTyped($event);

// And off we go!
$server->exec();
25 changes: 25 additions & 0 deletions lib/public/SabrePublicPluginEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* @copyright Julien Veyssier <[email protected]> 2022
*
* @author Julien Veyssier <[email protected]>
*
* @license AGPL-3.0-or-later
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP;

class SabrePublicPluginEvent extends SabrePluginEvent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}