From 6b96051be54ce93ee7b8b4256a42ee7caf3bddd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 14 Jan 2022 13:27:06 +0100 Subject: Add controller description and fix typings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/DocumentAPIController.php | 6 ++++++ lib/TemplateManager.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Controller/DocumentAPIController.php b/lib/Controller/DocumentAPIController.php index 86cb2081..dc155446 100644 --- a/lib/Controller/DocumentAPIController.php +++ b/lib/Controller/DocumentAPIController.php @@ -59,6 +59,12 @@ class DocumentAPIController extends \OCP\AppFramework\OCSController { } /** + * Create a file from a public share link of a folder + * + * As the server template API for file creation is not available there, we need a dedicated API + * in order to properly create files as public page visitors. This is being called in the new file + * actions in src/view/NewFileMenu.js + * * @NoAdminRequired * @PublicPage */ diff --git a/lib/TemplateManager.php b/lib/TemplateManager.php index 803f8be9..f32b31ed 100644 --- a/lib/TemplateManager.php +++ b/lib/TemplateManager.php @@ -107,7 +107,7 @@ class TemplateManager { ]; public function __construct( - $userId, + ?string $userId, IConfig $config, IAppData $appData, IURLGenerator $urlGenerator, @@ -144,7 +144,7 @@ class TemplateManager { } } - public function setUserId($userId) { + public function setUserId(?string $userId): void { $this->userId = $userId; } -- cgit v1.2.3