From e22664b8cfce36e9d173e57448190ce5f734d33e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Feb 2016 01:00:10 +0100 Subject: [PATCH 1/4] FIX #4528 --- htdocs/core/lib/admin.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index e7630756127..12470310ae4 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -587,9 +587,11 @@ function listOfSessions() if(! @is_dir($fullpath) && is_readable($fullpath)) { $sessValues = file_get_contents($fullpath); // get raw session data - + // Example of possible value + //$sessValues = 'newtoken|s:32:"1239f7a0c4b899200fe9ca5ea394f307";dol_loginmesg|s:0:"";newtoken|s:32:"1236457104f7ae0f328c2928973f3cb5";dol_loginmesg|s:0:"";token|s:32:"123615ad8d650c5cc4199b9a1a76783f";dol_login|s:5:"admin";dol_authmode|s:8:"dolibarr";dol_tz|s:1:"1";dol_tz_string|s:13:"Europe/Berlin";dol_dst|i:0;dol_dst_observed|s:1:"1";dol_dst_first|s:0:"";dol_dst_second|s:0:"";dol_screenwidth|s:4:"1920";dol_screenheight|s:3:"971";dol_company|s:12:"MyBigCompany";dol_entity|i:1;mainmenu|s:4:"home";leftmenuopened|s:10:"admintools";idmenu|s:0:"";leftmenu|s:10:"admintools";'; + if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity + (preg_match('/dol_entity\|i:'.$conf->entity.';/i',$sessValues) || preg_match('/dol_entity\|s:([0-9]+):"'.$conf->entity.'"/i',$sessValues)) && // limit to current entity preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name { $tmp=explode('_', $file); From 5f7cb75518168d679657b110eec382c26f529b54 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 3 Feb 2016 19:52:09 +0100 Subject: [PATCH 2/4] Fix #4556 desiredstock and seuil_stock_alerte cleared on modify product card removed inputs from update form also removed from update action --- htdocs/product/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index dbadd69cdcb..e6b48974d0b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -321,8 +321,11 @@ if (empty($reshook)) $object->status = GETPOST('statut'); $object->status_buy = GETPOST('statut_buy'); $object->status_batch = GETPOST('status_batch'); + // removed from update view + /* $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $object->desiredstock = GETPOST('desiredstock'); + */ $object->duration_value = GETPOST('duration_value'); $object->duration_unit = GETPOST('duration_unit'); $object->canvas = GETPOST('canvas'); From a65660712267f780dc47d812fe5e3e4679263c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 4 Feb 2016 17:12:58 +0100 Subject: [PATCH 3/4] Update CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b3da46ff366..9f6f0995ded 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -375,7 +375,7 @@ class CMailFile if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { - dol_include_once('/core/class/hookmanager.class.php'); + require_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); $hookmanager->initHooks(array( 'maildao' From 69e0f1ebc3405af903067c49a32582ec7b741265 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2016 17:55:30 +0100 Subject: [PATCH 4/4] Add log to help debug --- htdocs/main.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 25176c6bc93..39fd1a8eb1a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1501,7 +1501,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a /** * Show left menu bar * - * @param array $menu_array_before Table of menu entries to show before entries of menu handler + * @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''. * @param string $helppagename Name of wiki page for help ('' by default). * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * For other external page: http://server/url @@ -1519,6 +1519,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me $searchform=''; $bookmarks=''; + if (! empty($menu_array_before)) dol_syslog("Deprecated parameter menu_array_before was used when calling main::left_menu function. Menu entries of module should now be defined into module descriptor and not provided when calling left_menu.", LOG_WARNING); + if (empty($conf->dol_hide_leftmenu)) { // Instantiate hooks of thirdparty module