Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop_atm

This commit is contained in:
Marc de Lima Lucio
2018-03-05 11:05:38 +01:00
101 changed files with 1214 additions and 539 deletions

View File

@@ -2739,7 +2739,7 @@ abstract class CommonObject
* @param string $targettype Object target type (if not defined, elemennt name of object)
* @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided
* @param int $alsosametype 0=Return only links to object that differs from source. 1=Include also link to objects of same type.
* @return void
* @return int <0 if KO, >0 if OK
* @see add_object_linked, updateObjectLinked, deleteObjectLinked
*/
function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1)
@@ -2920,10 +2920,12 @@ abstract class CommonObject
}
}
}
return 1;
}
else
{
dol_print_error($this->db);
return -1;
}
}
@@ -3057,6 +3059,7 @@ abstract class CommonObject
$fieldstatus="fk_statut";
if ($elementTable == 'mailing') $fieldstatus="statut";
if ($elementTable == 'cronjob') $fieldstatus="status";
if ($elementTable == 'user') $fieldstatus="statut";
if ($elementTable == 'expensereport') $fieldstatus="fk_statut";
if ($elementTable == 'commande_fournisseur_dispatch') $fieldstatus="status";
@@ -3581,7 +3584,7 @@ abstract class CommonObject
* Return HTML table for object lines
* TODO Move this into an output class file (htmlline.class.php)
* If lines are into a template, title must also be into a template
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
* But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
*
* @param string $action Action code
* @param string $seller Object of seller third party
@@ -4519,10 +4522,11 @@ abstract class CommonObject
{
$extrafields->fetch_name_optionals_label($this->table_element);
}
$optionsArray = $extrafields->attributes[$this->table_element]['label'];
$optionsArray = (! empty($extrafields->attributes[$this->table_element]['label'])?$extrafields->attributes[$this->table_element]['label']:null);
}
else
{
global $extrafields;
dol_syslog("Warning: fetch_optionals was called with param optionsArray defined when you should pass null now", LOG_WARNING);
}
@@ -4696,7 +4700,8 @@ abstract class CommonObject
if ($this->array_options[$key] != '' && is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']))
{
// If there is an encryption choice, we use it to crypt data before insert
$algo=reset(array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']));
$tmparrays = array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']);
$algo=reset($tmparrays);
if ($algo != '')
{
//global $action; // $action may be 'create', 'update', 'update_extras'...