diff --git a/ChangeLog b/ChangeLog
index 20c79c28ce7..ef52f808ec7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,71 @@ Upgrading to any other version or any other database system is abolutely require
make a Dolibarr upgrade.
+***** ChangeLog for 3.9.1 compared to 3.9.* *****
+FIX: #3815 Call to undefined function local_by_date()
+FIX: #4424 Missing email of user popup in supplier orders area
+FIX: #4442 Missing translation in Banks menu
+FIX: #4737 Bank transacion type selector translation is cropped
+FIX: #4742 Able to delete a supplier invoice with a registered payment
+FIX: #4743 UI glitch in project summary page
+FIX: #4747 Missing UI background when registering a supplier invoice payment
+FIX: #4748 Supplier invoice payment confirmation amount is not translated
+FIX: #4766 VAT not shown in supplier invoice popup
+FIX: #4784
+FIX: #4809 Duplicate functions with different content
+FIX: #4812
+FIX: #4839
+FIX: #4851 Project selector in supplier invoices shows the project label twice
+FIX: #4870
+FIX: #4874 SQL error when listing users
+FIX: #4880
+FIX: #4961
+FIX: #4989
+FIX: If oauth has never been activated two tables are missing and printing is not working
+FIX: A not enabled field for list must not into fields to add
+FIX: Bad color of message password changed
+FIX: Bad error and style message when changing its own login
+FIX: Bad function name call on delete
+FIX: Bad include and param for project numbering module call
+FIX: bad translation language loaded FIX: When changing thirdparty on event card, the showempty option of contact was lost. FIX: Bad placeholder shown on combo to select a thirdparty.
+FIX: Bad vat definition when using POS module
+FIX: Box disabled because bugged
+FIX: Can not select a commercial on the creation of a third
+FIX: Check of EAN13 barcode when mask was set to use 13 digits instead of 12
+FIX: correct display of minimum buying price
+FIX: Creation of thumb image for size "small" was not done.
+FIX: Damn, where was the project ref ?
+FIX: Default vat is not set correctly when an error occured and we use VAT identified by a code.
+FIX: dont retrieve new buying price on margin display
+FIX: Duplicate records into export
+FIX: Each time we edit a line, we loose the unit price.
+FIX: Email templates not compatible with Multicompany
+FIX: Export must use a left join to not loose lines
+FIX: fetchAllEMailTemplate
+FIX: Filter/search on extrafields on lists
+FIX: finished parameters not used
+FIX: Generated thumbs must always use the png format so using thumbs can work.
+FIX: Hook resprint be printed
+FIX: image extension must be in lower case
+FIX: Missing clean of criteria
+FIX: Missing database escaping on supplier price insert/update
+FIX: Missing function
+FIX: Multiprice generator didn't recalculate prices if only the price_base_type property changes
+FIX: Not removing code into vatrate.
+FIX: Not showing sellprice properly on product list
+FIX: Parsing of amount to pay vat
+FIX: PHPCS
+FIX: PMP is deprecated at warehouse level
+FIX: real min buying price
+FIX: Same term to create than other objects
+FIX: Some records were lost into margin per product report
+FIX: systematic rounding causes prices to be updated without reason
+FIX: Template email must take care of positino column
+FIX: VAT rate can be negative. Example spain selling to morroco.
+FIX: When cloning an order the order result from clone must be now
+FIX: When using option Price per level, when adding a predefined product, the vat for customer was not correctly set.
+
+
***** ChangeLog for 3.9.0 compared to 3.8.* *****
For users:
NEW: A new and more modern look for "eldy" theme.
@@ -696,6 +761,23 @@ Dolibarr better:
- Function get_exdir require now 6 parameters. This is to prepare a future feature.
+***** ChangeLog for 3.7.4 compared to 3.7.3 *****
+FIX: #3694
+FIX: #4239
+FIX: #4291 Correctly filter external calendar GETPOSTs
+FIX: #4341
+FIX: #4414 Supplier invoices use FAC_FORCE_DATE_VALIDATION client invoices property
+FIX: #4440 Wrong price is filled by Product::fetch into multiprices arrays
+FIX: add missing global def for ttc column
+FIX: Contrat card don't consider user permissions to show active/unactive service button
+FIX: CVE CVE-2015-8685
+FIX: Email templates not compatible with Multicompany
+Fix: for avoid division by 0
+FIX: ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant
+FIX: $outputlangs is not defined (dolibarr 3.7, 3.8, 3.9)
+FIX: sql injection even when code is on several lines
+FIX: The third dashboard don't consider user permissions
+
***** ChangeLog for 3.7.3 compared to 3.7.2 *****
FIX: #3734 Do not show empty links of deleted source objects in stock movement list
FIX: #3890 Expected transactions bank account page, shows negative numbers
@@ -1028,6 +1110,11 @@ Dolibarr better:
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
+
+***** ChangeLog for 3.6.7 compared to 3.6.6 *****
+FIX: #4291 Correctly filter external calendar GETPOSTs
+FIX: CVE CVE-2015-8685
+
***** ChangeLog for 3.6.6 compared to 3.6.5 *****
FIX: #3734 Do not show empty links of deleted source objects in stock movement list
FIX: #4081 Added missing translation
@@ -1280,6 +1367,17 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
- Remove add_photo_web() that is not used anymore by core code.
+***** ChangeLog for 3.5.8 compared to 3.5.7 *****
+FIX: #4291 Correctly filter external calendar GETPOSTs
+FIX: bad calculation for stock value
+FIX: bad stock valo
+FIX: change order date on clone (as everywhere else)
+FIX: CVE CVE-2015-8685
+FIX: The hours of date filter aren't correct
+FIX: #3442 Remove useless syslog
+FIX: #3448 Pass expected date format
+FIX: #3471 3.5 Rounding issue when dispatching non-integer
+
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
Fix: Paypal link were broken due to SSL v3 closed.
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
@@ -1845,7 +1943,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
- Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
-- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary
+- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionary
- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres)
- Fix: [ bug #855 ] Holiday approval email in French
- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email
@@ -1864,7 +1962,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
- Fix: Localtax2 for Spain must be based into buyer
- Fix: [ bug #762 ] Bad profit calculation in Reporting
-- Fix: bug dictionnary with wrong prefix table
+- Fix: bug dictionary with wrong prefix table
***** ChangeLog for 3.3 compared to 3.2.* *****
For users:
@@ -1952,7 +2050,7 @@ New experimental module:
For developers:
- New: Add webservice for thirdparty creation and list.
- New: A module can overwrite templates parts.
-- New: Can add a link on title field of added dictionnary.
+- New: Can add a link on title field of added dictionary.
- New: Uniformize code.
- New: Add option WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER and
WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER.
diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php
index 834e0b07e2f..cd2ed5405db 100644
--- a/dev/skeletons/skeleton_list.php
+++ b/dev/skeletons/skeleton_list.php
@@ -216,7 +216,7 @@ foreach ($search_array_options as $key => $val)
$tmpkey=preg_replace('/search_options_/','',$key);
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
- if (in_array($typ, array('int'))) $mode=1; // Search on a numeric
+ if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
@@ -322,10 +322,25 @@ if ($resql)
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
- foreach($extrafields->attribute_label as $key => $val)
- {
- if (! empty($arrayfields["ef.".$key]['checked'])) print '
';
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 9ae3513fa8a..f520e7ba1a6 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -106,7 +106,7 @@ $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('project');
+$extralabels = $extrafields->fetch_name_optionals_label('projet');
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
// List of fields to search into when doing a "search in all"
@@ -218,16 +218,15 @@ $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
+if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_extrafields as ef on (p.rowid = ef.fk_object)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid";
-
// We'll need this table joined to the select in order to filter by sale
if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
if ($search_user > 0)
{
$sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
}
-
$sql.= " WHERE p.entity IN (".getEntity('project').')';
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
@@ -274,6 +273,19 @@ if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
if ($search_sale > 0) $sql.= " AND sc.fk_user = " .$search_sale;
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
if ($search_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_user;
+// Add where from extra fields
+foreach ($search_array_options as $key => $val)
+{
+ $crit=$val;
+ $tmpkey=preg_replace('/search_options_/','',$key);
+ $typ=$extrafields->attribute_type[$tmpkey];
+ $mode=0;
+ if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
+ if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
+ {
+ $sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
+ }
+}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
@@ -481,10 +493,25 @@ if ($resql)
{
foreach($extrafields->attribute_label as $key => $val)
{
- if (! empty($arrayfields["ef.".$key]['checked'])) print '
';
+ }
}
- }
- // Fields from hook
+ }
+ // Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index e140ee2f672..0f955484bfe 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -66,7 +66,7 @@ $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('project');
+$extralabels = $extrafields->fetch_name_optionals_label('projet_task');
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
// Security check
@@ -226,6 +226,7 @@ $sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid,";
$sql.= " ".MAIN_DB_PREFIX."projet_task as t";
+if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_extrafields as ef on (t.rowid = ef.fk_object)";
if ($search_project_user > 0)
{
$sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
@@ -275,6 +276,19 @@ if ($search_projectstatus >= 0) $sql .= " AND p.fk_statut = ".$db->escape($searc
if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
if ($search_project_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user;
if ($search_task_user > 0) $sql.= " AND ect.fk_c_type_contact IN (".join(',',array_keys($listoftaskcontacttype)).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$search_task_user;
+// Add where from extra fields
+foreach ($search_array_options as $key => $val)
+{
+ $crit=$val;
+ $tmpkey=preg_replace('/search_options_/','',$key);
+ $typ=$extrafields->attribute_type[$tmpkey];
+ $mode=0;
+ if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
+ if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
+ {
+ $sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
+ }
+}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
@@ -478,14 +492,29 @@ if ($resql)
if (! empty($arrayfields['t.duration_effective']['checked'])) print '
';
if (! empty($arrayfields['t.progress_calculated']['checked'])) print '
';
if (! empty($arrayfields['t.progress']['checked'])) print '
';
- // Extra fields
- if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
- {
- foreach($extrafields->attribute_label as $key => $val)
+ // Extra fields
+ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
+ {
+ foreach($extrafields->attribute_label as $key => $val)
{
- if (! empty($arrayfields["ef.".$key]['checked'])) print '
';
+ }
}
- }
+ }
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index feaed5d9f7d..621a8988a04 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -5,9 +5,6 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2015 Ferran Marcet
*
- * Version V1.1 Initial version of Philippe Berthet
- * Version V2 Change to be compatible with 3.4 and enhanced to be more generic
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -79,6 +76,7 @@ $langs->load("suppliers");
$langs->load("propal");
$langs->load("interventions");
$langs->load("contracts");
+$langs->load("products");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('consumptionthirdparty'));
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 087195e2905..80e54742765 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -101,7 +101,7 @@ $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
-$extralabels = $extrafields->fetch_name_optionals_label('thirdparty');
+$extralabels = $extrafields->fetch_name_optionals_label('societe');
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
// List of fields to search into when doing a "search in all"
@@ -170,7 +170,6 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
}
-
/*
@@ -200,6 +199,7 @@ if (empty($reshook))
// Do we click on purge search criteria ?
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
+ $search_nom='';
$search_categ='';
$search_sale='';
$search_barcode="";
@@ -346,7 +346,7 @@ if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
// We'll need these fields in order to filter by categ
if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_soc";
// Add fields from extrafields
-foreach ($extrafields->attribute_label as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
+foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
@@ -401,7 +401,7 @@ foreach ($search_array_options as $key => $val)
$tmpkey=preg_replace('/search_options_/','',$key);
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
- if (in_array($typ, array('int'))) $mode=1; // Search on a numeric
+ if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
@@ -592,35 +592,35 @@ if ($resql)
{
print '
';
- $form->select_dolusers((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default
+ print $form->select_dolusers((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default
print '
\n";
// Accountancy code
- if ($conf->salaries->enabled)
+ if ($conf->accounting->enabled)
{
print '
'.$langs->trans("AccountancyCode").'
';
print '
';
@@ -1402,7 +1386,7 @@ else
print "
\n";
// Accountancy code
- if ($conf->salaries->enabled)
+ if ($conf->accounting->enabled)
{
print '
'.$langs->trans("AccountancyCode").'
';
print '
'.$object->accountancy_code.'
';
@@ -1749,13 +1733,14 @@ else
dol_fiche_head($head, 'user', $title, 0, 'user');
- $rowspan=17;
+ $rowspan=22;
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++;
if (! empty($conf->societe->enabled)) $rowspan++;
if (! empty($conf->adherent->enabled)) $rowspan++;
if (! empty($conf->skype->enabled)) $rowspan++;
if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $rowspan = $rowspan+3;
if (! empty($conf->agenda->enabled)) $rowspan++;
+ if (! empty($conf->accounting->enabled)) $rowspan++;
print '
';
@@ -2173,7 +2158,7 @@ else
print "\n";
// Accountancy code
- if ($conf->salaries->enabled)
+ if ($conf->accounting->enabled)
{
print "
";
print '
'.$langs->trans("AccountancyCode").'
';
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 7307590016a..1ee07e0a7af 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -4,7 +4,7 @@
* Copyright (c) 2004-2012 Laurent Destailleur
* Copyright (C) 2004 Sebastien Di Cintio
* Copyright (C) 2004 Benoit Mortier
- * Copyright (C) 2005-2015 Regis Houssin
+ * Copyright (C) 2005-2016 Regis Houssin
* Copyright (C) 2005 Lionel Cousteix
* Copyright (C) 2011 Herve Prot
* Copyright (C) 2013-2014 Philippe Grand
@@ -138,11 +138,11 @@ class User extends CommonObject
// For cache usage
$this->all_permissions_are_loaded = 0;
-
- // Force some default values
+
+ // Force some default values
$this->admin = 0;
$this->employee = 1;
-
+
$this->conf = new stdClass();
$this->rights = new stdClass();
$this->rights->user = new stdClass();
@@ -162,7 +162,7 @@ class User extends CommonObject
*/
function fetch($id='', $login='',$sid='',$loadpersonalconf=1, $entity=-1)
{
- global $langs, $conf, $user;
+ global $conf, $user;
// Clean parameters
$login=trim($login);
@@ -202,14 +202,17 @@ class User extends CommonObject
}
else
{
- $sql.= " WHERE u.entity IS NOT NULL"; // multicompany is on in transverse mode or user making fetch is on entity 0, so user is allowed to fetch anywhere into database
+ $sql.= " WHERE u.entity IS NOT NULL"; // multicompany is on in transverse mode or user making fetch is on entity 0, so user is allowed to fetch anywhere into database
}
}
else // The fetch was forced on an entity
{
- $sql.= " WHERE u.entity IN (0, ".$conf->entity.")";
+ if (!empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode))
+ $sql.= " WHERE u.entity IS NOT NULL"; // multicompany is on in transverse mode or user making fetch is on entity 0, so user is allowed to fetch anywhere into database
+ else
+ $sql.= " WHERE u.entity IN (0, ".$conf->entity.")";
}
-
+
if ($sid) // permet une recherche du user par son SID ActiveDirectory ou Samba
{
$sql.= " AND (u.ldap_sid = '".$this->db->escape($sid)."' OR u.login = '".$this->db->escape($login)."') LIMIT 1";
@@ -239,7 +242,7 @@ class User extends CommonObject
$this->ldap_sid = $obj->ldap_sid;
$this->lastname = $obj->lastname;
$this->firstname = $obj->firstname;
-
+
$this->employee = $obj->employee;
$this->login = $obj->login;
@@ -256,7 +259,7 @@ class User extends CommonObject
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_id?$obj->country_code:'';
- $this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';
+ //$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';
$this->state_id = $obj->state_id;
$this->state_code = $obj->state_code;
@@ -298,8 +301,8 @@ class User extends CommonObject
// Protection when module multicompany was set, admin was set to first entity and the module disabled,
// then this admin user must be admin for all entities.
- if (empty($conf->multicompany->enabled) && $this->admin && $this->entity == 1) $this->entity = 0;
-
+ if (empty($conf->multicompany->enabled) && $this->admin && $this->entity == 1) $this->entity = 0;
+
// Retreive all extrafield for thirdparty
// fetch optionals attributes and labels
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
@@ -1227,7 +1230,7 @@ class User extends CommonObject
$this->error = $langs->trans("ErrorFieldRequired",$this->login);
return -1;
}
-
+
$this->db->begin();
// Update datas
@@ -1272,7 +1275,7 @@ class User extends CommonObject
$nbrowsaffected+=$this->db->affected_rows($resql);
// Update password
- if ($this->pass)
+ if (!empty($this->pass))
{
if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted)
{
@@ -1893,7 +1896,7 @@ class User extends CommonObject
global $menumanager;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
-
+
$result = '';
$companylink = '';
$link = '';
@@ -1947,11 +1950,11 @@ class User extends CommonObject
$link.= 'global->MAIN_OPTIMIZEFORTEXTBROWSER))
+ if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$langs->load("users");
$label=$langs->trans("ShowUser");
- $link.=' alt="'.dol_escape_htmltag($label, 1).'"';
+ $link.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$link.= ' title="'.dol_escape_htmltag($label, 1).'"';
$link.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
@@ -1969,7 +1972,7 @@ class User extends CommonObject
else $picto='