patch #2918831 [export] Missing backquotes on reserved words

This commit is contained in:
Marc Delisle
2009-12-22 18:05:31 +00:00
parent cc96cb9601
commit 1dfeb3f87d
2 changed files with 13 additions and 7 deletions

View File

@@ -16,6 +16,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Greg Roach - fisharebest
- patch #2915168 [import] Incorrect parsing of DELIMITER keyword,
thanks to Greg Roach - fisharebest
- patch #2918831 [export] Missing backquotes on reserved words,
thanks to Virsacer - virsacer
3.2.4.0 (2009-12-02)
- bug [engines] Innodb_buffer_pool_pages_latched no longer returned in status

View File

@@ -890,16 +890,20 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
*/
function PMA_backquote($a_name, $do_it = true)
{
if (! $do_it) {
if (is_array($a_name)) {
foreach ($a_name as &$data) {
$data = PMA_backquote($data, $do_it);
}
return $a_name;
}
if (is_array($a_name)) {
$result = array();
foreach ($a_name as $key => $val) {
$result[$key] = PMA_backquote($val);
}
return $result;
if (! $do_it) {
global $PMA_SQPdata_forbidden_word;
global $PMA_SQPdata_forbidden_word_cnt;
if(! PMA_STR_binarySearchInArr(strtoupper($a_name), $PMA_SQPdata_forbidden_word, $PMA_SQPdata_forbidden_word_cnt)) {
return $a_name;
}
}
// '0' is also empty for php :-(