Calculate offset progressively (patch #824122).
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-10-10 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* libraries/zip.lib.php3: Calculate offset progressively (patch #824122).
|
||||
|
||||
2003-10-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/russian-windows-1251: wrong charset (bug 823939)
|
||||
|
||||
|
@@ -130,7 +130,6 @@ class zipfile
|
||||
|
||||
// add this entry to array
|
||||
$this -> datasec[] = $fr;
|
||||
$new_offset = strlen(implode('', $this->datasec));
|
||||
|
||||
// now add to central directory record
|
||||
$cdrec = "\x50\x4b\x01\x02";
|
||||
@@ -150,7 +149,7 @@ class zipfile
|
||||
$cdrec .= pack('V', 32 ); // external file attributes - 'archive' bit set
|
||||
|
||||
$cdrec .= pack('V', $this -> old_offset ); // relative offset of local header
|
||||
$this -> old_offset = $new_offset;
|
||||
$this -> old_offset += strlen($fr);
|
||||
|
||||
$cdrec .= $name;
|
||||
|
||||
|
Reference in New Issue
Block a user