|
@@ -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');
|