[Pkg-owncloud-commits] [owncloud] 94/121: Hide sharing sections in files app when sharing API is disabled
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 16:44:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit efca0ab4d4a4eeae08ac0612dd4329e489074ef9
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Mon Aug 18 16:33:29 2014 +0200
Hide sharing sections in files app when sharing API is disabled
Backport of 1de5ae8845393be599e543efde45d22db989658a from master
---
apps/files_sharing/appinfo/app.php | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 60bec2b..b22c553 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')
)
- );
+ );
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list