|
@@ -38,22 +38,25 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
|
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|
|
|
|
|
// For bittorent link, we don't need to load/check we are into a login session
|
|
|
-if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'bittorrent' && ! defined("NOLOGIN"))
|
|
|
+if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'bittorrent')
|
|
|
{
|
|
|
- define("NOLOGIN",1);
|
|
|
- define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOLOGIN")) define("NOLOGIN",1);
|
|
|
+ if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOIPCHECK")) define("NOIPCHECK",1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
|
|
}
|
|
|
// For direct external download link, we don't need to load/check we are into a login session
|
|
|
-if (isset($_GET["hashp"]) && ! defined("NOLOGIN"))
|
|
|
+if (isset($_GET["hashp"]))
|
|
|
{
|
|
|
- define("NOLOGIN",1);
|
|
|
- define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOLOGIN")) define("NOLOGIN",1);
|
|
|
+ if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOIPCHECK")) define("NOIPCHECK",1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
|
|
}
|
|
|
// Some value of modulepart can be used to get resources that are public so no login are required.
|
|
|
-if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN"))
|
|
|
+if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias'))
|
|
|
{
|
|
|
- define("NOLOGIN",1);
|
|
|
- define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOLOGIN")) define("NOLOGIN",1);
|
|
|
+ if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
|
|
+ if (! defined("NOIPCHECK")) define("NOIPCHECK",1); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
|
|
}
|
|
|
|
|
|
/**
|