queries retained and displayed into the textearea when stripslashed one time more than required

This commit is contained in:
Loïc Chapeaux
2001-08-04 10:59:46 +00:00
parent db5b847af1
commit e0005ba190

View File

@@ -129,42 +129,43 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
</td> </td>
<?php <?php
echo "\n"; echo "\n";
$mergetable=false; $mergetable = FALSE;
$nonisam=false; $nonisam = FALSE;
if (isset($sts_data['Type'])) { if (isset($sts_data['Type'])) {
if ($sts_data['Type']=="MRG_MyISAM") $mergetable=true; if ($sts_data['Type'] == 'MRG_MyISAM') {
else if (!eregi("ISAM|HEAP", $sts_data['Type'])) $nonisam=true; $mergetable = TRUE;
} } else if (!eregi('ISAM|HEAP', $sts_data['Type'])) {
$nonisam = TRUE;
if (isset($sts_data['Rows'])) }
{
if ($mergetable == false){
if ($nonisam == false){
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize;
if ($tblsize > 0) {
list($formated_size, $unit) = format_byte_down($tblsize, 3, 1);
} else {
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
} }
}
else { if (isset($sts_data['Rows'])) {
$formated_size="&nbsp;-&nbsp;"; if ($mergetable == FALSE) {
$unit=""; if ($nonisam == FALSE) {
} $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
if (isset($sts_data['Rows'])) $sum_entries += $sts_data['Rows']; $sum_size += $tblsize;
} if ($tblsize > 0) {
// MyISAM MERGE Table list($formated_size, $unit) = format_byte_down($tblsize, 3, 1);
else if ($mergetable == true) } else {
{ list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
$formated_size="&nbsp;-&nbsp;"; }
$unit=""; } else {
} $formated_size = '&nbsp;-&nbsp;';
else $unit = '';
{ }
$formated_size="unknown"; if (isset($sts_data['Rows'])) {
$unit=""; $sum_entries += $sts_data['Rows'];
} }
}
// MyISAM MERGE Table
else if ($mergetable == TRUE) {
$formated_size = '&nbsp;-&nbsp;';
$unit = '';
}
else {
$formated_size = 'unknown';
$unit = '';
}
?> ?>
<td align="right"> <td align="right">
<?php <?php
@@ -288,9 +289,10 @@ $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)) {
if (get_magic_quotes_gpc()) { // loic1: Not required since already done in db_readdump.php3 (see lines 72 & 117)
$sql_query = stripslashes($sql_query); // if (get_magic_quotes_gpc()) {
} // $sql_query = stripslashes($sql_query);
// }
$query_to_display = (($show_query == 'y') ? $sql_query : ''); $query_to_display = (($show_query == 'y') ? $sql_query : '');
} }
?> ?>