mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
* convert admin - config * test for presence of Memcached on enable * allow self-signed certs on domain self test
31 lines
743 B
PHP
31 lines
743 B
PHP
<?php
|
|
|
|
namespace Aowow;
|
|
|
|
if (!defined('AOWOW_REVISION'))
|
|
die('illegal access');
|
|
|
|
|
|
class AdminSiteconfigActionRemoveResponse extends TextResponse
|
|
{
|
|
protected int $requiredUserGroup = U_GROUP_DEV | U_GROUP_ADMIN;
|
|
|
|
protected array $expectedGET = array(
|
|
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => Cfg::PATTERN_CONF_KEY_FULL]]
|
|
);
|
|
|
|
protected function generate() : void
|
|
{
|
|
if (!$this->assertGET('key'))
|
|
{
|
|
trigger_error('AdminSiteconfigActionRemoveResponse - malformed request received', E_USER_ERROR);
|
|
$this->result = Lang::main('intError');
|
|
return;
|
|
}
|
|
|
|
$this->result = Cfg::delete($this->_get['key']);
|
|
}
|
|
}
|
|
|
|
?>
|