mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add possibility to defined "main_force_https" in install mode
This commit is contained in:
parent
635b44b906
commit
2ae1a4ae2f
|
|
@ -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');
|
||||
|
|
@ -201,6 +201,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)
|
||||
|
|
@ -559,6 +562,9 @@ function write_conf_file($conffile)
|
|||
/* Authentication */
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user