1
0

providers.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. require_once __DIR__ . '/../lib/versioncheck.php';
  8. require_once __DIR__ . '/../lib/base.php';
  9. header('Content-type: application/xml');
  10. $request = \OC::$server->getRequest();
  11. $url = $request->getServerProtocol() . '://' . substr($request->getServerHost() . $request->getRequestUri(), 0, -17).'ocs/v1.php/';
  12. $writer = new XMLWriter();
  13. $writer->openURI('php://output');
  14. $writer->startDocument('1.0', 'UTF-8');
  15. $writer->setIndent(true);
  16. $writer->startElement('providers');
  17. $writer->startElement('provider');
  18. $writer->writeElement('id', 'ownCloud');
  19. $writer->writeElement('location', $url);
  20. $writer->writeElement('name', 'ownCloud');
  21. $writer->writeElement('icon', '');
  22. $writer->writeElement('termsofuse', '');
  23. $writer->writeElement('register', '');
  24. $writer->startElement('services');
  25. $writer->startElement('config');
  26. $writer->writeAttribute('ocsversion', '1.7');
  27. $writer->endElement();
  28. $writer->startElement('activity');
  29. $writer->writeAttribute('ocsversion', '1.7');
  30. $writer->endElement();
  31. $writer->startElement('cloud');
  32. $writer->writeAttribute('ocsversion', '1.7');
  33. $writer->endElement();
  34. $writer->endElement();
  35. $writer->endElement();
  36. $writer->endDocument();
  37. $writer->flush();