From f71b39b1c3279abbffdd4aa5ab3a5dd75a04a711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Wed, 27 Nov 2013 15:19:24 +0100 Subject: [PATCH 1/3] Added missing class member --- htdocs/contact/class/contact.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index bff890a09b7..024cc4922d1 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -59,6 +59,8 @@ class Contact extends CommonObject var $country_code; // Code of country var $country; // Label of country + var $poste; // Position + var $socid; // fk_soc var $statut; // 0=inactif, 1=actif From 771d576e2bd14a0a87081fc0f22fef94d8bec29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 29 Nov 2013 17:22:46 +0100 Subject: [PATCH 2/3] Better error wording --- htdocs/master.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 161cb4aa30e..da7642e8df4 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -78,9 +78,14 @@ if (! empty($dolibarr_main_document_root_alt)) { if (preg_match('/^http(s)?:/',$value)) { - print 'Error: values for $dolibarr_main_url_root_alt into conf.php file must contains relative path added to $dolibarr_main_url_root to get alternative URLs.
'."\n"; - print "Found: \"".$value."\"
\n"; - print "Should found something like following examples:
\n"; + // TODO: Make this a warning rather than an error since the correct value can be derived in most cases + $correct_value = str_replace($dolibarr_main_url_root, '', $value); + print 'Error:
'."\n"; + print 'Wrong $dolibarr_main_url_root_alt value in conf.php file.
'."\n"; + print 'We now use a relative path to $dolibarr_main_url_root to build alternate URLs.
'."\n"; + print 'Value found: '.$value.'
'."\n"; + print 'Should be replaced by: '.$correct_value.'
'."\n"; + print "Or something like following examples:
\n"; print "\"/extensions\"
\n"; print "\"/extensions1,/extensions2,...\"
\n"; print "\"/../extensions\"
\n"; From e24555822e74eb5c8f3103382068138b7c56e7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 29 Nov 2013 17:28:17 +0100 Subject: [PATCH 3/3] Fixed install generated $dolibarr_main_url_root_alt path We now use relative paths. So let's remove the absolute part from the install generated configuration file. --- htdocs/install/etape1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index a932a2fb67f..1671d7d976e 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -812,7 +812,7 @@ function write_conf_file($conffile) fputs($fp, '$dolibarr_main_document_root=\''.str_replace("'","\'",($main_dir)).'\';'); 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, $main_use_alt_dir.'$dolibarr_main_document_root_alt=\''.str_replace("'","\'",($main_dir."/".$main_alt_dir_name)).'\';');