diff options
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r-- | apps/files_sharing/appinfo/app.php | 32 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/update.php | 3 |
2 files changed, 21 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') ) - ); + ); + } } diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index 72acdbac736..e393b1575af 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -113,5 +113,8 @@ function removeSharedFolder($mkdirs = true, $chunkSize = 99) { $query->execute(array()); } + // set config to keep the Shared folder as the default location for new shares + \OCA\Files_Sharing\Helper::setShareFolder('/Shared'); + } } |