1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-23 18:29:15 +03:00
Files
phpmyadmin/src/Controllers/Export/CheckTimeOutController.php
Maurício Meneghini Fauth 137283f909 Remove unused constructor params from controllers
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-04-08 15:59:34 -03:00

36 lines
811 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Export;
use PhpMyAdmin\Controllers\InvocableController;
use PhpMyAdmin\Http\Response;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\ResponseRenderer;
final class CheckTimeOutController implements InvocableController
{
public function __construct(private readonly ResponseRenderer $response)
{
}
public function __invoke(ServerRequest $request): Response|null
{
if (! $request->isAjax()) {
return null;
}
if (isset($_SESSION['pma_export_error'])) {
unset($_SESSION['pma_export_error']);
$this->response->addJSON('message', 'timeout');
return null;
}
$this->response->addJSON('message', 'success');
return null;
}
}