From e19af2e5862844e1ffadada252bc50ddb0d31975 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Wed, 29 Sep 2010 08:16:47 +0000
Subject: [PATCH] Sec: If conf.php file is write protected, then all first
 install process is locked.

---
 htdocs/install/etape0.php       | 2 +-
 htdocs/langs/en_US/install.lang | 2 +-
 htdocs/langs/fr_FR/install.lang | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php
index a0e4cad248a..bb3fc844df0 100644
--- a/htdocs/install/etape0.php
+++ b/htdocs/install/etape0.php
@@ -60,7 +60,7 @@ dolibarr_install_syslog("etape0: Entering etape0.php page");
 pHeader($langs->trans("ConfigurationFile"),"etape1");
 
 // Test if we can run a first install process
-if (is_writable($conffile))
+if (! is_writable($conffile))
 {
     print $langs->trans("ConfFileIsNotWritable",'htdocs/conf/conf.php');
     pFooter(1,$setuplang,'jscheckparam');
diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang
index d9094faf7b0..179ed3a0a30 100644
--- a/htdocs/langs/en_US/install.lang
+++ b/htdocs/langs/en_US/install.lang
@@ -94,7 +94,7 @@ DirectoryRecommendation=It is recommanded to use a directory outside of your dir
 LoginAlreadyExists=Already exists
 DolibarrAdminLogin=Dolibarr admin login
 AdminLoginAlreadyExists=Dolibarr administrator account '<b>%s</b>' already exists.
-WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should remove the <b>install<b> directory or rename it to <b>install.lock</b> in order to avoid its malicious use.
+WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should remove the <b>install<b> directory or add a file called <b>install.lock</b> into Dolibarr root directory, in order to avoid malicious use of it.
 ThisPHPDoesNotSupportTypeBase=This PHP system does not support any interface to access database type %s
 FunctionNotAvailableInThisPHP=Not available on this PHP
 MigrateScript=Migration script
diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang
index 1acd64200ed..763bbe38eb8 100644
--- a/htdocs/langs/fr_FR/install.lang
+++ b/htdocs/langs/fr_FR/install.lang
@@ -95,7 +95,7 @@ LoginAlreadyExists=Existe déjà
 DolibarrAdminLogin=Login de l'utilisateur administrateur de Dolibarr
 FailedToCreateAdminLogin=Echec de la création du compte administrateur Dolibarr.
 AdminLoginAlreadyExists=Compte administrateur Dolibarr '<b>%s</b>' déjà existant.
-WarningRemoveInstallDir=Attention, pour des raisons de sécurité, une fois l'installation terminée, il est conseillé de supprimer manuellement le répertoire <b>install</b>, ou d'y placer un fichier nommé <b>install.lock</b> en lecture seule.
+WarningRemoveInstallDir=Attention, pour des raisons de sécurité, une fois l'installation terminée, il est conseillé de supprimer manuellement le répertoire <b>install</b>, ou de placer dans le répertoire racine de Dolibarr un fichier nommé <b>install.lock</b> en lecture seule.
 ThisPHPDoesNotSupportTypeBase=Le système PHP ne supporte pas les interfaces d'accès pour les bases %s
 FunctionNotAvailableInThisPHP=Non disponible sur ce PHP
 MigrateScript=Script de migration
-- 
GitLab