Modif suite a retour test
This commit is contained in:
parent
43e141629d
commit
8acd1fa23e
@ -43,8 +43,8 @@ pHeader($langs->trans("DolibarrWelcome"),""); // Etape suivante = license
|
|||||||
|
|
||||||
print $langs->trans("InstallEasy")."<br>";
|
print $langs->trans("InstallEasy")."<br>";
|
||||||
|
|
||||||
// Si fichier présent et lisible
|
// Si fichier présent et lisible et renseigné
|
||||||
if (is_readable($conffile))
|
if (is_readable($conffile) && sizeof($conffile) > 8)
|
||||||
{
|
{
|
||||||
$confexists=1;
|
$confexists=1;
|
||||||
include_once($conffile);
|
include_once($conffile);
|
||||||
@ -74,29 +74,30 @@ else
|
|||||||
if (!file_exists($conffile))
|
if (!file_exists($conffile))
|
||||||
{
|
{
|
||||||
print "<br /><br />";
|
print "<br /><br />";
|
||||||
print "Le fichier de configuration <b>conf.php</b> n'existe pas !";
|
print $langs->trans("ConfFileDoesNotExists",'conf.php');
|
||||||
print "<br />";
|
print "<br />";
|
||||||
print "Vous devez créer un fichier <b>htdocs/conf/conf.php</b> et donner les droits d'écriture dans celui-ci au serveur web durant le processus d'installation.";
|
print $langs->trans("YouMustCreateWithPermission",'htdocs/conf/conf.php');
|
||||||
print "<br /><br />";
|
print "<br /><br />";
|
||||||
|
|
||||||
print 'Corrigez le problème et <a href="index.php">rechargez la page</a>.';
|
print $langs->trans("CorrectProblemAndReloadPage");
|
||||||
|
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<br />\n";
|
print "<br />\n";
|
||||||
// Si ficiher présent mais ne peut etre modifié
|
// Si fichier présent mais ne peut etre modifié
|
||||||
if (!is_writable($conffile))
|
if (!is_writable($conffile))
|
||||||
{
|
{
|
||||||
if ($confexists) {
|
if ($confexists)
|
||||||
print $langs->trans("ConfFileExists");
|
{
|
||||||
|
print $langs->trans("ConfFileExists",'conf.php');
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
print $langs->trans("ConfFileCouldBeCreated");
|
{
|
||||||
|
print $langs->trans("ConfFileCouldBeCreated",'conf.php');
|
||||||
}
|
}
|
||||||
print "<br />";
|
print "<br />";
|
||||||
print $langs->trans("ConfFileIsNotWritable");
|
print $langs->trans("ConfFileIsNotWritable",'htdocs/conf/conf.php');
|
||||||
print "<br />";
|
print "<br />";
|
||||||
|
|
||||||
$allowinstall=0;
|
$allowinstall=0;
|
||||||
@ -104,14 +105,16 @@ else
|
|||||||
// Si fichier présent et peut etre modifié
|
// Si fichier présent et peut etre modifié
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($confexists) {
|
if ($confexists)
|
||||||
print $langs->trans("ConfFileExists");
|
{
|
||||||
|
print $langs->trans("ConfFileExists",'conf.php');
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
print $langs->trans("ConfFileCouldBeCreated");
|
{
|
||||||
|
print $langs->trans("ConfFileCouldBeCreated",'conf.php');
|
||||||
}
|
}
|
||||||
print "<br />";
|
print "<br />";
|
||||||
print $langs->trans("ConfFileIsWritable");
|
print $langs->trans("ConfFileIsWritable",'conf.php');
|
||||||
print "<br />";
|
print "<br />";
|
||||||
|
|
||||||
$allowinstall=1;
|
$allowinstall=1;
|
||||||
|
|||||||
@ -56,10 +56,11 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
|
|||||||
{
|
{
|
||||||
// Si le php fonctionne en CGI, alors SCRIPT_FILENAME vaut le path du php et
|
// Si le php fonctionne en CGI, alors SCRIPT_FILENAME vaut le path du php et
|
||||||
// ce n'est pas ce qu'on veut. Dans ce cas, on propose $_SERVER["DOCUMENT_ROOT"]
|
// ce n'est pas ce qu'on veut. Dans ce cas, on propose $_SERVER["DOCUMENT_ROOT"]
|
||||||
if (eregi('php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"])) {
|
if (eregi('php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"]))
|
||||||
|
{
|
||||||
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];
|
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];
|
||||||
|
|
||||||
if (! eregi('\/dolibarr/htdocs$',$dolibarr_main_document_root))
|
if (! eregi('[\/\\]dolibarr[\/\\]htdocs$',$dolibarr_main_document_root))
|
||||||
{
|
{
|
||||||
$dolibarr_main_document_root.="/dolibarr/htdocs";
|
$dolibarr_main_document_root.="/dolibarr/htdocs";
|
||||||
}
|
}
|
||||||
@ -67,12 +68,12 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"]) - 21);
|
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"]) - 21);
|
||||||
// Nettoyage du path proposé
|
// Nettoyage du path propose
|
||||||
// Gere les chemins windows avec double "\"
|
// Gere les chemins windows avec double "\"
|
||||||
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root);
|
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root);
|
||||||
|
|
||||||
// Supprime le slash ou antislash final
|
// Supprime les slash ou antislash de fins
|
||||||
$dolibarr_main_document_root = ereg_replace('[\\\\\/]$','',$dolibarr_main_document_root);
|
$dolibarr_main_document_root = ereg_replace('[\\\/]+$','',$dolibarr_main_document_root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,8 +163,8 @@ $dolibarr_main_db_host = "localhost";
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="label"><select name='db_type'>
|
<td class="label"><select name='db_type'>
|
||||||
<option value='mysql'<?php echo (!$dolibarr_main_db_type||$dolibarr_main_db_type=='mysql')?" selected":"" ?>>MySql</option>
|
<option value='mysql'<?php echo (! isset($dolibarr_main_db_type) || $dolibarr_main_db_type=='mysql')?" selected":"" ?>>MySql</option>
|
||||||
<option value='pgsql'<?php echo ($dolibarr_main_db_type=='pgsql')?" selected":"" ?>>PostgreSQL <?php echo $langs->trans("Experimental"); ?></option>
|
<option value='pgsql'<?php echo (isset($dolibarr_main_db_type) && $dolibarr_main_db_type=='pgsql')?" selected":"" ?>>PostgreSQL <?php echo $langs->trans("Experimental"); ?></option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@ -178,8 +179,8 @@ $dolibarr_main_db_host = "localhost";
|
|||||||
<td valign="top" class="label">
|
<td valign="top" class="label">
|
||||||
<?php echo $langs->trans("Server"); ?>
|
<?php echo $langs->trans("Server"); ?>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" class="label"><input type="text" name="db_host" value="<?php print $dolibarr_main_db_host ?>">
|
<td valign="top" class="label"><input type="text" name="db_host" value="<?php print isset($dolibarr_main_db_host)?$dolibarr_main_db_host:''; ?>">
|
||||||
<input type="hidden" name="base" value="<?php print $test_base?>">
|
<input type="hidden" name="base" value="">
|
||||||
</td>
|
</td>
|
||||||
<td class="comment">
|
<td class="comment">
|
||||||
Nom ou adresse ip du serveur de base de données, généralement 'localhost' quand le serveur est installé sur la même machine que le serveur web
|
Nom ou adresse ip du serveur de base de données, généralement 'localhost' quand le serveur est installé sur la même machine que le serveur web
|
||||||
@ -192,7 +193,7 @@ Nom ou adresse ip du serveur de base de donn
|
|||||||
<?php echo $langs->trans("DatabaseName"); ?>
|
<?php echo $langs->trans("DatabaseName"); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="label" valign="top"><input type="text" name="db_name" value="<?php echo $dolibarr_main_db_name ?>"></td>
|
<td class="label" valign="top"><input type="text" name="db_name" value="<?php echo isset($dolibarr_main_db_name)?$dolibarr_main_db_name:''; ?>"></td>
|
||||||
<td class="comment">
|
<td class="comment">
|
||||||
<?php echo $langs->trans("DatabaseName"); ?>
|
<?php echo $langs->trans("DatabaseName"); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -213,7 +214,7 @@ Nom ou adresse ip du serveur de base de donn
|
|||||||
<td class="label" valign="top">
|
<td class="label" valign="top">
|
||||||
<?php echo $langs->trans("Login"); ?>
|
<?php echo $langs->trans("Login"); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="label" valign="top"><input type="text" name="db_user" value="<?php print isset($dolibarr_main_db_user)?$dolibarr_main_db_user:'' ?>"></td>
|
<td class="label" valign="top"><input type="text" name="db_user" value="<?php print isset($dolibarr_main_db_user)?$dolibarr_main_db_user:''; ?>"></td>
|
||||||
<td class="comment">
|
<td class="comment">
|
||||||
<?php echo $langs->trans("AdminLogin"); ?>
|
<?php echo $langs->trans("AdminLogin"); ?>
|
||||||
</td>
|
</td>
|
||||||
@ -223,7 +224,7 @@ Nom ou adresse ip du serveur de base de donn
|
|||||||
<td class="label" valign="top">
|
<td class="label" valign="top">
|
||||||
<?php echo $langs->trans("Password"); ?>
|
<?php echo $langs->trans("Password"); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="label" valign="top"><input type="text" name="db_pass" value="<?php print isset($dolibarr_main_db_pass)?$dolibarr_main_db_pass:'' ?>"></td>
|
<td class="label" valign="top"><input type="text" name="db_pass" value="<?php print isset($dolibarr_main_db_pass)?$dolibarr_main_db_pass:''; ?>"></td>
|
||||||
<td class="comment">
|
<td class="comment">
|
||||||
<?php echo $langs->trans("AdminPassword"); ?>
|
<?php echo $langs->trans("AdminPassword"); ?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user