web-base/Core/API/Info.class.php

30 lines
728 B
PHP
Raw Permalink Normal View History

2022-11-29 14:17:11 +01:00
<?php
namespace Core\API;
use Core\Objects\Context;
class Info extends Request {
public function __construct(Context $context, bool $externalCall = false) {
parent::__construct($context, $externalCall, []);
$this->csrfTokenRequired = false;
}
protected function _execute(): bool {
$settings = $this->context->getSettings();
$this->result["info"] = [
"registrationAllowed" => $settings->isRegistrationAllowed(),
2024-04-23 14:05:29 +02:00
"captchaEnabled" => $settings->isCaptchaEnabled(),
2022-11-29 14:17:11 +01:00
"version" => WEBBASE_VERSION,
"siteName" => $settings->getSiteName(),
];
return true;
}
2024-04-23 12:14:28 +02:00
public static function getDescription(): string {
return "Returns general information about the Site";
}
2022-11-29 14:17:11 +01:00
}