app.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. $l = \OC::$server->getL10N('files_sharing');
  3. OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php';
  4. OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
  5. OC::$CLASSPATH['OC\Files\Storage\Shared'] = 'files_sharing/lib/sharedstorage.php';
  6. OC::$CLASSPATH['OC\Files\Cache\Shared_Cache'] = 'files_sharing/lib/cache.php';
  7. OC::$CLASSPATH['OC\Files\Cache\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
  8. OC::$CLASSPATH['OC\Files\Cache\Shared_Updater'] = 'files_sharing/lib/updater.php';
  9. OC::$CLASSPATH['OC\Files\Cache\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
  10. OC::$CLASSPATH['OCA\Files\Share\Api'] = 'files_sharing/lib/api.php';
  11. OC::$CLASSPATH['OCA\Files\Share\Maintainer'] = 'files_sharing/lib/maintainer.php';
  12. OC::$CLASSPATH['OCA\Files\Share\Proxy'] = 'files_sharing/lib/proxy.php';
  13. // Exceptions
  14. OC::$CLASSPATH['OCA\Files_Sharing\Exceptions\BrokenPath'] = 'files_sharing/lib/exceptions.php';
  15. \OCP\App::registerAdmin('files_sharing', 'settings-admin');
  16. \OCA\Files_Sharing\Helper::registerHooks();
  17. OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
  18. OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
  19. OCP\Util::addTranslations('files_sharing');
  20. OCP\Util::addScript('files_sharing', 'share');
  21. OCP\Util::addScript('files_sharing', 'external');
  22. OC_FileProxy::register(new OCA\Files\Share\Proxy());
  23. $config = \OC::$server->getConfig();
  24. if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
  25. \OCA\Files\App::getNavigationManager()->add(
  26. array(
  27. "id" => 'sharingin',
  28. "appname" => 'files_sharing',
  29. "script" => 'list.php',
  30. "order" => 10,
  31. "name" => $l->t('Shared with you')
  32. )
  33. );
  34. if (\OCP\Util::isSharingDisabledForUser() === false) {
  35. \OCA\Files\App::getNavigationManager()->add(
  36. array(
  37. "id" => 'sharingout',
  38. "appname" => 'files_sharing',
  39. "script" => 'list.php',
  40. "order" => 15,
  41. "name" => $l->t('Shared with others')
  42. )
  43. );
  44. \OCA\Files\App::getNavigationManager()->add(
  45. array(
  46. "id" => 'sharinglinks',
  47. "appname" => 'files_sharing',
  48. "script" => 'list.php',
  49. "order" => 20,
  50. "name" => $l->t('Shared by link')
  51. )
  52. );
  53. }
  54. }