Files
da-postgresql/exec/handlers/create_database.php
T
2026-07-04 16:00:04 +02:00

20 lines
536 B
PHP

<?php
declare(strict_types=1);
return static function (AppContext $ctx): void {
if ($ctx->isPost()) {
if ($ctx->postString('form_action') === '') {
$_POST['form_action'] = 'create_database';
}
if ($ctx->postString('db_suffix') === '' && $ctx->postString('db_name') !== '') {
$_POST['db_suffix'] = $ctx->postString('db_name');
}
$handler = require __DIR__ . '/index.php';
$handler($ctx);
return;
}
Http::redirect($ctx->url('index.html'));
};