Change in document wrapper to download files in bittorrent directory
This commit is contained in:
parent
6a0877fe6a
commit
b84a0fefbe
@ -398,7 +398,9 @@ if ($modulepart)
|
||||
if ($modulepart == 'bittorrent')
|
||||
{
|
||||
$accessallowed=1;
|
||||
$original_file=DOL_DATA_ROOT.'/bittorrent/files/'.$original_file;
|
||||
$dir='files';
|
||||
if ($type == 'application/x-bittorrent') $dir='torrents';
|
||||
$original_file=DOL_DATA_ROOT.'/bittorrent/'.$dir.'/'.$original_file;
|
||||
$sqlprotectagainstexternals = '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,6 +176,7 @@ function dol_mimetype($file)
|
||||
if (eregi('\.tiff$',$file)) $mime='image/tiff';
|
||||
if (eregi('\.vcs$',$file)) $mime='text/calendar';
|
||||
if (eregi('\.ics$',$file)) $mime='text/calendar';
|
||||
if (eregi('\.torrent$',$file)) $mime='application/x-bittorrent';
|
||||
if (eregi('\.(mp3|ogg|au)$',$file)) $mime='audio';
|
||||
if (eregi('\.(avi|mvw|divx|xvid)$',$file)) $mime='video';
|
||||
if (eregi('\.(zip|rar|gz|tgz|z|cab|bz2)$',$file)) $mime='archive';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user