Move sql entry points to libraries/entry_points
- sql.php -> libraries/entry_points/sql.php - server_sql.php -> libraries/entry_points/server/sql.php - db_sql.php -> libraries/entry_points/database/sql.php - tbl_sql.php -> libraries/entry_points/table/sql.php Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
9846c5c782
commit
71a5c660df
@ -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';
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
/**
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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')
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user