Skip to content

Commit

Permalink
Fix phpcs for wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 3, 2019
1 parent 1db134c commit 76dcbf7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions htdocs/website/samples/wrapper.html
Expand Up @@ -5,10 +5,10 @@
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';

$encoding = '';
$hashp=GETPOST('hashp','aZ09');
$modulepart=GETPOST('modulepart','aZ09');
$entity=GETPOST('entity','int')?GETPOST('entity','int'):$conf->entity;
$original_file=GETPOST("file","alpha");
$hashp=GETPOST('hashp', 'aZ09');
$modulepart=GETPOST('modulepart', 'aZ09');
$entity=GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
$original_file=GETPOST("file", "alpha");

// If we have a hash public (hashp), we guess the original_file.
if (! empty($hashp))
Expand Down Expand Up @@ -54,13 +54,13 @@

// 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",'none')?true:false;
if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false;
if (isset($_GET["attachment"])) $attachment = GETPOST("attachment", 'none')?true:false;
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment=false;

// Define mime type
$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);

// Security: Delete string ../ into $original_file
Expand Down

0 comments on commit 76dcbf7

Please sign in to comment.