gl-website-deployer/admin/phpMyAdmin/libraries/classes/Controllers/Setup/ConfigController.php
2024-11-19 08:02:04 +01:00

41 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Setup;
use PhpMyAdmin\Setup\ConfigGenerator;
use function is_string;
class ConfigController extends AbstractController
{
/**
* @param array $params Request parameters
*
* @return string HTML
*/
public function __invoke(array $params): string
{
$formset = isset($params['formset']) && is_string($params['formset']) ? $params['formset'] : '';
$eol = isset($params['eol']) && $params['eol'] === 'win' ? 'win' : 'unix';
$pages = $this->getPages();
static $hasCheckPageRefresh = false;
if (! $hasCheckPageRefresh) {
$hasCheckPageRefresh = true;
}
$config = ConfigGenerator::getConfigFile($this->config);
return $this->template->render('setup/config/index', [
'formset' => $formset,
'pages' => $pages,
'eol' => $eol,
'config' => $config,
'has_check_page_refresh' => $hasCheckPageRefresh,
]);
}
}