Ajout main_data_dir
This commit is contained in:
parent
da702c6586
commit
a1cec2dc9d
@ -69,7 +69,6 @@ if ($err == 0)
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" class="label">
|
||||
@ -79,15 +78,15 @@ if ($err == 0)
|
||||
|
||||
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
|
||||
# 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"];
|
||||
// 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"]
|
||||
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";
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
}
|
||||
else {
|
||||
$dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"])- 21 );
|
||||
# Nettoyage du path proposé
|
||||
$dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root); # Gere les chemins windows avec double "\"
|
||||
@ -105,6 +104,25 @@ exemples :<br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="label">
|
||||
<?php print "Répertoire contenant les documents générés"; ?>
|
||||
</td><td class="label" valign="top"><input type="text" size="60" value="
|
||||
<?PHP
|
||||
|
||||
print ereg_replace("htdocs","documents",$dolibarr_main_document_root);
|
||||
?>
|
||||
" name="main_data_dir">
|
||||
</td><td class="comment">
|
||||
Sans le slash "/" à la fin<br>
|
||||
exemples :<br>
|
||||
<li>/var/www/dolibarr/documents</li>
|
||||
<li>C:/wwwroot/dolibarr/documents</li>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="label">
|
||||
URL Racine</td><td valign="top" class="label"><input type="text" size="60" name="main_url" value="
|
||||
|
||||
Loading…
Reference in New Issue
Block a user