Rev 260 Rev 261
Line 60... Line 60...
60 if (empty($arcname)) 60 if (empty($arcname))
61 $arcname = $rep->name; 61 $arcname = $rep->name;
62   62  
63 $svnrep->exportDirectory($path, $tmpname.DIRECTORY_SEPARATOR.$arcname, $rev); 63 $svnrep->exportDirectory($path, $tmpname.DIRECTORY_SEPARATOR.$arcname, $rev);
64 64
65 echo "*** $arcname ***"; -  
66 // Create the tar file 65 // Create the tar file
67 chdir($tmpname); 66 chdir($tmpname);
68 exec($config->tar." -cf ".quote("$arcname.tar")." ".quote($arcname)); 67 //!!!KAKL exec($config->tar." -cf ".quote("$arcname.tar")." ".quote($arcname));
-   68 exec("zip -r ".quote("$arcname")." .");
69 69
70 // ZIP it up 70 // ZIP it up
71 exec($config->gzip." ".quote("$arcname.tar")); 71 //!!!KAKL exec($config->gzip." ".quote("$arcname.tar"));
-   72 //!!!KAKL $size = filesize("$arcname.tar.gz");
72 $size = filesize("$arcname.tar.gz"); 73 $size = filesize("$arcname.zip");
73   74  
74 // Give the file to the browser 75 // Give the file to the browser
75   76  
76 if ($fp = @fopen("$arcname.tar.gz","rb")) 77 if ($fp = @fopen("$arcname.zip","rb"))
77 { 78 {
78 header("Content-Type: application/x-gzip"); 79 header("Content-Type: application/x-gzip");
79 header("Content-Length: $size"); 80 header("Content-Length: $size");
80 header("Content-Disposition: attachment; filename=\"".$rep->name."-$arcname.tar.gz\""); 81 header("Content-Disposition: attachment; filename=\"".$rep->name."-$arcname.zip\"");
81 // Use a loop to transfer the data 4KB at a time. 82 // Use a loop to transfer the data 4KB at a time.
82 while(!feof($fp)) 83 while(!feof($fp))
83 { 84 {
84 echo fread($fp, 4096); 85 echo fread($fp, 4096);
85 ob_flush(); 86 ob_flush();
86 } 87 }
87 } 88 }
88 else 89 else
89 { 90 {
90 print "Unable to open file $arcname.tar.gz"; 91 print "Unable to open file $arcname.zip";
91 } 92 }
92 93
93 fclose($fp); 94 fclose($fp);
94 95
95 chdir(".."); 96 chdir("..");