Translated using Weblate (Slovenian)
[phpmyadmin.git] / tbl_gis_visualization.php
blobbb96bbb915feed130c62f0b3ac9f60be89e803db
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * handles creation of the GIS visualizations.
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Controllers\Table\GisVisualizationController;
11 use PhpMyAdmin\Util;
12 use PhpMyAdmin\Core;
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';
21 $sqlQuery = null;
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'],
37 'database'
39 'back' => 'sql.php',
40 'visualizationSettings' => [],
43 /** @var Definition $definition */
44 $definition = $containerBuilder->getDefinition(GisVisualizationController::class);
45 array_map(
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();