mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Template/Update (Part 44)
* convert admin - config * test for presence of Memcached on enable * allow self-signed certs on domain self test
This commit is contained in:
@@ -114,7 +114,7 @@ CLISetup::registerUtility(new class extends UtilityScript
|
||||
CLI::write();
|
||||
}
|
||||
|
||||
if (CLI::read(['idx' => ['', false, false, Cfg::PATTERN_CONF_KEY]], $uiIndex) && $uiIndex && $uiIndex['idx'] !== '')
|
||||
if (CLI::read(['idx' => ['', false, false, Cfg::PATTERN_CONF_KEY_CHAR]], $uiIndex) && $uiIndex && $uiIndex['idx'] !== '')
|
||||
{
|
||||
$idx = array_search(strtolower($uiIndex['idx']), $cfgList);
|
||||
if ($idx === false)
|
||||
@@ -147,7 +147,7 @@ CLISetup::registerUtility(new class extends UtilityScript
|
||||
CLI::write();
|
||||
|
||||
$setting = array(
|
||||
'key' => ['option name', false, false, Cfg::PATTERN_CONF_KEY],
|
||||
'key' => ['option name', false, false, Cfg::PATTERN_CONF_KEY_CHAR],
|
||||
'val' => ['value']
|
||||
);
|
||||
if (CLI::read($setting, $uiSetting) && $uiSetting)
|
||||
@@ -443,7 +443,13 @@ CLISetup::registerUtility(new class extends UtilityScript
|
||||
|
||||
private function testCase(&$protocol, &$host, $testFile, &$status) : bool
|
||||
{
|
||||
$res = get_headers($protocol.$host.$testFile, true);
|
||||
// https://stackoverflow.com/questions/14279095/allow-self-signed-certificates-for-https-wrapper
|
||||
$ctx = stream_context_create(array(
|
||||
'ssl' => ['verify_peer' => false,
|
||||
'allow_self_signed' => true]
|
||||
));
|
||||
|
||||
$res = get_headers($protocol.$host.$testFile, true, $ctx);
|
||||
|
||||
if (!preg_match('/HTTP\/[0-9\.]+\s+([0-9]+)/', $res[0], $m))
|
||||
return false;
|
||||
|
||||
2
setup/updates/1758578400_10.sql
Normal file
2
setup/updates/1758578400_10.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- set on_set_fn check
|
||||
UPDATE `aowow_config` SET `flags` = `flags` | 1024 WHERE `key` = 'cache_mode';
|
||||
Reference in New Issue
Block a user