Qual: Uniformize code
This commit is contained in:
parent
addfe4580c
commit
a82262a7e0
@ -53,6 +53,9 @@ $original_file = GETPOST("file"); // Do not use urldecode here ($_GET are alread
|
|||||||
$modulepart = GETPOST("modulepart");
|
$modulepart = GETPOST("modulepart");
|
||||||
$urlsource = GETPOST("urlsource");
|
$urlsource = GETPOST("urlsource");
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action
|
* Action
|
||||||
@ -112,7 +115,6 @@ $original_file = str_replace("../","/", $original_file);
|
|||||||
$refname=basename(dirname($original_file)."/");
|
$refname=basename(dirname($original_file)."/");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
|
||||||
$accessallowed=0;
|
$accessallowed=0;
|
||||||
$sqlprotectagainstexternals='';
|
$sqlprotectagainstexternals='';
|
||||||
if ($modulepart)
|
if ($modulepart)
|
||||||
|
|||||||
@ -44,7 +44,6 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|||||||
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
// Pour autre que companylogo, on charge environnement + info issus de logon comme le user
|
||||||
if (($modulepart == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if (($modulepart == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
|
|
||||||
|
|
||||||
// C'est un wrapper, donc header vierge
|
// C'est un wrapper, donc header vierge
|
||||||
function llxHeader() { }
|
function llxHeader() { }
|
||||||
|
|
||||||
@ -52,6 +51,21 @@ function llxHeader() { }
|
|||||||
require("./main.inc.php");
|
require("./main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
// None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
if (GETPOST("cache"))
|
if (GETPOST("cache"))
|
||||||
{
|
{
|
||||||
@ -75,7 +89,6 @@ else $type=dol_mimetype($original_file);
|
|||||||
$original_file = str_replace("../","/", $original_file);
|
$original_file = str_replace("../","/", $original_file);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
|
||||||
$accessallowed=0;
|
$accessallowed=0;
|
||||||
if ($modulepart)
|
if ($modulepart)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user