phpmyadmin/libraries/classes/Controllers/Server/ImportController.php
Maurício Meneghini Fauth a1bcb9f0f3 Refactor server pages common code
Extracts server_common.inc.php code to the Common::server() method and
removes the include file.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-07 22:49:24 -03:00

42 lines
849 B
PHP

<?php
/**
* @package PhpMyAdmin\Controllers\Server
*/
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Server;
use PhpMyAdmin\Common;
use PhpMyAdmin\Config\PageSettings;
use PhpMyAdmin\Controllers\AbstractController;
use PhpMyAdmin\Display\Import;
/**
* @package PhpMyAdmin\Controllers\Server
*/
final class ImportController extends AbstractController
{
/**
* @return void
*/
public function index(): void
{
global $db, $max_upload_size, $table;
PageSettings::showGroup('Import');
$header = $this->response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('import.js');
Common::server();
$this->response->addHTML(Import::get(
'server',
$db,
$table,
$max_upload_size
));
}
}