Translated using Weblate (Slovenian)
[phpmyadmin.git] / db_sql_format.php
blobc89ace5f81cfa668ddfd81704eebede8dcb752f2
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Format SQL for SQL editors
6 * @package PhpMyAdmin
7 */
9 /**
10 * Loading common files. Used to check for authorization, localization and to
11 * load the parsing library.
13 require_once 'libraries/common.inc.php';
15 $query = !empty($_POST['sql']) ? $_POST['sql'] : '';
17 $query = SqlParser\Utils\Formatter::format($query);
19 $response = PMA\libraries\Response::getInstance();
20 $response->addJSON("sql", $query);