2 /* vim: set expandtab sw=4 ts=4 sts=4: */
8 declare(strict_types
=1);
10 use PhpMyAdmin\Controllers\Database\EventsController
;
11 use PhpMyAdmin\DatabaseInterface
;
12 use PhpMyAdmin\Di\Container
;
13 use PhpMyAdmin\Response
;
16 use Symfony\Component\DependencyInjection\Definition
;
18 if (! defined('ROOT_PATH')) {
19 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
24 require_once ROOT_PATH
. 'libraries/common.inc.php';
26 $container = Container
::getDefaultContainer();
27 $container->set(Response
::class, Response
::getInstance());
29 /** @var Response $response */
30 $response = $container->get(Response
::class);
32 /** @var DatabaseInterface $dbi */
33 $dbi = $container->get(DatabaseInterface
::class);
37 /** @var Definition $definition */
38 $definition = $containerBuilder->getDefinition(EventsController
::class);
39 $definition->replaceArgument('db', $container->get('db'));
41 /** @var EventsController $controller */
42 $controller = $containerBuilder->get(EventsController
::class);
44 if (! $response->isAjax()) {
46 * Displays the header and tabs
48 if (! empty($table) && in_array($table, $dbi->getTables($db))) {
49 include_once ROOT_PATH
. 'libraries/tbl_common.inc.php';
52 include_once ROOT_PATH
. 'libraries/db_common.inc.php';
64 ) = Util
::getDbInfo($db, isset($sub_part) ?
$sub_part : '');
68 * Since we did not include some libraries, we need
69 * to manually select the required database and
70 * create the missing $url_query variable
72 if (strlen($db) > 0) {
74 if (! isset($url_query)) {
75 $url_query = Url
::getCommon(