This commit is contained in:
Laurent Destailleur 2016-02-05 12:18:50 +01:00
commit 062deae24c
4 changed files with 14 additions and 6 deletions

View File

@ -375,7 +375,7 @@ class CMailFile
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) 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 = new HookManager($db);
$hookmanager->initHooks(array( $hookmanager->initHooks(array(
'maildao' 'maildao'

View File

@ -589,9 +589,11 @@ function listOfSessions()
if(! @is_dir($fullpath) && is_readable($fullpath)) if(! @is_dir($fullpath) && is_readable($fullpath))
{ {
$sessValues = file_get_contents($fullpath); // get raw session data $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 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 preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name
{ {
$tmp=explode('_', $file); $tmp=explode('_', $file);

View File

@ -1578,7 +1578,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
/** /**
* Show left menu bar * 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). * @param string $helppagename Name of wiki page for help ('' by default).
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage
* For other external page: http://server/url * For other external page: http://server/url
@ -1597,6 +1597,8 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
$searchform=''; $searchform='';
$bookmarks=''; $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)) if (empty($conf->dol_hide_leftmenu))
{ {
// Instantiate hooks of thirdparty module // Instantiate hooks of thirdparty module

View File

@ -329,10 +329,14 @@ if (empty($reshook))
$object->status = GETPOST('statut'); $object->status = GETPOST('statut');
$object->status_buy = GETPOST('statut_buy'); $object->status_buy = GETPOST('statut_buy');
$object->status_batch = GETPOST('status_batch'); $object->status_batch = GETPOST('status_batch');
// removed from update view so GETPOST always empty
/*
$object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte');
$object->desiredstock = GETPOST('desiredstock'); $object->desiredstock = GETPOST('desiredstock');
$object->duration_value = $duration_value; */
$object->duration_unit = $duration_unit; $object->duration_value = GETPOST('duration_value');
$object->duration_unit = GETPOST('duration_unit');
$object->canvas = GETPOST('canvas'); $object->canvas = GETPOST('canvas');
$object->weight = GETPOST('weight'); $object->weight = GETPOST('weight');
$object->weight_units = GETPOST('weight_units'); $object->weight_units = GETPOST('weight_units');