From 94ccb44673c6485c7695ef11caf8817a903a73d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 May 2018 11:02:44 +0200 Subject: [PATCH] Fix bad url wor external subscription page --- htdocs/adherents/admin/website.php | 8 +++++++- htdocs/admin/agenda_xcal.php | 4 +--- 2 files changed, 8 insertions(+), 4 deletions(-) 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');