Fix empty PMA_gotoWhitelist JavaScript array
Related to commit 738f527242
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
d198598b93
commit
9a6f077975
@ -108,6 +108,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue Added explicit parentheses in nested ternary operators
|
||||
- issue #15287 Fix auto_increment field is too small
|
||||
- issue #15283 Fix tries to change collation on views when changing collation on all tables/fields
|
||||
- issue Fixed empty PMA_gotoWhitelist JavaScript array
|
||||
|
||||
4.8.5 (2019-01-25)
|
||||
- issue Developer debug data was saved to the PHP error log
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Exporting of $goto_whitelist from PHP to Javascript
|
||||
* Exporting of Core::$goto_whitelist from PHP to Javascript
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\OutputBuffering;
|
||||
|
||||
if (!defined('TESTSUITE')) {
|
||||
chdir('..');
|
||||
|
||||
@ -25,19 +28,19 @@ if (!defined('TESTSUITE')) {
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
$buffer = PhpMyAdmin\OutputBuffering::getInstance();
|
||||
$buffer = OutputBuffering::getInstance();
|
||||
$buffer->start();
|
||||
if (!defined('TESTSUITE')) {
|
||||
register_shutdown_function(
|
||||
function () {
|
||||
echo PhpMyAdmin\OutputBuffering::getInstance()->getContents();
|
||||
echo OutputBuffering::getInstance()->getContents();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
echo "var PMA_gotoWhitelist = new Array();\n";
|
||||
$i = -1;
|
||||
foreach ($GLOBALS['goto_whitelist'] as $one_whitelist) {
|
||||
$i++;
|
||||
$i = 0;
|
||||
foreach (Core::$goto_whitelist as $one_whitelist) {
|
||||
echo 'PMA_gotoWhitelist[' , $i , ']="' , $one_whitelist , '";' , "\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -43,7 +43,6 @@ class FilesTest extends TestCase
|
||||
public function testDynamicJs($name, $expected)
|
||||
{
|
||||
$GLOBALS['pmaThemeImage'] = '';
|
||||
$GLOBALS['goto_whitelist'] = array('x');
|
||||
$_GET['scripts'] = '["ajax.js"]';
|
||||
$cfg = array(
|
||||
'AllowUserDropDatabase' => true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user