Translated using Weblate (Hebrew)
[phpmyadmin.git] / db_sql_format.php
blobdd3c2b86d93fff5d900ab589e368406c9db01c66
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Format SQL for SQL editors
6 * @package PhpMyAdmin
7 */
8 use PhpMyAdmin\Response;
10 /**
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);