]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check for share by link enabled
authorGadzy <dev@gadzy.fr>
Fri, 12 Dec 2014 09:23:51 +0000 (10:23 +0100)
committerGadzy <dev@gadzy.fr>
Fri, 12 Dec 2014 09:23:51 +0000 (10:23 +0100)
Display "Shared by link" section only if sharing by link is enabled.

apps/files_sharing/appinfo/app.php

index 329afa07519eb9c5b6ca9d576c9a8fe84a707165..36d148dce967a115b8e7b5548cc937fcebb996ee 100644 (file)
@@ -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')
+                               )
+                       );
+               }
        }
 }