BUG 6589:I have been able to reproduce the issue, to solve this issue I have added a piece of code to allow to download this type of file

This commit is contained in:
Carlos Pacha
2011-03-30 10:38:49 -04:00
parent 528a694c69
commit 7f7a0eeab2
2 changed files with 15 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php
switch ($_GET['MAIN_DIRECTORY']) {
case 'mailTemplates':
$sDirectory = PATH_DATA_MAILTEMPLATES . $_GET['PRO_UID'] . PATH_SEP . ($_GET['CURRENT_DIRECTORY'] != '' ? $_GET['CURRENT_DIRECTORY'] . PATH_SEP : '');
@@ -9,7 +9,10 @@ switch ($_GET['MAIN_DIRECTORY']) {
default:
die;
break;
}
}
//fixed: added a file extension when is a javascript file by krlos
$_GET['FILE'] .= ($_GET['sFilextension']!='' && $_GET['sFilextension']=='javascript')?'.js':'';
if (file_exists($sDirectory . $_GET['FILE'])) {
G::streamFile($sDirectory . $_GET['FILE'], true);
}
}