This commit is contained in:
Alexander M. Turek
2002-08-20 05:56:22 +00:00
parent c40a779212
commit f175e698e1
4 changed files with 17 additions and 11 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-08-20 Alexander M. Turek <rabus@users.sourceforge.net>
* sql.php3, libraries/sqlparser.lib.php3: Fixed bug #597184 (PHP3
compatibility).
* libraries/common.lib.php3: Undefined variable.
2002-08-17 Alexander M. Turek <rabus@users.sourceforge.net> 2002-08-17 Alexander M. Turek <rabus@users.sourceforge.net>
* main.php3: Fixed bug #596019 (Undefined variable $re). * main.php3: Fixed bug #596019 (Undefined variable $re).

View File

@@ -1086,6 +1086,7 @@ if (typeof(document.getElementById) != 'undefined'
// Checks if the table needs to be repaired after a TRUNCATE query. // Checks if the table needs to be repaired after a TRUNCATE query.
if (PMA_MYSQL_INT_VERSION >= 40000 if (PMA_MYSQL_INT_VERSION >= 40000
&& isset($GLOBALS['table'])
&& $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table'])) { && $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table'])) {
if (!isset($tbl_status)) { if (!isset($tbl_status)) {
$result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\''); $result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\'');

View File

@@ -196,7 +196,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
9 => '||' 9 => '||'
); );
$allpunct_list_pair_size = 10; //count($allpunct_list_pair); $allpunct_list_pair_size = 10; //count($allpunct_list_pair);
$quote_list = "\'\"\`"; $quote_list = '\'"`';
$arraysize = 0; $arraysize = 0;
while ($count2 < $len) { while ($count2 < $len) {
@@ -382,7 +382,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$count2--; $count2--;
$punct_data = substr($sql, $count1, $count2 - $count1); $punct_data = substr($sql, $count1, $count2 - $count1);
} else { } else {
$debugstr = $GLOBALS['strSQPBugUnknownPunctuation'] . ' @ ' . ($count1+1) . "\n" $debugstr = $GLOBALS['strSQPBugUnknownPunctuation'] . ' @ ' . ($count1+1) . "\n"
. 'STR: ' . $punct_data; . 'STR: ' . $punct_data;
PMA_SQP_throwError($debugstr, $sql); PMA_SQP_throwError($debugstr, $sql);
return $sql; return $sql;
@@ -418,7 +418,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$is_float_digit = TRUE; $is_float_digit = TRUE;
continue; continue;
} else { } else {
$debugstr = $GLOBALS['strSQPBugInvalidIdentifer'] . ' @ ' . ($count1+1) . "\n" $debugstr = $GLOBALS['strSQPBugInvalidIdentifer'] . ' @ ' . ($count1+1) . "\n"
. 'STR: ' . substr($sql, $count1, $count2 - $count1); . 'STR: ' . substr($sql, $count1, $count2 - $count1);
PMA_SQP_throwError($debugstr, $sql); PMA_SQP_throwError($debugstr, $sql);
return $sql; return $sql;
@@ -485,8 +485,8 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
if ($arraysize > 0) { if ($arraysize > 0) {
$t_next = $sql_array[0]['type']; $t_next = $sql_array[0]['type'];
$t_prev = NULL; $t_prev = '';
$t_cur = NULL; $t_cur = '';
} }
for ($i = 0; $i < $arraysize; $i++) { for ($i = 0; $i < $arraysize; $i++) {
@@ -495,7 +495,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
if (($i + 1) < $arraysize) { if (($i + 1) < $arraysize) {
$t_next = $sql_array[$i + 1]['type']; $t_next = $sql_array[$i + 1]['type'];
} else { } else {
$t_next = NULL; $t_next = '';
} }
if ($t_cur == 'alpha') { if ($t_cur == 'alpha') {
$t_suffix = '_identifier'; $t_suffix = '_identifier';
@@ -702,9 +702,9 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$arraysize = $arr['len']; $arraysize = $arr['len'];
$typearr = array(); $typearr = array();
if ($arraysize >= 0) { if ($arraysize >= 0) {
$typearr[0] = NULL; $typearr[0] = '';
$typearr[1] = NULL; $typearr[1] = '';
$typearr[2] = NULL; $typearr[2] = '';
$typearr[3] = $arr[0]['type']; $typearr[3] = $arr[0]['type'];
} }
@@ -724,7 +724,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$typearr[4] = $arr[$i + 1]['type']; $typearr[4] = $arr[$i + 1]['type'];
} else { } else {
//array_push($typearr, NULL); //array_push($typearr, NULL);
$typearr[4] = NULL; $typearr[4] = '';
} }
for ($j=0; $j<4; $j++) { for ($j=0; $j<4; $j++) {

View File

@@ -562,7 +562,7 @@ else {
. '&amp;disp_direction=' . $disp_direction . '&amp;disp_direction=' . $disp_direction
. '&amp;repeat_cells=' . $repeat_cells . '&amp;repeat_cells=' . $repeat_cells
. '&amp;printview=1' . '&amp;printview=1'
. (($dontlimitchars == '1') ? '&amp;dontlimitchars=1' : '') . ((isset($dontlimitchars) && $dontlimitchars == '1') ? '&amp;dontlimitchars=1' : '')
. '&amp;sql_query=' . urlencode($sql_query); . '&amp;sql_query=' . urlencode($sql_query);
echo ' <!-- Print view -->' . "\n" echo ' <!-- Print view -->' . "\n"
. ' <a href="sql.php3' . $url_query . '" target="print_view">' . $strPrintView . '</a>' . "\n"; . ' <a href="sql.php3' . $url_query . '" target="print_view">' . $strPrintView . '</a>' . "\n";