Fix phpcs for wrapper
This commit is contained in:
parent
1db134c2a0
commit
76dcbf7424
@ -5,10 +5,10 @@ if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
|
|
||||||
$encoding = '';
|
$encoding = '';
|
||||||
$hashp=GETPOST('hashp','aZ09');
|
$hashp=GETPOST('hashp', 'aZ09');
|
||||||
$modulepart=GETPOST('modulepart','aZ09');
|
$modulepart=GETPOST('modulepart', 'aZ09');
|
||||||
$entity=GETPOST('entity','int')?GETPOST('entity','int'):$conf->entity;
|
$entity=GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
|
||||||
$original_file=GETPOST("file","alpha");
|
$original_file=GETPOST("file", "alpha");
|
||||||
|
|
||||||
// If we have a hash public (hashp), we guess the original_file.
|
// If we have a hash public (hashp), we guess the original_file.
|
||||||
if (! empty($hashp))
|
if (! empty($hashp))
|
||||||
@ -54,13 +54,13 @@ if (! empty($hashp))
|
|||||||
|
|
||||||
// Define attachment (attachment=true to force choice popup 'open'/'save as')
|
// Define attachment (attachment=true to force choice popup 'open'/'save as')
|
||||||
$attachment = true;
|
$attachment = true;
|
||||||
if (preg_match('/\.(html|htm)$/i',$original_file)) $attachment = false;
|
if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false;
|
||||||
if (isset($_GET["attachment"])) $attachment = GETPOST("attachment",'none')?true:false;
|
if (isset($_GET["attachment"])) $attachment = GETPOST("attachment", 'none')?true:false;
|
||||||
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment=false;
|
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment=false;
|
||||||
|
|
||||||
// Define mime type
|
// Define mime type
|
||||||
$type = 'application/octet-stream';
|
$type = 'application/octet-stream';
|
||||||
if (GETPOST('type','none')) $type=GETPOST('type','alpha');
|
if (GETPOST('type','none')) $type=GETPOST('type', 'alpha');
|
||||||
else $type=dol_mimetype($original_file);
|
else $type=dol_mimetype($original_file);
|
||||||
|
|
||||||
// Security: Delete string ../ into $original_file
|
// Security: Delete string ../ into $original_file
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user