diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index 5d456d2a..78ade4ee 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -84,7 +84,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n"; } if ($ext == "tar") { - echo tar_file((DB != "" ? "" : "$db/") . "$name.csv", ob_get_clean()); + tar_file((DB != "" ? "" : "$db/") . "$name.csv", ob_get_clean()); } elseif ($is_sql) { echo "\n"; } diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 08c41966..da42e323 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -412,7 +412,7 @@ function remove_definer($query) { /** Get string to add a file in TAR * @param string * @param string -* @return string +* @return null prints the output */ function tar_file($filename, $contents) { $return = pack("a100a8a8a8a12a12", $filename, 644, 0, 0, decoct(strlen($contents)), decoct(time())); @@ -421,7 +421,10 @@ function tar_file($filename, $contents) { $checksum += ord($return[$i]); } $return .= sprintf("%06o", $checksum) . "\0 "; - return $return . str_repeat("\0", 512 - strlen($return)) . $contents . str_repeat("\0", 511 - (strlen($contents) + 511) % 512); + echo $return; + echo str_repeat("\0", 512 - strlen($return)); + echo $contents; + echo str_repeat("\0", 511 - (strlen($contents) + 511) % 512); } /** Get INI bytes value diff --git a/todo.txt b/todo.txt index f1b63c71..f682ba0c 100644 --- a/todo.txt +++ b/todo.txt @@ -4,7 +4,7 @@ Variables editation Blob download and image display in edit form (important for Editor with hidden fields in select and SQL command) Add title to Logout, edit (in select) and select (in menu) for style "hever" Export by GET parameters -Files are missing in TAR +Files are missing in TAR due to exhausted memory - can be fixed by creating a temporary file Draggable columns in alter table (thanks to Michal Manak)