123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- require_once __DIR__ . '/lib/versioncheck.php';
- try {
- require_once __DIR__ . '/lib/base.php';
- $systemConfig = \OC::$server->getSystemConfig();
- $installed = (bool) $systemConfig->getValue('installed', false);
- $maintenance = (bool) $systemConfig->getValue('maintenance', false);
-
-
- $defaults = new \OCP\Defaults();
- $values = [
- 'installed' => $installed,
- 'maintenance' => $maintenance,
- 'needsDbUpgrade' => \OCP\Util::needUpgrade(),
- 'version' => implode('.', \OCP\Util::getVersion()),
- 'versionstring' => OC_Util::getVersionString(),
- 'edition' => '',
- 'productname' => $defaults->getProductName(),
- 'extendedSupport' => \OCP\Util::hasExtendedSupport()
- ];
- if (OC::$CLI) {
- print_r($values);
- } else {
- header('Access-Control-Allow-Origin: *');
- header('Content-Type: application/json');
- echo json_encode($values);
- }
- } catch (Exception $ex) {
- http_response_code(500);
- \OC::$server->getLogger()->logException($ex, ['app' => 'remote']);
- }
|