This commit is contained in:
2022-11-29 14:17:11 +01:00
parent c9a7da688f
commit 25ef07b0b7
32 changed files with 1275 additions and 507 deletions

26
Core/API/Info.class.php Normal file
View File

@@ -0,0 +1,26 @@
<?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(),
"recaptchaEnabled" => $settings->isRecaptchaEnabled(),
"version" => WEBBASE_VERSION,
"siteName" => $settings->getSiteName(),
];
return true;
}
}