@@ -36,61 +36,61 @@ |
||
| 36 | 36 | |
| 37 | 37 | $eventDispatcher = \OC::$server->getEventDispatcher(); |
| 38 | 38 | $eventDispatcher->addListener( |
| 39 | - 'OCA\Files::loadAdditionalScripts', |
|
| 40 | - function() { |
|
| 41 | - \OCP\Util::addStyle('files_sharing', 'mergedAdditionalStyles'); |
|
| 42 | - \OCP\Util::addScript('files_sharing', 'additionalScripts'); |
|
| 43 | - } |
|
| 39 | + 'OCA\Files::loadAdditionalScripts', |
|
| 40 | + function() { |
|
| 41 | + \OCP\Util::addStyle('files_sharing', 'mergedAdditionalStyles'); |
|
| 42 | + \OCP\Util::addScript('files_sharing', 'additionalScripts'); |
|
| 43 | + } |
|
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | $config = \OC::$server->getConfig(); |
| 47 | 47 | if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { |
| 48 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 49 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 50 | - return [ |
|
| 51 | - 'id' => 'sharing', |
|
| 52 | - 'appname' => 'files_sharing', |
|
| 53 | - 'script' => 'list.php', |
|
| 54 | - 'order' => 14, |
|
| 55 | - 'name' => $l->t('Shared'), |
|
| 56 | - ]; |
|
| 57 | - }); |
|
| 48 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 49 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 50 | + return [ |
|
| 51 | + 'id' => 'sharing', |
|
| 52 | + 'appname' => 'files_sharing', |
|
| 53 | + 'script' => 'list.php', |
|
| 54 | + 'order' => 14, |
|
| 55 | + 'name' => $l->t('Shared'), |
|
| 56 | + ]; |
|
| 57 | + }); |
|
| 58 | 58 | |
| 59 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 60 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 61 | - return [ |
|
| 62 | - 'id' => 'sharingin', |
|
| 63 | - 'appname' => 'files_sharing', |
|
| 64 | - 'script' => 'list.php', |
|
| 65 | - 'order' => 15, |
|
| 66 | - 'name' => $l->t('Shared with you'), |
|
| 67 | - ]; |
|
| 68 | - }); |
|
| 59 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 60 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 61 | + return [ |
|
| 62 | + 'id' => 'sharingin', |
|
| 63 | + 'appname' => 'files_sharing', |
|
| 64 | + 'script' => 'list.php', |
|
| 65 | + 'order' => 15, |
|
| 66 | + 'name' => $l->t('Shared with you'), |
|
| 67 | + ]; |
|
| 68 | + }); |
|
| 69 | 69 | |
| 70 | - if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 71 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 72 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 73 | - return [ |
|
| 74 | - 'id' => 'sharingout', |
|
| 75 | - 'appname' => 'files_sharing', |
|
| 76 | - 'script' => 'list.php', |
|
| 77 | - 'order' => 16, |
|
| 78 | - 'name' => $l->t('Shared with others'), |
|
| 79 | - ]; |
|
| 80 | - }); |
|
| 70 | + if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 71 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 72 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 73 | + return [ |
|
| 74 | + 'id' => 'sharingout', |
|
| 75 | + 'appname' => 'files_sharing', |
|
| 76 | + 'script' => 'list.php', |
|
| 77 | + 'order' => 16, |
|
| 78 | + 'name' => $l->t('Shared with others'), |
|
| 79 | + ]; |
|
| 80 | + }); |
|
| 81 | 81 | |
| 82 | - // Check if sharing by link is enabled |
|
| 83 | - if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 84 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 85 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 86 | - return [ |
|
| 87 | - 'id' => 'sharinglinks', |
|
| 88 | - 'appname' => 'files_sharing', |
|
| 89 | - 'script' => 'list.php', |
|
| 90 | - 'order' => 17, |
|
| 91 | - 'name' => $l->t('Shared by link'), |
|
| 92 | - ]; |
|
| 93 | - }); |
|
| 94 | - } |
|
| 95 | - } |
|
| 82 | + // Check if sharing by link is enabled |
|
| 83 | + if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 84 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 85 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 86 | + return [ |
|
| 87 | + 'id' => 'sharinglinks', |
|
| 88 | + 'appname' => 'files_sharing', |
|
| 89 | + 'script' => 'list.php', |
|
| 90 | + 'order' => 17, |
|
| 91 | + 'name' => $l->t('Shared by link'), |
|
| 92 | + ]; |
|
| 93 | + }); |
|
| 94 | + } |
|
| 95 | + } |
|
| 96 | 96 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $config = \OC::$server->getConfig(); |
| 47 | 47 | if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { |
| 48 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 48 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 49 | 49 | $l = \OC::$server->getL10N('files_sharing'); |
| 50 | 50 | return [ |
| 51 | 51 | 'id' => 'sharing', |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ]; |
| 57 | 57 | }); |
| 58 | 58 | |
| 59 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 59 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 60 | 60 | $l = \OC::$server->getL10N('files_sharing'); |
| 61 | 61 | return [ |
| 62 | 62 | 'id' => 'sharingin', |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | }); |
| 69 | 69 | |
| 70 | 70 | if (\OCP\Util::isSharingDisabledForUser() === false) { |
| 71 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 71 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 72 | 72 | $l = \OC::$server->getL10N('files_sharing'); |
| 73 | 73 | return [ |
| 74 | 74 | 'id' => 'sharingout', |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | // Check if sharing by link is enabled |
| 83 | 83 | if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
| 84 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 84 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 85 | 85 | $l = \OC::$server->getL10N('files_sharing'); |
| 86 | 86 | return [ |
| 87 | 87 | 'id' => 'sharinglinks', |