@@ -36,50 +36,50 @@  | 
                                                    ||
| 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' => 'sharingin',  | 
                                                        |
| 52 | - 'appname' => 'files_sharing',  | 
                                                        |
| 53 | - 'script' => 'list.php',  | 
                                                        |
| 54 | - 'order' => 15,  | 
                                                        |
| 55 | -			'name' => $l->t('Shared with you'), | 
                                                        |
| 56 | - ];  | 
                                                        |
| 57 | - });  | 
                                                        |
| 48 | +    \OCA\Files\App::getNavigationManager()->add(function () { | 
                                                        |
| 49 | +        $l = \OC::$server->getL10N('files_sharing'); | 
                                                        |
| 50 | + return [  | 
                                                        |
| 51 | + 'id' => 'sharingin',  | 
                                                        |
| 52 | + 'appname' => 'files_sharing',  | 
                                                        |
| 53 | + 'script' => 'list.php',  | 
                                                        |
| 54 | + 'order' => 15,  | 
                                                        |
| 55 | +            'name' => $l->t('Shared with you'), | 
                                                        |
| 56 | + ];  | 
                                                        |
| 57 | + });  | 
                                                        |
| 58 | 58 | |
| 59 | -	if (\OCP\Util::isSharingDisabledForUser() === false) { | 
                                                        |
| 60 | -		\OCA\Files\App::getNavigationManager()->add(function () { | 
                                                        |
| 61 | -			$l = \OC::$server->getL10N('files_sharing'); | 
                                                        |
| 62 | - return [  | 
                                                        |
| 63 | - 'id' => 'sharingout',  | 
                                                        |
| 64 | - 'appname' => 'files_sharing',  | 
                                                        |
| 65 | - 'script' => 'list.php',  | 
                                                        |
| 66 | - 'order' => 16,  | 
                                                        |
| 67 | -				'name' => $l->t('Shared with others'), | 
                                                        |
| 68 | - ];  | 
                                                        |
| 69 | - });  | 
                                                        |
| 59 | +    if (\OCP\Util::isSharingDisabledForUser() === false) { | 
                                                        |
| 60 | +        \OCA\Files\App::getNavigationManager()->add(function () { | 
                                                        |
| 61 | +            $l = \OC::$server->getL10N('files_sharing'); | 
                                                        |
| 62 | + return [  | 
                                                        |
| 63 | + 'id' => 'sharingout',  | 
                                                        |
| 64 | + 'appname' => 'files_sharing',  | 
                                                        |
| 65 | + 'script' => 'list.php',  | 
                                                        |
| 66 | + 'order' => 16,  | 
                                                        |
| 67 | +                'name' => $l->t('Shared with others'), | 
                                                        |
| 68 | + ];  | 
                                                        |
| 69 | + });  | 
                                                        |
| 70 | 70 | |
| 71 | - // Check if sharing by link is enabled  | 
                                                        |
| 72 | -		if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { | 
                                                        |
| 73 | -			\OCA\Files\App::getNavigationManager()->add(function () { | 
                                                        |
| 74 | -				$l = \OC::$server->getL10N('files_sharing'); | 
                                                        |
| 75 | - return [  | 
                                                        |
| 76 | - 'id' => 'sharinglinks',  | 
                                                        |
| 77 | - 'appname' => 'files_sharing',  | 
                                                        |
| 78 | - 'script' => 'list.php',  | 
                                                        |
| 79 | - 'order' => 17,  | 
                                                        |
| 80 | -					'name' => $l->t('Shared by link'), | 
                                                        |
| 81 | - ];  | 
                                                        |
| 82 | - });  | 
                                                        |
| 83 | - }  | 
                                                        |
| 84 | - }  | 
                                                        |
| 71 | + // Check if sharing by link is enabled  | 
                                                        |
| 72 | +        if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { | 
                                                        |
| 73 | +            \OCA\Files\App::getNavigationManager()->add(function () { | 
                                                        |
| 74 | +                $l = \OC::$server->getL10N('files_sharing'); | 
                                                        |
| 75 | + return [  | 
                                                        |
| 76 | + 'id' => 'sharinglinks',  | 
                                                        |
| 77 | + 'appname' => 'files_sharing',  | 
                                                        |
| 78 | + 'script' => 'list.php',  | 
                                                        |
| 79 | + 'order' => 17,  | 
                                                        |
| 80 | +                    'name' => $l->t('Shared by link'), | 
                                                        |
| 81 | + ];  | 
                                                        |
| 82 | + });  | 
                                                        |
| 83 | + }  | 
                                                        |
| 84 | + }  | 
                                                        |
| 85 | 85 | }  |