Ticket #538: 538-jZipCreator.2.diff

File 538-jZipCreator.2.diff, 1.2 kB (added by Julien, 4 months ago)

new patch, no external lib

  • lib/jelix/utils/jZipCreator.class.php

    old new  
    33 * @package    jelix 
    44 * @subpackage utils 
    55 * @author     Laurent Jouanneau 
     6 * @contributor Julien Issler 
    67 * @copyright  2006 Laurent Jouanneau 
     8 * @copyright 2008 Julien Issler 
    79 * @link       http://www.jelix.org 
    810 * @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
    911 */ 
     
    8890 
    8991        // converts unix timestamp to dos binary format 
    9092        if($filetime == 0) 
    91             $filetime = mktime(); 
     93            $filetime = time(); 
    9294        elseif($filetime < 315529200) // 01/01/1980 
    9395            $filetime = 315529200; 
    9496 
     
    155157           - file comment (variable size) 
    156158        */ 
    157159        $cdrecord = "\x50\x4b\x01\x02\x00\x00\x14\x00\x00\x00\x08\x00".$fileinfo; 
    158         $cdrecord .= "\x00\x00\x00\x00\x00\x00\x32\x00\x00\x00"; 
     160        $cdrecord .= "\x00\x00\x00\x00\x00\x00"; 
     161        $cdrecord .= pack('V', 32); 
    159162        $cdrecord .= pack('V', $this ->centralDirOffset ); 
    160163        $cdrecord .= $zipFileName; 
    161164 
Download in other formats: Original Format