diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 07ae3919f57..13b2d8d1669 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -8,6 +8,7 @@ * Copyright (C) 2005 Simon Tosser * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2015 Bahfir Abbes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,15 +67,12 @@ $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 (GETPOST('conf')) -{ - setcookie('dolconf', GETPOST('conf'),0,'/'); - $conffile = 'conf/' . dol_sanitizeFileName(GETPOST('conf')) . '.php'; -} -else -{ - $conffile = 'conf/' . dol_sanitizeFileName((!empty($_COOKIE['dolconf']) ? $_COOKIE['dolconf'] : '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'; }