Skip to content
Snippets Groups Projects
Commit b84a0fef authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Change in document wrapper to download files in bittorrent directory

parent 6a0877fe
No related branches found
No related tags found
No related merge requests found
...@@ -398,7 +398,9 @@ if ($modulepart) ...@@ -398,7 +398,9 @@ if ($modulepart)
if ($modulepart == 'bittorrent') if ($modulepart == 'bittorrent')
{ {
$accessallowed=1; $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 = ''; $sqlprotectagainstexternals = '';
} }
} }
......
...@@ -176,6 +176,7 @@ function dol_mimetype($file) ...@@ -176,6 +176,7 @@ function dol_mimetype($file)
if (eregi('\.tiff$',$file)) $mime='image/tiff'; if (eregi('\.tiff$',$file)) $mime='image/tiff';
if (eregi('\.vcs$',$file)) $mime='text/calendar'; if (eregi('\.vcs$',$file)) $mime='text/calendar';
if (eregi('\.ics$',$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('\.(mp3|ogg|au)$',$file)) $mime='audio';
if (eregi('\.(avi|mvw|divx|xvid)$',$file)) $mime='video'; if (eregi('\.(avi|mvw|divx|xvid)$',$file)) $mime='video';
if (eregi('\.(zip|rar|gz|tgz|z|cab|bz2)$',$file)) $mime='archive'; if (eregi('\.(zip|rar|gz|tgz|z|cab|bz2)$',$file)) $mime='archive';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment