diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 68cef93587d..4d0a7ff6f1f 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2005-2010 Regis Houssin * * 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 @@ -158,7 +159,7 @@ if ($_POST["action"] == "set") $dir[0] = "$main_data_dir/facture"; $dir[1] = "$main_data_dir/users"; $dir[2] = "$main_data_dir/propale"; - $dir[3] = "$main_data_dir/societe"; + $dir[3] = "$main_data_dir/mycompany"; $dir[4] = "$main_data_dir/ficheinter"; $dir[5] = "$main_data_dir/produit"; $dir[6] = "$main_data_dir/rapport"; @@ -204,6 +205,13 @@ if ($_POST["action"] == "set") // Write conf file on disk if (! $error) { + // Save old conf file on disk + if (file_exists("$conffile")) + { + $oldcontent = dol_openfile($conffile, 'r', ''); + if (! dol_openfile($conffile.'.old', 'w', $oldcontent)) $error++; + } + $error+=write_conf_file($conffile); } diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 90c55868702..fa37a53852f 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -30,6 +30,7 @@ define('DOL_VERSION','2.8.0-dev'); // Also defined in htdocs/master.inc.php require_once('../translate.class.php'); require_once('../lib/functions.lib.php'); require_once('../lib/admin.lib.php'); +require_once('../lib/files.lib.php'); // DOL_DOCUMENT_ROOT has been defined in function.inc.php to '..'