Skip to content
Snippets Groups Projects
Commit 21a6fd1c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2633 from bafbes/develop

NEW : dev feature : replace conf filename with "conf" parameter on url b...
parents f80674f1 4c8dc1ba
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,14 @@ $conffiletoshow = "htdocs/conf/conf.php";
//$conffile = "/etc/dolibarr/conf.php";
//$conffiletoshow = "/etc/dolibarr/conf.php";
//replace conf filename with "conf" parameter on url by GET
if (!empty($_GET['conf'])) {
setcookie('dolconf', $_GET['conf'],0,'/');
$conffile = 'conf/' . $_GET['conf'] . '.php';
} else {
$conffile = 'conf/' . (!empty($_COOKIE['dolconf']) ? $_COOKIE['dolconf'] : 'conf') . '.php';
}
// Include configuration
$result=@include_once $conffile; // Keep @ because with some error reporting this break the redirect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment