Fix projects implementation

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2022-03-13 13:43:21 +01:00
parent 164fd3af2a
commit 6146fb71e9
3 changed files with 3 additions and 9 deletions

View File

@ -23,7 +23,7 @@ Requirements:
- mbstring: *
- Nextcloud v20+
]]></description>
<version>10.1.0</version>
<version>10.0.3</version>
<licence>agpl</licence>
<author mail="mklehr@gmx.net">Marcel Klehr</author>
<author mail="blizzz@arthur-schiwon.de" homepage="https://www.arthur-schiwon.de">Arthur Schiwon</author>

View File

@ -88,9 +88,9 @@ class Application extends App implements IBootstrap {
* @throws \Throwable
*/
public function boot(IBootContext $context): void {
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
$container = $context->getServerContainer();
CreateBookmark::register($container->get(IEventDispatcher::class));
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
}
protected function registerCollaborationResources(IProviderManager $resourceManager, SymfonyAdapter $symfonyAdapter): void {

View File

@ -16,7 +16,6 @@ use OCP\Collaboration\Resources\IProvider;
use OCP\Collaboration\Resources\IResource;
use OCP\IURLGenerator;
use OCP\IUser;
use Psr\Log\LoggerInterface;
class ResourceProvider implements IProvider {
public const RESOURCE_TYPE = 'bookmarks';
@ -32,16 +31,11 @@ class ResourceProvider implements IProvider {
* @var Authorizer
*/
private $authorizer;
/**
* @var LoggerInterface
*/
private $logger;
public function __construct(BookmarkMapper $bookmarkMapper, IURLGenerator $url, Authorizer $authorizer, LoggerInterface $logger) {
public function __construct(BookmarkMapper $bookmarkMapper, IURLGenerator $url, Authorizer $authorizer) {
$this->bookmarkMapper = $bookmarkMapper;
$this->url = $url;
$this->authorizer = $authorizer;
$this->logger = $logger;
}
/**