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\Response
;
16 if (! defined('ROOT_PATH')) {
17 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
20 require_once ROOT_PATH
. 'libraries/common.inc.php';
22 /** @var Response $response */
23 $response = $containerBuilder->get(Response
::class);
25 /** @var DatabaseInterface $dbi */
26 $dbi = $containerBuilder->get(DatabaseInterface
::class);
30 /** @var EventsController $controller */
31 $controller = $containerBuilder->get(EventsController
::class);
33 /** @var string $db */
34 $db = $containerBuilder->getParameter('db');
36 /** @var string $table */
37 $table = $containerBuilder->getParameter('table');
39 if (! $response->isAjax()) {
41 * Displays the header and tabs
43 if (! empty($table) && in_array($table, $dbi->getTables($db))) {
44 include_once ROOT_PATH
. 'libraries/tbl_common.inc.php';
47 include_once ROOT_PATH
. 'libraries/db_common.inc.php';
59 ) = Util
::getDbInfo($db, isset($sub_part) ?
$sub_part : '');
63 * Since we did not include some libraries, we need
64 * to manually select the required database and
65 * create the missing $url_query variable
67 if (strlen($db) > 0) {
69 if (! isset($url_query)) {
70 $url_query = Url
::getCommon(