Makes sure that any use of double quotes strings are warranted. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
21 lines
357 B
PHP
21 lines
357 B
PHP
<?php
|
|
/**
|
|
* Format SQL for SQL editors
|
|
*
|
|
* @package PhpMyAdmin
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
use PhpMyAdmin\Response;
|
|
|
|
if (! defined('PHPMYADMIN')) {
|
|
exit;
|
|
}
|
|
|
|
$query = ! empty($_POST['sql']) ? $_POST['sql'] : '';
|
|
|
|
$query = PhpMyAdmin\SqlParser\Utils\Formatter::format($query);
|
|
|
|
$response = Response::getInstance();
|
|
$response->addJSON('sql', $query);
|