Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable23] Allow additional Sabre plugins in publicwebdav.php #35751

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 5 additions & 0 deletions apps/dav/appinfo/v1/publicwebdav.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@

$server->addPlugin($linkCheckPlugin);
$server->addPlugin($filesDropPlugin);
// allow setup of additional plugins
$event = new SabrePublicPluginEvent($server);

Check failure

Code scanning / Psalm

UndefinedClass

Class, interface or enum named SabrePublicPluginEvent does not exist
/** @var IEventDispatcher $eventDispatcher */
$eventDispatcher = \OC::$server->get(IEventDispatcher::class);

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named IEventDispatcher does not exist

Check failure

Code scanning / Psalm

UndefinedClass

Class, interface or enum named IEventDispatcher does not exist
$eventDispatcher->dispatchTyped($event);

Check failure

Code scanning / Psalm

UndefinedDocblockClass

Docblock-defined class, interface or enum named IEventDispatcher does not exist

// 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 <eneiluj@posteo.net> 2022
*
* @author Julien Veyssier <eneiluj@posteo.net>
*
* @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 {
}