diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-08-19 08:53:19 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-19 08:53:19 +0200 |
commit | df963b3ccfee30c3c786ce19099b2e739da00baf (patch) | |
tree | 3ddcbaaa6bb217480966bd93d2aa41f0939ca83c | |
parent | 77cfddff0f8eae2c6010e41e585f7543628d554e (diff) | |
parent | 1de5ae8845393be599e543efde45d22db989658a (diff) | |
download | nextcloud-server-df963b3ccfee30c3c786ce19099b2e739da00baf.tar.gz nextcloud-server-df963b3ccfee30c3c786ce19099b2e739da00baf.zip |
Merge pull request #10492 from owncloud/hidesharesectionswhendisabled
Hide sharing sections in files app when sharing API is disabled
-rw-r--r-- | apps/files_sharing/appinfo/app.php | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 60bec2b4050..b22c553ec93 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -24,19 +24,22 @@ OCP\Util::addScript('files_sharing', 'external'); OC_FileProxy::register(new OCA\Files\Share\Proxy()); -\OCA\Files\App::getNavigationManager()->add( - array( - "id" => 'sharingin', - "appname" => 'files_sharing', - "script" => 'list.php', - "order" => 10, - "name" => $l->t('Shared with you') - ) -); - -if (\OCP\Util::isSharingDisabledForUser() === false) { +$config = \OC::$server->getConfig(); +if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { \OCA\Files\App::getNavigationManager()->add( + array( + "id" => 'sharingin', + "appname" => 'files_sharing', + "script" => 'list.php', + "order" => 10, + "name" => $l->t('Shared with you') + ) + ); + + if (\OCP\Util::isSharingDisabledForUser() === false) { + + \OCA\Files\App::getNavigationManager()->add( array( "id" => 'sharingout', "appname" => 'files_sharing', @@ -44,8 +47,8 @@ if (\OCP\Util::isSharingDisabledForUser() === false) { "order" => 15, "name" => $l->t('Shared with others') ) - ); - \OCA\Files\App::getNavigationManager()->add( + ); + \OCA\Files\App::getNavigationManager()->add( array( "id" => 'sharinglinks', "appname" => 'files_sharing', @@ -53,5 +56,6 @@ if (\OCP\Util::isSharingDisabledForUser() === false) { "order" => 20, "name" => $l->t('Shared by link') ) - ); + ); + } } |