Translated using Weblate (Albanian)
[phpmyadmin.git] / tbl_gis_visualization.php
blobca3a3506b76803ba342983a730741a41e0ee0a70
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 $parameterBag = $containerBuilder->getParameterBag();
46 array_map(
47 static function (string $parameterName, $value) use ($definition, $parameterBag) {
48 $definition->replaceArgument($parameterName, $parameterBag->escapeValue($value));
50 array_keys($dependency_definitions),
51 $dependency_definitions
54 /** @var GisVisualizationController $controller */
55 $controller = $containerBuilder->get(GisVisualizationController::class);
56 $controller->indexAction();