diff --git a/ChangeLog b/ChangeLog index 2f379b810..2c3e449a6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ $Source$ whether to display table name or not at the top of the page. * tbl_copy.php3, line 86: returns to tbl_properties.php3 rather than db_details.php3. + * lib.inc.php3: fixed a bug when browsing a table with values equal to 0. 2001-08-28 Olivier Müller * db_stats.php3: fixed the sql query so that the script won't die, even if diff --git a/lib.inc.php3 b/lib.inc.php3 index 1ad5edc28..9bf8711ec 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -703,6 +703,10 @@ window.parent.frames['nav'].location.replace(''); return array($return_value, $unit); } // end of the 'format_byte_down' function + + + /* ----- Functions used to display records returned by a sql query ----- */ + /** * Displays a navigation bar to browse among the results of a sql query * @@ -1131,10 +1135,10 @@ var errorMsg2 = 'numeric == 1) { - if (empty($row[$i])) { - echo '  ' . "\n"; - } else { + if ($row[$i] != '') { echo ' ' . $row[$i] . '' . "\n"; + } else { + echo '  ' . "\n"; } } else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) { // loic1 : mysql_fetch_fields returns BLOB in place of TEXT @@ -1151,7 +1155,7 @@ var errorMsg2 = '/ - if (!empty($row[$i])) { + if ($row[$i] != '') { $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i])); echo ' ' . $row[$i] . '' . "\n"; } else { @@ -1160,7 +1164,7 @@ var errorMsg2 = '/ - if (!empty($row[$i])) { + if ($row[$i] != '') { $row[$i] = ereg_replace("((\015\012)|(\015)|(\012))+", '
', htmlspecialchars($row[$i])); echo ' ' . $row[$i] . '' . "\n"; } else { @@ -1751,9 +1755,8 @@ var errorMsg2 = '