2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Exporting of Core::$goto_whitelist from PHP to Javascript
10 use PhpMyAdmin\OutputBuffering
;
12 if (!defined('TESTSUITE')) {
16 header('Content-Type: text/javascript; charset=UTF-8');
18 // Cache output in client - the nocache query parameter makes sure that this
19 // file is reloaded when config changes
20 header('Expires: ' . gmdate('D, d M Y H:i:s', time() +
3600) . ' GMT');
22 // Avoid loading the full common.inc.php because this would add many
23 // non-js-compatible stuff like DOCTYPE
24 define('PMA_MINIMUM_COMMON', true);
25 define('PMA_PATH_TO_BASEDIR', '../');
26 require_once './libraries/common.inc.php';
27 // Close session early as we won't write anything there
28 session_write_close();
31 $buffer = OutputBuffering
::getInstance();
33 if (!defined('TESTSUITE')) {
34 register_shutdown_function(
36 echo OutputBuffering
::getInstance()->getContents();
41 echo "var PMA_gotoWhitelist = new Array();\n";
43 foreach (Core
::$goto_whitelist as $one_whitelist) {
44 echo 'PMA_gotoWhitelist[' , $i , ']="' , $one_whitelist , '";' , "\n";