From ba3957fb8a12314e6bcef117767013ee98724302 Mon Sep 17 00:00:00 2001 From: Gadzy Date: Fri, 12 Dec 2014 10:23:51 +0100 Subject: [PATCH] Check for share by link enabled Display "Shared by link" section only if sharing by link is enabled. --- apps/files_sharing/appinfo/app.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 329afa07519..36d148dce96 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -55,14 +55,17 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { "name" => $l->t('Shared with others') ) ); - \OCA\Files\App::getNavigationManager()->add( - array( - "id" => 'sharinglinks', - "appname" => 'files_sharing', - "script" => 'list.php', - "order" => 20, - "name" => $l->t('Shared by link') - ) - ); + // Check if sharing by link is enabled + if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { + \OCA\Files\App::getNavigationManager()->add( + array( + "id" => 'sharinglinks', + "appname" => 'files_sharing', + "script" => 'list.php', + "order" => 20, + "name" => $l->t('Shared by link') + ) + ); + } } } -- 2.39.5