Fix unit tests
[phpmyadmin.git] / tbl_gis_visualization.php
blobc4a9e8e5f68c0e80aed68977b717e3f06670d360
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * handles creation of the GIS visualizations.
6 * @package PhpMyAdmin
7 */
9 use PhpMyAdmin\Controllers\Table\TableGisVisualizationController;
10 use PhpMyAdmin\Di\Container;
11 use PhpMyAdmin\Response;
12 use PhpMyAdmin\Util;
13 use PhpMyAdmin\Core;
15 require_once 'libraries/common.inc.php';
17 $container = Container::getDefaultContainer();
18 $container->factory(
19 'PhpMyAdmin\Controllers\Table\TableGisVisualizationController'
21 $container->alias(
22 'TableGisVisualizationController',
23 'PhpMyAdmin\Controllers\Table\TableGisVisualizationController'
25 $container->set('PhpMyAdmin\Response', Response::getInstance());
26 $container->alias('response', 'PhpMyAdmin\Response');
28 $sqlQuery = null;
30 if (isset($_GET['sql_query']) && isset($_GET['sql_signature'])) {
31 if (Core::checkSqlQuerySignature($_GET['sql_query'], $_GET['sql_signature'])) {
32 $sqlQuery = $_GET['sql_query'];
34 } elseif (isset($_POST['sql_query'])) {
35 $sqlQuery = &$GLOBALS['sql_query'];
38 /* Define dependencies for the concerned controller */
39 $dependency_definitions = array(
40 "sql_query" => $sqlQuery,
41 "url_params" => &$GLOBALS['url_params'],
42 "goto" => Util::getScriptNameForOption(
43 $GLOBALS['cfg']['DefaultTabDatabase'], 'database'
45 "back" => 'sql.php',
46 "visualizationSettings" => array()
49 /** @var TableGisVisualizationController $controller */
50 $controller = $container->get(
51 'TableGisVisualizationController', $dependency_definitions
53 $controller->indexAction();