Use the router for view_operations.php
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
ba6bad9533
commit
60f4c5651a
@ -275,6 +275,9 @@ if (isset($_GET['route']) || isset($_POST['route'])) {
|
||||
$routes->addRoute(['GET', 'POST'], '/create', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/view/create.php';
|
||||
});
|
||||
$routes->addRoute(['GET', 'POST'], '/operations', function () {
|
||||
require_once ROOT_PATH . 'libraries/entry_points/view/operations.php';
|
||||
});
|
||||
});
|
||||
});
|
||||
$routeInfo = $dispatcher->dispatch(
|
||||
|
||||
@ -413,8 +413,9 @@ class Menu
|
||||
*/
|
||||
if ($tbl_is_view && ! $db_is_system_schema) {
|
||||
$tabs['operation']['icon'] = 'b_tblops';
|
||||
$tabs['operation']['link'] = 'view_operations.php';
|
||||
$tabs['operation']['link'] = Url::getFromRoute('/view/operations');
|
||||
$tabs['operation']['text'] = __('Operations');
|
||||
$tabs['operation']['active'] = isset($_REQUEST['route']) && $_REQUEST['route'] === '/view/operations';
|
||||
}
|
||||
|
||||
if (Tracker::isActive() && ! $db_is_system_schema) {
|
||||
|
||||
@ -17,13 +17,11 @@ use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
if (! defined('ROOT_PATH')) {
|
||||
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $containerBuilder, $sql_query, $url_query;
|
||||
|
||||
require_once ROOT_PATH . 'libraries/common.inc.php';
|
||||
global $containerBuilder, $sql_query, $url_query, $url_params;
|
||||
|
||||
/** @var Response $response */
|
||||
$response = $containerBuilder->get(Response::class);
|
||||
@ -44,8 +42,9 @@ $template = $containerBuilder->get('template');
|
||||
* Runs common work
|
||||
*/
|
||||
require ROOT_PATH . 'libraries/tbl_common.inc.php';
|
||||
$url_query .= '&goto=view_operations.php&back=view_operations.php';
|
||||
$url_params['goto'] = $url_params['back'] = 'view_operations.php';
|
||||
|
||||
$url_params['goto'] = $url_params['back'] = Url::getFromRoute('/view/operations');
|
||||
$url_query .= Url::getCommon($url_params, '&');
|
||||
|
||||
/** @var Relation $relation */
|
||||
$relation = $containerBuilder->get('relation');
|
||||
@ -101,9 +100,6 @@ if (isset($result)) {
|
||||
}
|
||||
unset($_message, $_type);
|
||||
|
||||
$url_params['goto'] = 'view_operations.php';
|
||||
$url_params['back'] = 'view_operations.php';
|
||||
|
||||
$drop_view_url_params = array_merge(
|
||||
$url_params,
|
||||
[
|
||||
@ -1,6 +1,6 @@
|
||||
<!-- VIEW operations -->
|
||||
<div>
|
||||
<form method="post" action="view_operations.php">
|
||||
<form method="post" action="{{ url('/view/operations') }}">
|
||||
{{ get_hidden_inputs(db, table) }}
|
||||
<input type="hidden" name="reload" value="1">
|
||||
<fieldset>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user