diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-07-06 16:11:15 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-07-11 13:52:28 +0200 |
commit | b0418f730f183e74df155adf1327f8489bbc56bf (patch) | |
tree | 6c2be45c9a4708fb84a345419311a76e99bbd071 /apps/files_sharing/lib | |
parent | a9f7e66d3dbdd7740aa7f308665d576d3a491378 (diff) | |
download | nextcloud-server-b0418f730f183e74df155adf1327f8489bbc56bf.tar.gz nextcloud-server-b0418f730f183e74df155adf1327f8489bbc56bf.zip |
fix: drop legacy sharing files
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 71 | ||||
-rw-r--r-- | apps/files_sharing/lib/Listener/LoadAdditionalListener.php | 2 |
2 files changed, 3 insertions, 70 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 9051d123f1e..649f5d0f78f 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -117,7 +117,7 @@ class Application extends App implements IBootstrap { $context->injectFn([$this, 'registerMountProviders']); $context->injectFn([$this, 'registerEventsScripts']); $context->injectFn([$this, 'registerDownloadEvents']); - $context->injectFn([$this, 'setupSharingMenus']); + $context->injectFn([$this, 'loadFilesSharing']); Helper::registerHooks(); @@ -215,76 +215,11 @@ class Application extends App implements IBootstrap { ); } - public function setupSharingMenus(IManager $shareManager, IFactory $l10nFactory, IUserSession $userSession): void { + public function loadFilesSharing(IManager $shareManager): void { if (!$shareManager->shareApiEnabled() || !class_exists('\OCA\Files\App')) { return; } - $navigationManager = \OCA\Files\App::getNavigationManager(); - // show_Quick_Access stored as string - $navigationManager->add(function () use ($shareManager, $l10nFactory, $userSession) { - $l = $l10nFactory->get('files_sharing'); - $user = $userSession->getUser(); - $userId = $user ? $user->getUID() : null; - - $sharingSublistArray = []; - - if ($shareManager->sharingDisabledForUser($userId) === false) { - $sharingSublistArray[] = [ - 'id' => 'sharingoutOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 16, - 'name' => $l->t('Shared with others'), - ]; - } - - $sharingSublistArray[] = [ - 'id' => 'sharinginOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 15, - 'name' => $l->t('Shared with you'), - ]; - - if ($shareManager->sharingDisabledForUser($userId) === false) { - // Check if sharing by link is enabled - if ($shareManager->shareApiAllowLinks()) { - $sharingSublistArray[] = [ - 'id' => 'sharinglinksOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 17, - 'name' => $l->t('Shared by link'), - ]; - } - } - - $sharingSublistArray[] = [ - 'id' => 'deletedsharesOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 19, - 'name' => $l->t('Deleted shares'), - ]; - - $sharingSublistArray[] = [ - 'id' => 'pendingsharesOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 19, - 'name' => $l->t('Pending shares'), - ]; - - return [ - 'id' => 'shareoverviewOld', - 'appname' => 'files_sharing', - 'script' => 'list.php', - 'order' => 18, - 'name' => $l->t('Shares (old)'), - 'classes' => 'collapsible', - 'sublist' => $sharingSublistArray, - ]; - }); + Util::addScript(self::APP_ID, 'files_sharing', 'files'); } } diff --git a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php index 8c11fec3999..d44b8c559ad 100644 --- a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php @@ -37,8 +37,6 @@ class LoadAdditionalListener implements IEventListener { return; } - // After files for the files list shared content - Util::addScript(Application::APP_ID, 'files_sharing', 'files'); // After files for the breadcrumb share indicator Util::addScript(Application::APP_ID, 'additionalScripts', 'files'); Util::addStyle(Application::APP_ID, 'icons'); |