app.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * @author Christian Berendt <berendt@b1-systems.de>
  4. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  5. * @author j-ed <juergen@eisfair.org>
  6. * @author Michael Gapczynski <GapczynskiM@gmail.com>
  7. * @author Robin Appelman <icewind@owncloud.com>
  8. * @author Robin McCorkell <robin@mccorkell.me.uk>
  9. * @author Ross Nicoll <jrn@jrn.me.uk>
  10. * @author Thomas Müller <thomas.mueller@tmit.eu>
  11. * @author Vincent Petry <pvince81@owncloud.com>
  12. *
  13. * @copyright Copyright (c) 2016, ownCloud, Inc.
  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\Files\Storage\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
  30. OC::$CLASSPATH['OC\Files\Storage\FTP'] = 'files_external/lib/ftp.php';
  31. OC::$CLASSPATH['OC\Files\Storage\OwnCloud'] = 'files_external/lib/owncloud.php';
  32. OC::$CLASSPATH['OC\Files\Storage\Google'] = 'files_external/lib/google.php';
  33. OC::$CLASSPATH['OC\Files\Storage\Swift'] = 'files_external/lib/swift.php';
  34. OC::$CLASSPATH['OC\Files\Storage\SMB'] = 'files_external/lib/smb.php';
  35. OC::$CLASSPATH['OC\Files\Storage\AmazonS3'] = 'files_external/lib/amazons3.php';
  36. OC::$CLASSPATH['OC\Files\Storage\Dropbox'] = 'files_external/lib/dropbox.php';
  37. OC::$CLASSPATH['OC\Files\Storage\SFTP'] = 'files_external/lib/sftp.php';
  38. OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
  39. OC::$CLASSPATH['OCA\Files\External\Api'] = 'files_external/lib/api.php';
  40. require_once __DIR__ . '/../3rdparty/autoload.php';
  41. // register Application object singleton
  42. \OC_Mount_Config::$app = new \OCA\Files_external\Appinfo\Application();
  43. $appContainer = \OC_Mount_Config::$app->getContainer();
  44. \OC_Mount_Config::$app->registerSettings();
  45. $l = \OC::$server->getL10N('files_external');
  46. \OCA\Files\App::getNavigationManager()->add([
  47. "id" => 'extstoragemounts',
  48. "appname" => 'files_external',
  49. "script" => 'list.php',
  50. "order" => 30,
  51. "name" => $l->t('External storage')
  52. ]);
  53. $mountProvider = $appContainer->query('OCA\Files_External\Config\ConfigAdapter');
  54. \OC::$server->getMountProviderCollection()->registerProvider($mountProvider);