Translated using Weblate (Hindi)
[phpmyadmin.git] / js / whitelist.php
blob10ba267513b29fe78f9dbbabc12c86d4de7a015d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Exporting of Core::$goto_whitelist from PHP to Javascript
6 * @package PhpMyAdmin
7 */
9 use PhpMyAdmin\Core;
10 use PhpMyAdmin\OutputBuffering;
12 if (!defined('TESTSUITE')) {
13 chdir('..');
15 // Send correct type:
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();
32 $buffer->start();
33 if (!defined('TESTSUITE')) {
34 register_shutdown_function(
35 function () {
36 echo OutputBuffering::getInstance()->getContents();
41 echo "var PMA_gotoWhitelist = new Array();\n";
42 $i = 0;
43 foreach (Core::$goto_whitelist as $one_whitelist) {
44 echo 'PMA_gotoWhitelist[' , $i , ']="' , $one_whitelist , '";' , "\n";
45 $i++;