2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * handles creation of the GIS visualizations.
8 declare(strict_types
=1);
10 use PhpMyAdmin\Controllers\Table\GisVisualizationController
;
13 use Symfony\Component\DependencyInjection\Definition
;
15 if (! defined('ROOT_PATH')) {
16 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
19 require_once ROOT_PATH
. 'libraries/common.inc.php';
23 if (isset($_GET['sql_query']) && isset($_GET['sql_signature'])) {
24 if (Core
::checkSqlQuerySignature($_GET['sql_query'], $_GET['sql_signature'])) {
25 $sqlQuery = $_GET['sql_query'];
27 } elseif (isset($_POST['sql_query'])) {
28 $sqlQuery = $_POST['sql_query'];
31 /* Define dependencies for the concerned controller */
32 $dependency_definitions = [
33 'sql_query' => $sqlQuery,
34 'url_params' => &$GLOBALS['url_params'],
35 'goto' => Util
::getScriptNameForOption(
36 $GLOBALS['cfg']['DefaultTabDatabase'],
40 'visualizationSettings' => [],
43 /** @var Definition $definition */
44 $definition = $containerBuilder->getDefinition(GisVisualizationController
::class);
46 static function (string $parameterName, $value) use ($definition) {
47 $definition->replaceArgument($parameterName, $value);
49 array_keys($dependency_definitions),
50 $dependency_definitions
53 /** @var GisVisualizationController $controller */
54 $controller = $containerBuilder->get(GisVisualizationController
::class);
55 $controller->indexAction();