From 771d576e2bd14a0a87081fc0f22fef94d8bec29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= <rdoursenaud@gpcsolutions.fr> Date: Fri, 29 Nov 2013 17:22:46 +0100 Subject: [PATCH] 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 <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"; - print "Found: \"".$value."\"<br>\n"; - print "Should found something like following examples:<br>\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 '<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 "\"/extensions1,/extensions2,...\"<br>\n"; print "\"/../extensions\"<br>\n"; -- GitLab