
The branch, QA_3_3 has been updated via d1e9585c9e31b82a57e47c614c4989791117c78a (commit) via b301062beee05de9cbe995047b28add9f16a3d59 (commit) via 45bdf8f522728dba467fb62888fea2fb5f6e8cca (commit) via 5920476d442d42186b9f396b2de7ca80e681d33f (commit) from 362251abbf49df2ea8e489ed7c88827e3a97d414 (commit) - Log ----------------------------------------------------------------- commit d1e9585c9e31b82a57e47c614c4989791117c78a Merge: b301062beee05de9cbe995047b28add9f16a3d59 362251abbf49df2ea8e489ed7c88827e3a97d414 Author: Herman van Rink <rink@initfour.nl> Date: Tue Aug 24 15:17:11 2010 +0200 Merge branch 'QA_3_3' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin into QA_3_3 commit b301062beee05de9cbe995047b28add9f16a3d59 Author: Herman van Rink <rink@initfour.nl> Date: Tue Aug 24 15:14:27 2010 +0200 Generalized include, to incorporate the Config class commit 45bdf8f522728dba467fb62888fea2fb5f6e8cca Author: Herman van Rink <rink@initfour.nl> Date: Tue Aug 24 14:47:29 2010 +0200 Add additional condition for strict checking. commit 5920476d442d42186b9f396b2de7ca80e681d33f Author: Herman van Rink <helmo@kirk.(none)> Date: Mon Aug 23 14:30:17 2010 +0200 Updated unittest to conform latest update ----------------------------------------------------------------------- Summary of changes: libraries/Message.class.php | 2 +- test/PMA_headerLocation_test.php | 11 +++++++---- test/PMA_whichCrlf_test.php | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libraries/Message.class.php b/libraries/Message.class.php index e7947b8..9bf5847 100644 --- a/libraries/Message.class.php +++ b/libraries/Message.class.php @@ -666,7 +666,7 @@ class PMA_Message static public function format() { $params = func_get_args(); - if (is_array($params[1])) { + if (isset($params[1]) && is_array($params[1])) { array_unshift($params[1], $params[0]); $params = $params[1]; } diff --git a/test/PMA_headerLocation_test.php b/test/PMA_headerLocation_test.php index 649d914..5d0a02d 100644 --- a/test/PMA_headerLocation_test.php +++ b/test/PMA_headerLocation_test.php @@ -19,6 +19,7 @@ require_once 'PHPUnit/Extensions/OutputTestCase.php'; require_once './libraries/common.lib.php'; require_once './libraries/url_generating.lib.php'; require_once './libraries/core.lib.php'; +require_once './libraries/select_lang.lib.php'; /** * Test function sending headers. @@ -248,6 +249,8 @@ class PMA_headerLocation_test extends PHPUnit_Extensions_OutputTestCase // over 600 chars $testUri = 'http://testurl.com/test.php?testlonguri=over600chars&test=test&test=test&tes...'; + $testUri_html = htmlspecialchars($testUri); + $testUri_js = PMA_escapeJsString($testUri); $GLOBALS['strGo'] = 'test link'; @@ -255,17 +258,17 @@ class PMA_headerLocation_test extends PHPUnit_Extensions_OutputTestCase "<meta http-equiv=\"expires\" content=\"0\">\n" . "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" . "<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\n" . - "<meta http-equiv=\"Refresh\" content=\"0;url=" . $testUri . "\">\n" . + "<meta http-equiv=\"Refresh\" content=\"0;url=" . $testUri_html . "\">\n" . "<script type=\"text/javascript\">\n". "//<![CDATA[\n" . - "setTimeout(\"window.location = unescape('\"" . $testUri . "\"')\", 2000);\n" . + "setTimeout(\"window.location = unescape('\"" . $testUri_js . "\"')\", 2000);\n" . "//]]>\n" . "</script>\n" . "</head>\n" . "<body>\n" . "<script type=\"text/javascript\">\n" . "//<![CDATA[\n" . - "document.write('<p><a href=\"" . $testUri . "\">" . $GLOBALS['strGo'] . "</a></p>');\n" . + "document.write('<p><a href=\"" . $testUri_html . "\">" . $GLOBALS['strGo'] . "</a></p>');\n" . "//]]>\n" . "</script></body></html>\n"; @@ -284,7 +287,7 @@ class PMA_headerLocation_test extends PHPUnit_Extensions_OutputTestCase $GLOBALS['reload'] = true; $GLOBALS['db'] = 'test_db'; - $url = './navigation.php?db='.$GLOBALS['db']; + $url = './navigation.php?db='.$GLOBALS['db'] . '&lang=en-utf-8&convcharset=utf-8'; $write = PHP_EOL . '<script type="text/javascript">' . PHP_EOL . '//<![CDATA[' . PHP_EOL . 'if (typeof(window.parent) != \'undefined\'' . PHP_EOL . diff --git a/test/PMA_whichCrlf_test.php b/test/PMA_whichCrlf_test.php index 831bc11..2a0726a 100644 --- a/test/PMA_whichCrlf_test.php +++ b/test/PMA_whichCrlf_test.php @@ -16,7 +16,7 @@ require_once 'PHPUnit/Framework.php'; /** * Include to test. */ -require_once './libraries/common.lib.php'; +require_once './libraries/common.inc.php'; /** * Test whichCrlf function. hooks/post-receive -- phpMyAdmin