diff --git a/index.php b/index.php index 2372054557..ef0254e8fe 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ if (isset($_GET['route']) || isset($_POST['route'])) { require_once ROOT_PATH . 'libraries/entry_points/database/search.php'; }); $routes->addRoute(['GET', 'POST'], '/sql', function () { - require_once ROOT_PATH . 'db_sql.php'; + require_once ROOT_PATH . 'libraries/entry_points/database/sql.php'; }); $routes->addRoute(['GET', 'POST'], '/structure', function () { require_once ROOT_PATH . 'libraries/entry_points/database/structure.php'; @@ -59,7 +59,7 @@ if (isset($_GET['route']) || isset($_POST['route'])) { require_once ROOT_PATH . 'libraries/entry_points/server/privileges.php'; }); $routes->addRoute(['GET', 'POST'], '/sql', function () { - require_once ROOT_PATH . 'server_sql.php'; + require_once ROOT_PATH . 'libraries/entry_points/server/sql.php'; }); $routes->addGroup('/status', function (RouteCollector $routes) { $routes->addRoute('GET', '', function () { @@ -74,7 +74,7 @@ if (isset($_GET['route']) || isset($_POST['route'])) { }); }); $routes->addRoute(['GET', 'POST'], '/sql', function () { - require_once ROOT_PATH . 'sql.php'; + require_once ROOT_PATH . 'libraries/entry_points/sql.php'; }); $routes->addGroup('/table', function (RouteCollector $routes) { $routes->addRoute(['GET', 'POST'], '/change', function () { @@ -84,7 +84,7 @@ if (isset($_GET['route']) || isset($_POST['route'])) { require_once ROOT_PATH . 'libraries/entry_points/table/select.php'; }); $routes->addRoute(['GET', 'POST'], '/sql', function () { - require_once ROOT_PATH . 'tbl_sql.php'; + require_once ROOT_PATH . 'libraries/entry_points/table/sql.php'; }); $routes->addRoute(['GET', 'POST'], '/structure', function () { require_once ROOT_PATH . 'libraries/entry_points/table/structure.php'; diff --git a/libraries/classes/Controllers/Table/StructureController.php b/libraries/classes/Controllers/Table/StructureController.php index 41ab356786..93464f9312 100644 --- a/libraries/classes/Controllers/Table/StructureController.php +++ b/libraries/classes/Controllers/Table/StructureController.php @@ -330,7 +330,7 @@ class StructureController extends AbstractController $sql_query = $GLOBALS['sql_query']; $cfg = $GLOBALS['cfg']; $pmaThemeImage = $GLOBALS['pmaThemeImage']; - include ROOT_PATH . 'sql.php'; + include ROOT_PATH . 'libraries/entry_points/sql.php'; $GLOBALS['reload'] = true; } diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php index f76a3b9ed8..c6d06c67ea 100644 --- a/libraries/classes/InsertEdit.php +++ b/libraries/classes/InsertEdit.php @@ -2258,15 +2258,15 @@ class InsertEdit } else { $goto_include = $GLOBALS['goto']; } - if ($GLOBALS['goto'] == 'db_sql.php' && strlen($GLOBALS['table']) > 0) { + if ($GLOBALS['goto'] == 'libraries/entry_points/database/sql.php' && strlen($GLOBALS['table']) > 0) { $GLOBALS['table'] = ''; } } if (! $goto_include) { if (strlen($GLOBALS['table']) === 0) { - $goto_include = 'db_sql.php'; + $goto_include = 'libraries/entry_points/database/sql.php'; } else { - $goto_include = 'tbl_sql.php'; + $goto_include = 'libraries/entry_points/table/sql.php'; } } return $goto_include; diff --git a/libraries/db_table_exists.inc.php b/libraries/db_table_exists.inc.php index 9415eab916..abed23005d 100644 --- a/libraries/db_table_exists.inc.php +++ b/libraries/db_table_exists.inc.php @@ -102,7 +102,7 @@ if (empty($is_table) } if (! $is_table) { - include ROOT_PATH . 'db_sql.php'; + include ROOT_PATH . 'libraries/entry_points/database/sql.php'; exit; } } diff --git a/db_sql.php b/libraries/entry_points/database/sql.php similarity index 100% rename from db_sql.php rename to libraries/entry_points/database/sql.php diff --git a/server_sql.php b/libraries/entry_points/server/sql.php similarity index 100% rename from server_sql.php rename to libraries/entry_points/server/sql.php diff --git a/sql.php b/libraries/entry_points/sql.php similarity index 100% rename from sql.php rename to libraries/entry_points/sql.php diff --git a/tbl_sql.php b/libraries/entry_points/table/sql.php similarity index 100% rename from tbl_sql.php rename to libraries/entry_points/table/sql.php diff --git a/tbl_operations.php b/tbl_operations.php index 6ac2598aa2..c2b1d01cdf 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -134,7 +134,7 @@ if (isset($_POST['submit_move']) || isset($_POST['submit_copy'])) { * If the table has to be maintained */ if (isset($_POST['table_maintenance'])) { - include_once ROOT_PATH . 'sql.php'; + include_once ROOT_PATH . 'libraries/entry_points/sql.php'; unset($result); } /** diff --git a/tbl_recent_favorite.php b/tbl_recent_favorite.php index b19360a2ab..8cba6418fa 100644 --- a/tbl_recent_favorite.php +++ b/tbl_recent_favorite.php @@ -21,4 +21,4 @@ RecentFavoriteTable::getInstance('recent') RecentFavoriteTable::getInstance('favorite') ->removeIfInvalid($_REQUEST['db'], $_REQUEST['table']); -require ROOT_PATH . 'sql.php'; +require ROOT_PATH . 'libraries/entry_points/sql.php'; diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php index 2d93cbff9d..2f84c13cd6 100644 --- a/test/classes/InsertEditTest.php +++ b/test/classes/InsertEditTest.php @@ -2593,20 +2593,20 @@ class InsertEditTest extends TestCase $GLOBALS['table'] = ''; $this->assertEquals( - 'db_sql.php', + 'libraries/entry_points/database/sql.php', $this->insertEdit->getGotoInclude('index') ); $GLOBALS['table'] = 'tbl'; $this->assertEquals( - 'tbl_sql.php', + 'libraries/entry_points/table/sql.php', $this->insertEdit->getGotoInclude('index') ); - $GLOBALS['goto'] = 'db_sql.php'; + $GLOBALS['goto'] = 'libraries/entry_points/database/sql.php'; $this->assertEquals( - 'db_sql.php', + 'libraries/entry_points/database/sql.php', $this->insertEdit->getGotoInclude('index') );