diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-16 14:21:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 14:21:56 +0100 |
commit | 1af4301997c4d4979a9a43acb5450a436f672eb2 (patch) | |
tree | 63a6171472e6ba8e29001e9d383d697faf695162 /apps/files_sharing | |
parent | 8a7a89f42cc2a92c8041e83512eac1e25ef8ff55 (diff) | |
parent | 81d625d44d2b177b58b095da21ce100057a1755b (diff) | |
download | nextcloud-server-1af4301997c4d4979a9a43acb5450a436f672eb2.tar.gz nextcloud-server-1af4301997c4d4979a9a43acb5450a436f672eb2.zip |
Merge pull request #41363 from nextcloud/optmize-storage-wrappers-27
[27] optimize builtin storage wrappers
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/composer/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/composer/composer/autoload_static.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Mount.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/ISharedMountPoint.php | 28 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedMount.php | 2 |
5 files changed, 33 insertions, 2 deletions
diff --git a/apps/files_sharing/composer/composer/autoload_classmap.php b/apps/files_sharing/composer/composer/autoload_classmap.php index a82d721b1bd..a064f58a17e 100644 --- a/apps/files_sharing/composer/composer/autoload_classmap.php +++ b/apps/files_sharing/composer/composer/autoload_classmap.php @@ -54,6 +54,7 @@ return array( 'OCA\\Files_Sharing\\External\\Watcher' => $baseDir . '/../lib/External/Watcher.php', 'OCA\\Files_Sharing\\Helper' => $baseDir . '/../lib/Helper.php', 'OCA\\Files_Sharing\\Hooks' => $baseDir . '/../lib/Hooks.php', + 'OCA\\Files_Sharing\\ISharedMountPoint' => $baseDir . '/../lib/ISharedMountPoint.php', 'OCA\\Files_Sharing\\ISharedStorage' => $baseDir . '/../lib/ISharedStorage.php', 'OCA\\Files_Sharing\\Listener\\LegacyBeforeTemplateRenderedListener' => $baseDir . '/../lib/Listener/LegacyBeforeTemplateRenderedListener.php', 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => $baseDir . '/../lib/Listener/LoadAdditionalListener.php', diff --git a/apps/files_sharing/composer/composer/autoload_static.php b/apps/files_sharing/composer/composer/autoload_static.php index 63d0bae8995..bc5cc7e76ff 100644 --- a/apps/files_sharing/composer/composer/autoload_static.php +++ b/apps/files_sharing/composer/composer/autoload_static.php @@ -69,6 +69,7 @@ class ComposerStaticInitFiles_Sharing 'OCA\\Files_Sharing\\External\\Watcher' => __DIR__ . '/..' . '/../lib/External/Watcher.php', 'OCA\\Files_Sharing\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', 'OCA\\Files_Sharing\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', + 'OCA\\Files_Sharing\\ISharedMountPoint' => __DIR__ . '/..' . '/../lib/ISharedMountPoint.php', 'OCA\\Files_Sharing\\ISharedStorage' => __DIR__ . '/..' . '/../lib/ISharedStorage.php', 'OCA\\Files_Sharing\\Listener\\LegacyBeforeTemplateRenderedListener' => __DIR__ . '/..' . '/../lib/Listener/LegacyBeforeTemplateRenderedListener.php', 'OCA\\Files_Sharing\\Listener\\LoadAdditionalListener' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalListener.php', diff --git a/apps/files_sharing/lib/External/Mount.php b/apps/files_sharing/lib/External/Mount.php index ccd31147f26..283027ac43a 100644 --- a/apps/files_sharing/lib/External/Mount.php +++ b/apps/files_sharing/lib/External/Mount.php @@ -26,8 +26,9 @@ namespace OCA\Files_Sharing\External; use OC\Files\Mount\MountPoint; use OC\Files\Mount\MoveableMount; +use OCA\Files_Sharing\ISharedMountPoint; -class Mount extends MountPoint implements MoveableMount { +class Mount extends MountPoint implements MoveableMount, ISharedMountPoint { /** * @var \OCA\Files_Sharing\External\Manager diff --git a/apps/files_sharing/lib/ISharedMountPoint.php b/apps/files_sharing/lib/ISharedMountPoint.php new file mode 100644 index 00000000000..f3947599c29 --- /dev/null +++ b/apps/files_sharing/lib/ISharedMountPoint.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2023 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * 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 + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCA\Files_Sharing; + +interface ISharedMountPoint { + +} diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index 943f14dc2bd..b76d241bc40 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -44,7 +44,7 @@ use OCP\Share\Events\VerifyMountPointEvent; /** * Shared mount points can be moved by the user */ -class SharedMount extends MountPoint implements MoveableMount { +class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint { /** * @var \OCA\Files_Sharing\SharedStorage $storage */ |