o: ActiveSupport::Cache::Entry :@compressedF:@value"§"¡
| dl.php | ||
|---|---|---|
| 52 | 52 |
|
| 53 | 53 |
if (count(glob("/tmp/wsvn-*"))<=40) // Omezeni na pocet soucasne stahovanych souboru
|
| 54 | 54 |
{
|
| 55 |
|
|
| 56 |
// Ošetřenà doběhnutà skriptu i když klient klikne jinam (smazánà tmp) |
|
| 57 |
ignore_user_abort(true); |
|
| 58 |
|
|
| 55 | 59 |
$tmpname1 = tempnam("temp", "wsvn-");
|
| 56 | 60 |
$tmpname = $tmpname1; |
| 57 | 61 |
$tmpname .= "dir"; |
| ... | ... | |
| 67 | 71 |
|
| 68 | 72 |
// ZIP it up |
| 69 | 73 |
chdir($tmpname); |
| 70 |
exec("zip -r ".quote("$arcname")." .");
|
|
| 74 |
if (! connection_aborted()) |
|
| 75 |
exec("zip -r ".quote("$arcname")." .");
|
|
| 71 | 76 |
|
| 72 | 77 |
$size = filesize("$arcname.zip");
|
| 73 | 78 |
|
| 74 | 79 |
// Give the file to the browser |
| 75 | 80 |
|
| 76 |
if ($fp = @fopen("$arcname.zip","rb"))
|
|
| 81 |
if (!connection_aborted() && $fp = @fopen("$arcname.zip","rb"))
|
|
| 77 | 82 |
{
|
| 78 | 83 |
header("Content-Type: application/zip");
|
| 79 | 84 |
header("Content-Length: $size");
|