mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix param attachment
This commit is contained in:
parent
ffaff4dc7f
commit
1faaed504a
|
|
@ -107,12 +107,6 @@ if (in_array($modulepart, array('facture_paiement','unpaid')))
|
|||
* View
|
||||
*/
|
||||
|
||||
// Define attachment (attachment=true to force choice popup 'open'/'save as')
|
||||
$attachment = true;
|
||||
if (preg_match('/\.(html|htm)$/i',$original_file)) $attachment = false;
|
||||
if (isset($_GET["attachment"])) $attachment = GETPOST("attachment",'alpha')?true:false;
|
||||
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment=false;
|
||||
|
||||
// If we have a hash public (hashp), we guess the original_file.
|
||||
if (! empty($hashp))
|
||||
{
|
||||
|
|
@ -155,6 +149,12 @@ if (! empty($hashp))
|
|||
}
|
||||
}
|
||||
|
||||
// Define attachment (attachment=true to force choice popup 'open'/'save as')
|
||||
$attachment = true;
|
||||
if (preg_match('/\.(html|htm)$/i',$original_file)) $attachment = false;
|
||||
if (isset($_GET["attachment"])) $attachment = GETPOST("attachment",'alpha')?true:false;
|
||||
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment=false;
|
||||
|
||||
// Define mime type
|
||||
$type = 'application/octet-stream';
|
||||
if (GETPOST('type','alpha')) $type=GETPOST('type','alpha');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user