diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index b9ed2f4c39a40..b5e1b944bc52d 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -107,6 +107,8 @@ class Manager implements IManager { private $sharingDisabledForUsersCache; /** @var EventDispatcherInterface */ private $legacyDispatcher; + /** @var LegacyHooks */ + private $legacyHooks; /** @var IMailer */ private $mailer; /** @var IURLGenerator */ @@ -149,6 +151,9 @@ public function __construct( $this->rootFolder = $rootFolder; $this->legacyDispatcher = $legacyDispatcher; $this->sharingDisabledForUsersCache = new CappedMemoryCache(); + // The constructor of LegacyHooks registers the listeners of share events + // do not remove if those are not properly migrated + $this->legacyHooks = new LegacyHooks($this->legacyDispatcher); $this->mailer = $mailer; $this->urlGenerator = $urlGenerator; $this->defaults = $defaults;