3 declare(strict_types
=1);
5 use PhpMyAdmin\Controllers\JavaScriptMessagesController
;
6 use PhpMyAdmin\OutputBuffering
;
8 global $containerBuilder;
10 if (! defined('ROOT_PATH')) {
11 // phpcs:disable PSR1.Files.SideEffects
12 define('ROOT_PATH', dirname(__DIR__
) . DIRECTORY_SEPARATOR
);
19 header('Content-Type: text/javascript; charset=UTF-8');
21 // Cache output in client - the nocache query parameter makes sure that this file is reloaded when config changes.
22 header('Expires: ' . gmdate('D, d M Y H:i:s', time() +
3600) . ' GMT');
24 // Avoid loading the full common.inc.php because this would add many non-js-compatible stuff like DOCTYPE.
25 // phpcs:disable PSR1.Files.SideEffects
26 define('PMA_MINIMUM_COMMON', true);
27 define('PMA_PATH_TO_BASEDIR', '../');
28 define('PMA_NO_SESSION', true);
31 require_once ROOT_PATH
. 'libraries/common.inc.php';
33 $buffer = OutputBuffering
::getInstance();
36 register_shutdown_function(static function () {
37 echo OutputBuffering
::getInstance()->getContents();
40 /** @var JavaScriptMessagesController $controller */
41 $controller = $containerBuilder->get(JavaScriptMessagesController
::class);