Skip to content
Snippets Groups Projects
Commit 2ae1a4ae authored by Regis Houssin's avatar Regis Houssin
Browse files

Add possibility to defined "main_force_https" in install mode

parent 635b44b9
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@
* \version $Id$
*/
define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
include("./inc.php");
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
......@@ -202,6 +202,9 @@ if ($_POST["action"] == "set")
}
}
// Force https
$_POST["main_force_https"] = ((isset($_POST["main_force_https"]) && $_POST["main_force_https"] == "on")?'1':'0');
// Write conf file on disk
if (! $error)
{
......@@ -560,6 +563,9 @@ function write_conf_file($conffile)
fputs($fp, '$dolibarr_main_authentication=\'dolibarr\';');
fputs($fp,"\n");
fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';');
fputs($fp,"\n");
fputs($fp, '?>');
fclose($fp);
......
......@@ -198,6 +198,15 @@ print $langs->trans("Examples").":<br>";
</ul>
</tr>
<tr>
<td valign="top" class="label">
<?php echo $langs->trans("ForceHttps"); ?>
<td class="label" valign="top"><input type="checkbox" name="main_force_https"<?php if ($force_install_mainforcehttps) print ' checked="on"'; ?>></td>
<td class="comment">
<?php echo $langs->trans("CheckToForceHttps"); ?>
</td>
</tr>
<!-- Dolibarr database -->
<tr>
......
......@@ -38,6 +38,8 @@ ConfigurationFile=Configuration file
WebPagesDirectory=Directory where web pages are stored
DocumentsDirectory=Directory to store uploaded and generated documents
URLRoot=URL Root
ForceHttps=Force secure connections (https)
CheckToForceHttps=Check this option to force secure connections (https).<br>This requires that the web server is configured with an SSL certificate.
DolibarrDatabase=Dolibarr Database
DatabaseChoice=Database choice
DatabaseType=Database type
......
......@@ -38,6 +38,8 @@ ConfigurationFile=Fichier de configuration
WebPagesDirectory=Répertoire contenant les pages web
DocumentsDirectory=Répertoire devant contenir les documents générés (PDF, etc.)
URLRoot=URL Racine
ForceHttps=Forcer les connexions sécurisées (https)
CheckToForceHttps=Cochez cette option pour forcer les connexions sécurisées (https).<br>Ceci nécessite que le serveur web soit configuré avec un certificat SSL.
DolibarrDatabase=Base de données Dolibarr
DatabaseChoice=Choix de la base de données
DatabaseType=Type de la base de données
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment