summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-20 19:14:50 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-05 12:43:57 +0200
commit3b835d8076c844adde1014e994256740c790857b (patch)
tree4fe22ac0c02ecc221115fc8844eceb3516df68a1 /apps/files_sharing/appinfo
parent6a0552224de21e137c3cfa63c589c2b3f65a0987 (diff)
downloadnextcloud-server-3b835d8076c844adde1014e994256740c790857b.tar.gz
nextcloud-server-3b835d8076c844adde1014e994256740c790857b.zip
Js magic for deleted shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r--apps/files_sharing/appinfo/app.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index f5aa1fc09a1..40a103edb9f 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -48,6 +48,9 @@ $eventDispatcher->addListener(
);
$config = \OC::$server->getConfig();
+$shareManager = \OC::$server->getShareManager();
+$userSession = \OC::$server->getUserSession();
+
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
\OCA\Files\App::getNavigationManager()->add(function () {
$l = \OC::$server->getL10N('files_sharing');
@@ -59,6 +62,19 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
'name' => $l->t('Shared with you'),
];
});
+ $deletedShares = $shareManager->getDeletedSharedWith($userSession->getUser()->getUID(), \OCP\Share::SHARE_TYPE_GROUP, null, -1, 0);
+ if (count($deletedShares) > 0) {
+ \OCA\Files\App::getNavigationManager()->add(function () {
+ $l = \OC::$server->getL10N('files_sharing');
+ return [
+ 'id' => 'deletedshares',
+ 'appname' => 'files_sharing',
+ 'script' => 'list.php',
+ 'order' => 18,
+ 'name' => $l->t('Deleted shares'),
+ ];
+ });
+ }
if (\OCP\Util::isSharingDisabledForUser() === false) {
\OCA\Files\App::getNavigationManager()->add(function () {