app.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  6. * @author j-ed <juergen@eisfair.org>
  7. * @author Joas Schilling <coding@schilljs.com>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Robin McCorkell <robin@mccorkell.me.uk>
  10. * @author Ross Nicoll <jrn@jrn.me.uk>
  11. * @author Thomas Müller <thomas.mueller@tmit.eu>
  12. * @author Vincent Petry <pvince81@owncloud.com>
  13. *
  14. * @license AGPL-3.0
  15. *
  16. * This code is free software: you can redistribute it and/or modify
  17. * it under the terms of the GNU Affero General Public License, version 3,
  18. * as published by the Free Software Foundation.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU Affero General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU Affero General Public License, version 3,
  26. * along with this program. If not, see <http://www.gnu.org/licenses/>
  27. *
  28. */
  29. OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
  30. require_once __DIR__ . '/../3rdparty/autoload.php';
  31. // register Application object singleton
  32. \OC_Mount_Config::$app = new \OCA\Files_External\AppInfo\Application();
  33. $appContainer = \OC_Mount_Config::$app->getContainer();
  34. \OC_Mount_Config::$app->registerSettings();
  35. $l = \OC::$server->getL10N('files_external');
  36. \OCA\Files\App::getNavigationManager()->add([
  37. "id" => 'extstoragemounts',
  38. "appname" => 'files_external',
  39. "script" => 'list.php',
  40. "order" => 30,
  41. "name" => $l->t('External storage')
  42. ]);
  43. $mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter');
  44. \OC::$server->getMountProviderCollection()->registerProvider($mountProvider);