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