debut ajout pour installer sous postgresql

This commit is contained in:
opensides 2004-08-24 07:01:36 +00:00
parent 0a40f047c9
commit 746ccfbd6d
2 changed files with 21 additions and 3 deletions

View File

@ -84,6 +84,9 @@ if ($_POST["action"] == "set")
fputs($fp, '$dolibarr_main_db_pass="'.$_POST["db_pass"].'";');
fputs($fp,"\n");
fputs($fp, '$dolibarr_main_db_type="'.$_POST["db_type"].'";');
fputs($fp,"\n");
fputs($fp, '?>');
fclose($fp);

View File

@ -82,8 +82,8 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
// 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"])) {
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];
if (! eregi('\/dolibarr\/htdocs$',$dolibarr_main_document_root)) {
$dolibarr_main_document_root.="/dolibarr/htdocs";
if (! eregi('\/dolibarr\/htdocs$',$dolibarr_main_document_root)) {
$dolibarr_main_document_root.="/dolibarr/htdocs";
}
}
else {
@ -91,7 +91,7 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
# Nettoyage du path proposé
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root); # Gere les chemins windows avec double "\"
$dolibarr_main_document_root = ereg_replace('[\\\\\/]$','',$dolibarr_main_document_root); # Supprime le "\" ou "/" de fin
}
}
}
print $dolibarr_main_document_root;
?>
@ -162,6 +162,21 @@ $dolibarr_main_db_host = "localhost";
}
?>
<tr>
<!-- moi-->
<td valign="top" class="label">Choix de la base de données</td>
<td> <select name="db_type">
<option value="<?PHP print $dolibarr_main_db_type ?>">Mysql</option>
<option value="<?PHP print $dolibarr_main_db_type ?>">PostgreSql</option>
</select>
</td>
<td valign="comment">Nom de la base de donnée qui est soit MySql par défaut ou alors PostgreSql.</td>
</tr>
<br>
<td valign="top" class="label">Serveur</td>
<td valign="top" class="label"><input type="text" name="db_host" value="<?PHP print $dolibarr_main_db_host ?>"></td>