2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Format SQL for SQL editors
8 use PhpMyAdmin\Response
;
11 * Loading common files. Used to check for authorization, localization and to
12 * load the parsing library.
14 require_once 'libraries/common.inc.php';
16 $query = !empty($_POST['sql']) ?
$_POST['sql'] : '';
18 $query = PhpMyAdmin\SqlParser\Utils\Formatter
::format($query);
20 $response = Response
::getInstance();
21 $response->addJSON("sql", $query);