From c0412acdea3ee24faf0a8cb0909508c49eb685fc Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 27 Jul 2015 13:03:47 +0200 Subject: [PATCH 1/3] FIX : #3318 --- htdocs/adherents/admin/public.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 740a5c97879..088f96b00c1 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -215,7 +215,12 @@ dol_fiche_end(); print '
'; //print $langs->trans('FollowingLinksArePublic').'
'; print img_picto('','object_globe.png').' '.$langs->trans('BlankSubscriptionForm').':
'; -print ''.DOL_MAIN_URL_ROOT.'/public/members/new.php'; +if ($conf->multicompany->enabled) { + $entity_qr='?entity='.$conf->entity; +} else { + $entity_qr=''; +} +print ''.DOL_MAIN_URL_ROOT.'/public/members/new.php'.$entity_qr.''; /* print ''; From d78292b9af3b5e477ae4587fc9cc08dd79896055 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 27 Jul 2015 22:08:33 +0200 Subject: [PATCH 2/3] FIX : if multicompany enabled, call to undifend method _setCookie instead of setCookie --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8fbd48bc855..cd8377ca5a8 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -660,7 +660,7 @@ if (! defined('NOLOGIN')) $cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' ); $entityCookie = new DolCookie($cryptkey); - $entityCookie->_setCookie($entityCookieName, $entity, $ttl); + $entityCookie->setCookie($entityCookieName, $entity, $ttl); } // Hooks on successfull login From 517e9094da6fcee5c3594140f2f965550b7d282e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 27 Jul 2015 22:34:30 +0200 Subject: [PATCH 3/3] FIX : Avoid warning strict mode when hosting server do not have php5_curl installed --- htdocs/core/lib/json.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index ba7f4cd3f90..ca79c21e9ef 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -251,7 +251,9 @@ function dol_json_decode($json, $assoc=false) if (! empty($array)) { $object = false; - + if (count($array)>0) { + $object = (object) array(); + } foreach ($array as $key => $value) { if ($key) $object->{$key} = $value;