fixed a slashes bug

This commit is contained in:
Loïc Chapeaux
2001-08-07 17:08:20 +00:00
parent d71e1be842
commit 705045e87f
2 changed files with 12 additions and 12 deletions

View File

@@ -169,7 +169,7 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
?> ?>
<td align="right"> <td align="right">
<?php <?php
echo "\n"; echo "\n" . ' ';
if ($mergetable == TRUE) { if ($mergetable == TRUE) {
echo '<i>' . number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . '</i>' . "\n"; echo '<i>' . number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . '</i>' . "\n";
} else { } else {
@@ -289,10 +289,9 @@ $url_query = 'lang=' . $lang
. '&db=' . urlencode($db) . '&db=' . urlencode($db)
. '&goto=db_details.php3'; . '&goto=db_details.php3';
if (isset($show_query)) { if (isset($show_query)) {
// loic1: Not required since already done in db_readdump.php3 (see lines 72 & 117) if (get_magic_quotes_gpc()) {
// if (get_magic_quotes_gpc()) { $sql_query = stripslashes($sql_query);
// $sql_query = stripslashes($sql_query); }
// }
$query_to_display = (($show_query == 'y') ? $sql_query : ''); $query_to_display = (($show_query == 'y') ? $sql_query : '');
} }
?> ?>
@@ -443,10 +442,8 @@ if ($num_tables > 0) {
<?php <?php
// gzip and bzip2 encode features // gzip and bzip2 encode features
if (PMA_INT_VERSION >= 40004) { if (PMA_INT_VERSION >= 40004) {
$is_gzip = (isset($cfgGZipDump) && $is_gzip = (isset($cfgGZipDump) && $cfgGZipDump && @function_exists('gzencode'));
$cfgGZipDump && @function_exists('gzencode')); $is_bzip = (isset($cfgBZipDump) && $cfgBZipDump && @function_exists('bzcompress'));
$is_bzip = (isset($cfgBZipDump) &&
$cfgBZipDump && @function_exists('bzcompress'));
if ($is_gzip || $is_bzip) { if ($is_gzip || $is_bzip) {
echo "\n" . ' ('; echo "\n" . ' (';
if ($is_gzip) { if ($is_gzip) {

View File

@@ -64,7 +64,7 @@ $sql_query = trim($sql_query);
if (!empty($prev_sql_query)) { if (!empty($prev_sql_query)) {
$prev_sql_query = urldecode($prev_sql_query); $prev_sql_query = urldecode($prev_sql_query);
if ($sql_query == trim(htmlspecialchars($prev_sql_query))) { if ($sql_query == trim(htmlspecialchars($prev_sql_query))) {
$sql_query = $prev_sql_query; $sql_query = $prev_sql_query;
} }
} }
@@ -113,8 +113,11 @@ if ($sql_query != '') {
/** /**
* Go back to db_details.php3 * Go back to db_details.php3
*/ */
// Copy the original query back for display purposes // Copy the original query back for display purposes (we add slashes because
$sql_query = $sql_query_cpy; // stripslashes is used in db_details.php3, line 294)
$sql_query = (get_magic_quotes_gpc())
? addslashes($sql_query_cpy)
: $sql_query_cpy;
include('./header.inc.php3'); include('./header.inc.php3');
if (isset($my_die)) { if (isset($my_die)) {
mysql_die('', $my_die); mysql_die('', $my_die);