Skip to content
Snippets Groups Projects
Commit 1e505434 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1331 from GPCsolutions/35b-review

Fixes for 3.5 beta
parents 6c266842 e2455582
Branches
Tags
No related merge requests found
...@@ -59,6 +59,8 @@ class Contact extends CommonObject ...@@ -59,6 +59,8 @@ class Contact extends CommonObject
var $country_code; // Code of country var $country_code; // Code of country
var $country; // Label of country var $country; // Label of country
var $poste; // Position
var $socid; // fk_soc var $socid; // fk_soc
var $statut; // 0=inactif, 1=actif var $statut; // 0=inactif, 1=actif
......
...@@ -812,7 +812,7 @@ function write_conf_file($conffile) ...@@ -812,7 +812,7 @@ function write_conf_file($conffile)
fputs($fp, '$dolibarr_main_document_root=\''.str_replace("'","\'",($main_dir)).'\';'); fputs($fp, '$dolibarr_main_document_root=\''.str_replace("'","\'",($main_dir)).'\';');
fputs($fp,"\n"); fputs($fp,"\n");
fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",($main_url."/".$main_alt_dir_name)).'\';'); fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",("/".$main_alt_dir_name)).'\';');
fputs($fp,"\n"); fputs($fp,"\n");
fputs($fp, $main_use_alt_dir.'$dolibarr_main_document_root_alt=\''.str_replace("'","\'",($main_dir."/".$main_alt_dir_name)).'\';'); fputs($fp, $main_use_alt_dir.'$dolibarr_main_document_root_alt=\''.str_replace("'","\'",($main_dir."/".$main_alt_dir_name)).'\';');
......
...@@ -78,9 +78,14 @@ if (! empty($dolibarr_main_document_root_alt)) ...@@ -78,9 +78,14 @@ if (! empty($dolibarr_main_document_root_alt))
{ {
if (preg_match('/^http(s)?:/',$value)) if (preg_match('/^http(s)?:/',$value))
{ {
print 'Error: values for <b>$dolibarr_main_url_root_alt</b> into <b>conf.php</b> file must contains relative path added to $dolibarr_main_url_root to get alternative URLs.<br>'."\n"; // TODO: Make this a warning rather than an error since the correct value can be derived in most cases
print "Found: \"".$value."\"<br>\n"; $correct_value = str_replace($dolibarr_main_url_root, '', $value);
print "Should found something like following examples:<br>\n"; print '<b>Error:</b><br>'."\n";
print 'Wrong <b>$dolibarr_main_url_root_alt</b> value in <b>conf.php</b> file.<br>'."\n";
print 'We now use a relative path to $dolibarr_main_url_root to build alternate URLs.<br>'."\n";
print 'Value found: '.$value.'<br>'."\n";
print 'Should be replaced by: '.$correct_value.'<br>'."\n";
print "Or something like following examples:<br>\n";
print "\"/extensions\"<br>\n"; print "\"/extensions\"<br>\n";
print "\"/extensions1,/extensions2,...\"<br>\n"; print "\"/extensions1,/extensions2,...\"<br>\n";
print "\"/../extensions\"<br>\n"; print "\"/../extensions\"<br>\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment