fixed bug #444767 - Other cases for display=simple
This commit is contained in:
19
sql.php3
19
sql.php3
@@ -110,15 +110,15 @@ if ($do_confirm) {
|
||||
}
|
||||
include('./header.inc.php3');
|
||||
echo $strDoYouReally . ' :<br />' . "\n";
|
||||
echo '<tt>' . htmlspecialchars($stripped_sql_query) . '</tt> ?<br/>';
|
||||
echo '<tt>' . htmlspecialchars($stripped_sql_query) . '</tt> ?<br/>' . "\n";
|
||||
?>
|
||||
<form action="sql.php3" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="sql_query" value="<?php echo urlencode($sql_query); ?>" />
|
||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||
<input type="hidden" name="db" value="<?php echo $db; ?>" />
|
||||
<input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? $zero_rows : ''; ?>" />
|
||||
<input type="hidden" name="table" value="<?php echo isset($table) ? $table : ''; ?>" />
|
||||
<input type="hidden" name="sql_query" value="<?php echo urlencode($sql_query); ?>" />
|
||||
<input type="hidden" name="zero_rows" value="<?php echo isset($zero_rows) ? $zero_rows : ''; ?>" />
|
||||
<input type="hidden" name="goto" value="<?php echo isset($goto) ? $goto : ''; ?>" />
|
||||
<input type="hidden" name="back" value="<?php echo isset($back) ? $back : ''; ?>" />
|
||||
<input type="hidden" name="reload" value="<?php echo isset($reload) ? $reload : ''; ?>" />
|
||||
@@ -299,8 +299,10 @@ else {
|
||||
}
|
||||
$fields_cnt = count($fields_meta);
|
||||
|
||||
// Defines wether to display the full/partial text button or not
|
||||
// Defines wether to display the full/partial text button or and
|
||||
// refines the display mode if required
|
||||
$show_text_btn = FALSE;
|
||||
$prev_table = $fields_meta[0]->table;
|
||||
for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
if (eregi('BLOB', $fields_meta[$i]->type)) {
|
||||
$show_text_btn = TRUE;
|
||||
@@ -310,11 +312,14 @@ else {
|
||||
}
|
||||
// loic1: maybe the fix for the second alias bug?
|
||||
if (($display != 'simple' && $display != 'bkmOnly')
|
||||
&& $fields_meta[$i]->table == '') {
|
||||
&& ($fields_meta[$i]->table == ''|| $fields_meta[$i]->table != $prev_table)) {
|
||||
$display = 'simple';
|
||||
if ($show_text_btn) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$prev_table = $fields_meta[$i]->table;
|
||||
} // end while
|
||||
mysql_field_seek($result, 0);
|
||||
|
||||
// Displays the results in a table
|
||||
display_table($result, ($display == 'simple' || $display == 'bkmOnly'), $show_text_btn);
|
||||
|
Reference in New Issue
Block a user