Translated using Weblate (Slovenian)
[phpmyadmin.git] / js / whitelist.php
blobead8c146ce220f4cfa1ed0c96a9e3a911191a76d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Exporting of $goto_whitelist from PHP to Javascript
6 * @package PhpMyAdmin
7 */
9 chdir('..');
11 // Send correct type:
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();
27 $buffer->start();
28 register_shutdown_function(
29 function () {
30 echo PMA_OutputBuffering::getInstance()->getContents();
34 echo "var PMA_gotoWhitelist = new Array();\n";
35 $i = -1;
36 foreach ($GLOBALS['goto_whitelist'] as $one_whitelist) {
37 $i++;
38 echo 'PMA_gotoWhitelist[' . $i . ']="' . $one_whitelist . '";' . "\n";