From cdd256e20618e80dd692522bbef59accb466d595 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Nov 2014 12:00:42 +0100 Subject: [PATCH 1/4] Add info to help understand debug --- htdocs/main.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cf01d5d0364..1182752eace 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1300,7 +1300,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') { global $user, $conf, $langs, $db; - global $dolibarr_main_authentication; + global $dolibarr_main_authentication, $dolibarr_main_demo; global $hookmanager,$menumanager; // Instantiate hooks of thirdparty module @@ -1410,7 +1410,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $logintext.='>'.$user->login.''; if ($user->societe_id) $logintext.=$companylink; $logintext.=''; - $loginhtmltext.=''.$langs->trans("User").''; $loginhtmltext.='
'.$langs->trans("Name").': '.$user->getFullName($langs); $loginhtmltext.='
'.$langs->trans("Login").': '.$user->login; @@ -1422,9 +1421,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $loginhtmltext.='
'; $loginhtmltext.='
'.$langs->trans("Connection").''; if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $loginhtmltext.='
'.$langs->trans("ConnectedOnMultiCompany").': '.$conf->entity.' (user entity '.$user->entity.')'; + $loginhtmltext.='
'.$langs->trans("AuthenticationMode").': '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)'); $loginhtmltext.='
'.$langs->trans("ConnectedSince").': '.dol_print_date($user->datelastlogin,"dayhour"); $loginhtmltext.='
'.$langs->trans("PreviousConnexion").': '.dol_print_date($user->datepreviouslogin,"dayhour"); - $loginhtmltext.='
'.$langs->trans("AuthenticationMode").': '.$_SESSION["dol_authmode"]; $loginhtmltext.='
'.$langs->trans("CurrentTheme").': '.$conf->theme; $loginhtmltext.='
'.$langs->trans("CurrentMenuManager").': '.$menumanager->name; $s=picto_from_langcode($langs->getDefaultLang()); From e118d9af2233feabc460b0223fd3feab82bc64e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Nov 2014 12:11:12 +0100 Subject: [PATCH 2/4] Fixed: Protection to lock language setup in demo mode was not working --- htdocs/core/class/html.formadmin.class.php | 5 +++-- htdocs/user/param_ihm.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 042474781d7..30ecadedb55 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -53,9 +53,10 @@ class FormAdmin * @param array $filter Array of keys to exclude in list * @param int $showempty Add empty value * @param int $showwarning Show a warning if language is not complete + * @param int $disabled Disable edit of select * @return string Return HTML select string with list of languages */ - function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0) + function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0,$disabled=0) { global $langs; @@ -63,7 +64,7 @@ class FormAdmin $out=''; - $out.= ''; if ($showempty) { $out.= '