diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php
index 0a560c402fd..b35df5f0083 100644
--- a/htdocs/adherents/admin/website.php
+++ b/htdocs/adherents/admin/website.php
@@ -241,7 +241,13 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
} else {
$entity_qr='';
}
- print ''.DOL_MAIN_URL_ROOT.'/public/members/new.php'.$entity_qr.'';
+
+ // Define $urlwithroot
+ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
+ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
+ //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
+
+ print ''.$urlwithroot.'/public/members/new.php'.$entity_qr.'';
}
diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php
index ac19eb24c03..ab0effc2c45 100644
--- a/htdocs/admin/agenda_xcal.php
+++ b/htdocs/admin/agenda_xcal.php
@@ -32,9 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
if (!$user->admin)
accessforbidden();
-$langs->load("admin");
-$langs->load("other");
-$langs->load("agenda");
+$langs->loadLangs(array("admin","other","agenda"));
$def = array();
$actionsave=GETPOST('save','alpha');