@@ -38,14 +38,14 @@ |
||
| 38 | 38 | \OC_Mount_Config::$app->registerSettings(); |
| 39 | 39 | |
| 40 | 40 | \OCA\Files\App::getNavigationManager()->add(function () { |
| 41 | - $l = \OC::$server->getL10N('files_external'); |
|
| 42 | - return [ |
|
| 43 | - 'id' => 'extstoragemounts', |
|
| 44 | - 'appname' => 'files_external', |
|
| 45 | - 'script' => 'list.php', |
|
| 46 | - 'order' => 30, |
|
| 47 | - 'name' => $l->t('External storage'), |
|
| 48 | - ]; |
|
| 41 | + $l = \OC::$server->getL10N('files_external'); |
|
| 42 | + return [ |
|
| 43 | + 'id' => 'extstoragemounts', |
|
| 44 | + 'appname' => 'files_external', |
|
| 45 | + 'script' => 'list.php', |
|
| 46 | + 'order' => 30, |
|
| 47 | + 'name' => $l->t('External storage'), |
|
| 48 | + ]; |
|
| 49 | 49 | }); |
| 50 | 50 | |
| 51 | 51 | $mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter'); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php'; |
| 31 | 31 | |
| 32 | -require_once __DIR__ . '/../3rdparty/autoload.php'; |
|
| 32 | +require_once __DIR__.'/../3rdparty/autoload.php'; |
|
| 33 | 33 | |
| 34 | 34 | // register Application object singleton |
| 35 | 35 | \OC_Mount_Config::$app = new \OCA\Files_External\AppInfo\Application(); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | \OC_Mount_Config::$app->registerSettings(); |
| 39 | 39 | |
| 40 | -\OCA\Files\App::getNavigationManager()->add(function () { |
|
| 40 | +\OCA\Files\App::getNavigationManager()->add(function() { |
|
| 41 | 41 | $l = \OC::$server->getL10N('files_external'); |
| 42 | 42 | return [ |
| 43 | 43 | 'id' => 'extstoragemounts', |
@@ -26,29 +26,29 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $eventDispatcher = \OC::$server->getEventDispatcher(); |
| 28 | 28 | $eventDispatcher->addListener( |
| 29 | - 'OCA\Files::loadAdditionalScripts', |
|
| 30 | - function() { |
|
| 31 | - // FIXME: no public API for these ? |
|
| 32 | - \OCP\Util::addScript('oc-backbone-webdav'); |
|
| 33 | - \OCP\Util::addScript('systemtags/systemtags'); |
|
| 34 | - \OCP\Util::addScript('systemtags/systemtagmodel'); |
|
| 35 | - \OCP\Util::addScript('systemtags/systemtagsmappingcollection'); |
|
| 36 | - \OCP\Util::addScript('systemtags/systemtagscollection'); |
|
| 37 | - \OCP\Util::addScript('systemtags/systemtagsinputfield'); |
|
| 38 | - \OCP\Util::addScript('systemtags', 'app'); |
|
| 39 | - \OCP\Util::addScript('systemtags', 'systemtagsfilelist'); |
|
| 40 | - \OCP\Util::addScript('systemtags', 'filesplugin'); |
|
| 41 | - \OCP\Util::addScript('systemtags', 'systemtagsinfoview'); |
|
| 42 | - \OCP\Util::addStyle('systemtags'); |
|
| 43 | - \OCP\Util::addStyle('systemtags', 'systemtagsfilelist'); |
|
| 44 | - } |
|
| 29 | + 'OCA\Files::loadAdditionalScripts', |
|
| 30 | + function() { |
|
| 31 | + // FIXME: no public API for these ? |
|
| 32 | + \OCP\Util::addScript('oc-backbone-webdav'); |
|
| 33 | + \OCP\Util::addScript('systemtags/systemtags'); |
|
| 34 | + \OCP\Util::addScript('systemtags/systemtagmodel'); |
|
| 35 | + \OCP\Util::addScript('systemtags/systemtagsmappingcollection'); |
|
| 36 | + \OCP\Util::addScript('systemtags/systemtagscollection'); |
|
| 37 | + \OCP\Util::addScript('systemtags/systemtagsinputfield'); |
|
| 38 | + \OCP\Util::addScript('systemtags', 'app'); |
|
| 39 | + \OCP\Util::addScript('systemtags', 'systemtagsfilelist'); |
|
| 40 | + \OCP\Util::addScript('systemtags', 'filesplugin'); |
|
| 41 | + \OCP\Util::addScript('systemtags', 'systemtagsinfoview'); |
|
| 42 | + \OCP\Util::addStyle('systemtags'); |
|
| 43 | + \OCP\Util::addStyle('systemtags', 'systemtagsfilelist'); |
|
| 44 | + } |
|
| 45 | 45 | ); |
| 46 | 46 | |
| 47 | 47 | $managerListener = function(ManagerEvent $event) { |
| 48 | - $application = new \OCP\AppFramework\App('systemtags'); |
|
| 49 | - /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
| 50 | - $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); |
|
| 51 | - $listener->event($event); |
|
| 48 | + $application = new \OCP\AppFramework\App('systemtags'); |
|
| 49 | + /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
| 50 | + $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); |
|
| 51 | + $listener->event($event); |
|
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | 54 | $eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener); |
@@ -56,23 +56,23 @@ discard block |
||
| 56 | 56 | $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); |
| 57 | 57 | |
| 58 | 58 | $mapperListener = function(MapperEvent $event) { |
| 59 | - $application = new \OCP\AppFramework\App('systemtags'); |
|
| 60 | - /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
| 61 | - $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); |
|
| 62 | - $listener->mapperEvent($event); |
|
| 59 | + $application = new \OCP\AppFramework\App('systemtags'); |
|
| 60 | + /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
| 61 | + $listener = $application->getContainer()->query('OCA\SystemTags\Activity\Listener'); |
|
| 62 | + $listener->mapperEvent($event); |
|
| 63 | 63 | }; |
| 64 | 64 | |
| 65 | 65 | $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
| 66 | 66 | $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
| 67 | 67 | |
| 68 | 68 | \OCA\Files\App::getNavigationManager()->add(function () { |
| 69 | - $l = \OC::$server->getL10N('systemtags'); |
|
| 70 | - return [ |
|
| 71 | - 'id' => 'systemtagsfilter', |
|
| 72 | - 'appname' => 'systemtags', |
|
| 73 | - 'script' => 'list.php', |
|
| 74 | - 'order' => 25, |
|
| 75 | - 'name' => $l->t('Tags'), |
|
| 76 | - ]; |
|
| 69 | + $l = \OC::$server->getL10N('systemtags'); |
|
| 70 | + return [ |
|
| 71 | + 'id' => 'systemtagsfilter', |
|
| 72 | + 'appname' => 'systemtags', |
|
| 73 | + 'script' => 'list.php', |
|
| 74 | + 'order' => 25, |
|
| 75 | + 'name' => $l->t('Tags'), |
|
| 76 | + ]; |
|
| 77 | 77 | }); |
| 78 | 78 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
| 66 | 66 | $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
| 67 | 67 | |
| 68 | -\OCA\Files\App::getNavigationManager()->add(function () { |
|
| 68 | +\OCA\Files\App::getNavigationManager()->add(function() { |
|
| 69 | 69 | $l = \OC::$server->getL10N('systemtags'); |
| 70 | 70 | return [ |
| 71 | 71 | 'id' => 'systemtagsfilter', |
@@ -30,22 +30,22 @@ |
||
| 30 | 30 | |
| 31 | 31 | $manager = \OC::$server->getNotificationManager(); |
| 32 | 32 | $manager->registerNotifier(function() { |
| 33 | - return \OC::$server->query(Notifier::class); |
|
| 33 | + return \OC::$server->query(Notifier::class); |
|
| 34 | 34 | }, function() { |
| 35 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 36 | - return [ |
|
| 37 | - 'id' => 'files_sharing', |
|
| 38 | - 'name' => $l->t('Federated sharing'), |
|
| 39 | - ]; |
|
| 35 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 36 | + return [ |
|
| 37 | + 'id' => 'files_sharing', |
|
| 38 | + 'name' => $l->t('Federated sharing'), |
|
| 39 | + ]; |
|
| 40 | 40 | }); |
| 41 | 41 | |
| 42 | 42 | $federatedShareProvider = $app->getFederatedShareProvider(); |
| 43 | 43 | |
| 44 | 44 | $eventDispatcher->addListener( |
| 45 | - 'OCA\Files::loadAdditionalScripts', |
|
| 46 | - function() use ($federatedShareProvider) { |
|
| 47 | - if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) { |
|
| 48 | - \OCP\Util::addScript('federatedfilesharing', 'external'); |
|
| 49 | - } |
|
| 50 | - } |
|
| 45 | + 'OCA\Files::loadAdditionalScripts', |
|
| 46 | + function() use ($federatedShareProvider) { |
|
| 47 | + if ($federatedShareProvider->isIncomingServer2serverShareEnabled()) { |
|
| 48 | + \OCP\Util::addScript('federatedfilesharing', 'external'); |
|
| 49 | + } |
|
| 50 | + } |
|
| 51 | 51 | ); |
@@ -36,55 +36,55 @@ |
||
| 36 | 36 | |
| 37 | 37 | $eventDispatcher = \OC::$server->getEventDispatcher(); |
| 38 | 38 | $eventDispatcher->addListener( |
| 39 | - 'OCA\Files::loadAdditionalScripts', |
|
| 40 | - function() { |
|
| 41 | - \OCP\Util::addScript('files_sharing', 'share'); |
|
| 42 | - \OCP\Util::addScript('files_sharing', 'sharetabview'); |
|
| 43 | - \OCP\Util::addScript('files_sharing', 'sharebreadcrumbview'); |
|
| 44 | - \OCP\Util::addStyle('files_sharing', 'sharetabview'); |
|
| 45 | - \OCP\Util::addStyle('files_sharing', 'sharebreadcrumb'); |
|
| 46 | - } |
|
| 39 | + 'OCA\Files::loadAdditionalScripts', |
|
| 40 | + function() { |
|
| 41 | + \OCP\Util::addScript('files_sharing', 'share'); |
|
| 42 | + \OCP\Util::addScript('files_sharing', 'sharetabview'); |
|
| 43 | + \OCP\Util::addScript('files_sharing', 'sharebreadcrumbview'); |
|
| 44 | + \OCP\Util::addStyle('files_sharing', 'sharetabview'); |
|
| 45 | + \OCP\Util::addStyle('files_sharing', 'sharebreadcrumb'); |
|
| 46 | + } |
|
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | 49 | // \OCP\Util::addStyle('files_sharing', 'sharetabview'); |
| 50 | 50 | |
| 51 | 51 | $config = \OC::$server->getConfig(); |
| 52 | 52 | if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { |
| 53 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 54 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 55 | - return [ |
|
| 56 | - 'id' => 'sharingin', |
|
| 57 | - 'appname' => 'files_sharing', |
|
| 58 | - 'script' => 'list.php', |
|
| 59 | - 'order' => 10, |
|
| 60 | - 'name' => $l->t('Shared with you'), |
|
| 61 | - ]; |
|
| 62 | - }); |
|
| 53 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 54 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 55 | + return [ |
|
| 56 | + 'id' => 'sharingin', |
|
| 57 | + 'appname' => 'files_sharing', |
|
| 58 | + 'script' => 'list.php', |
|
| 59 | + 'order' => 10, |
|
| 60 | + 'name' => $l->t('Shared with you'), |
|
| 61 | + ]; |
|
| 62 | + }); |
|
| 63 | 63 | |
| 64 | - if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 65 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 66 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 67 | - return [ |
|
| 68 | - 'id' => 'sharingout', |
|
| 69 | - 'appname' => 'files_sharing', |
|
| 70 | - 'script' => 'list.php', |
|
| 71 | - 'order' => 15, |
|
| 72 | - 'name' => $l->t('Shared with others'), |
|
| 73 | - ]; |
|
| 74 | - }); |
|
| 64 | + if (\OCP\Util::isSharingDisabledForUser() === false) { |
|
| 65 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 66 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 67 | + return [ |
|
| 68 | + 'id' => 'sharingout', |
|
| 69 | + 'appname' => 'files_sharing', |
|
| 70 | + 'script' => 'list.php', |
|
| 71 | + 'order' => 15, |
|
| 72 | + 'name' => $l->t('Shared with others'), |
|
| 73 | + ]; |
|
| 74 | + }); |
|
| 75 | 75 | |
| 76 | - // Check if sharing by link is enabled |
|
| 77 | - if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 78 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 79 | - $l = \OC::$server->getL10N('files_sharing'); |
|
| 80 | - return [ |
|
| 81 | - 'id' => 'sharinglinks', |
|
| 82 | - 'appname' => 'files_sharing', |
|
| 83 | - 'script' => 'list.php', |
|
| 84 | - 'order' => 20, |
|
| 85 | - 'name' => $l->t('Shared by link'), |
|
| 86 | - ]; |
|
| 87 | - }); |
|
| 88 | - } |
|
| 89 | - } |
|
| 76 | + // Check if sharing by link is enabled |
|
| 77 | + if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
|
| 78 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 79 | + $l = \OC::$server->getL10N('files_sharing'); |
|
| 80 | + return [ |
|
| 81 | + 'id' => 'sharinglinks', |
|
| 82 | + 'appname' => 'files_sharing', |
|
| 83 | + 'script' => 'list.php', |
|
| 84 | + 'order' => 20, |
|
| 85 | + 'name' => $l->t('Shared by link'), |
|
| 86 | + ]; |
|
| 87 | + }); |
|
| 88 | + } |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $config = \OC::$server->getConfig(); |
| 52 | 52 | if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') { |
| 53 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 53 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 54 | 54 | $l = \OC::$server->getL10N('files_sharing'); |
| 55 | 55 | return [ |
| 56 | 56 | 'id' => 'sharingin', |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | }); |
| 63 | 63 | |
| 64 | 64 | if (\OCP\Util::isSharingDisabledForUser() === false) { |
| 65 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 65 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 66 | 66 | $l = \OC::$server->getL10N('files_sharing'); |
| 67 | 67 | return [ |
| 68 | 68 | 'id' => 'sharingout', |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | // Check if sharing by link is enabled |
| 77 | 77 | if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { |
| 78 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
| 78 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
| 79 | 79 | $l = \OC::$server->getL10N('files_sharing'); |
| 80 | 80 | return [ |
| 81 | 81 | 'id' => 'sharinglinks', |
@@ -29,12 +29,12 @@ |
||
| 29 | 29 | \OCA\Files_Trashbin\Trashbin::registerHooks(); |
| 30 | 30 | |
| 31 | 31 | \OCA\Files\App::getNavigationManager()->add(function () { |
| 32 | - $l = \OC::$server->getL10N('files_trashbin'); |
|
| 33 | - return [ |
|
| 34 | - 'id' => 'trashbin', |
|
| 35 | - 'appname' => 'files_trashbin', |
|
| 36 | - 'script' => 'list.php', |
|
| 37 | - 'order' => 50, |
|
| 38 | - 'name' => $l->t('Deleted files'), |
|
| 39 | - ]; |
|
| 32 | + $l = \OC::$server->getL10N('files_trashbin'); |
|
| 33 | + return [ |
|
| 34 | + 'id' => 'trashbin', |
|
| 35 | + 'appname' => 'files_trashbin', |
|
| 36 | + 'script' => 'list.php', |
|
| 37 | + 'order' => 50, |
|
| 38 | + 'name' => $l->t('Deleted files'), |
|
| 39 | + ]; |
|
| 40 | 40 | }); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | // register hooks |
| 29 | 29 | \OCA\Files_Trashbin\Trashbin::registerHooks(); |
| 30 | 30 | |
| 31 | -\OCA\Files\App::getNavigationManager()->add(function () { |
|
| 31 | +\OCA\Files\App::getNavigationManager()->add(function() { |
|
| 32 | 32 | $l = \OC::$server->getL10N('files_trashbin'); |
| 33 | 33 | return [ |
| 34 | 34 | 'id' => 'trashbin', |