diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index e2adf06425f..d45aeaa0958 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -123,6 +123,12 @@ class ActionComm extends CommonObject
*/
public $label;
+ /**
+ * @var string Agenda event label
+ * @deprecated Use $label
+ */
+ public $libelle;
+
/**
* @var integer Date creation record (datec)
*/
@@ -1439,9 +1445,9 @@ class ActionComm extends CommonObject
/**
- * Return label of status
+ * Return the label of the status
*
- * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
+ * @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto
* @param int $hidenastatus 1=Show nothing if status is "Not applicable"
* @return string String with status
*/
@@ -1628,36 +1634,34 @@ class ActionComm extends CommonObject
}
if ($withpicto == 2) {
- $libelle = $label;
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
- $libelle = $labeltype;
+ $label = $labeltype;
}
- $libelleshort = '';
+ $labelshort = '';
} else {
- $libelle = (empty($this->libelle) ? $label : $this->libelle.(($label && $label != $this->libelle) ? ' '.$label : ''));
- if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) {
- $libelle = $labeltype;
+ if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($label)) {
+ $label = $labeltype;
}
if ($maxlength < 0) {
- $libelleshort = $this->ref;
+ $labelshort = $this->ref;
} else {
- $libelleshort = dol_trunc($libelle, $maxlength);
+ $labelshort = dol_trunc($label, $maxlength);
}
}
if ($withpicto) {
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { // Add code into ()
if ($labeltype) {
- $libelle .= (preg_match('/'.preg_quote($labeltype, '/').'/', $libelle) ? '' : ' ('.$langs->transnoentities("Action".$this->type_code).')');
+ $label .= (preg_match('/'.preg_quote($labeltype, '/').'/', $label) ? '' : ' ('.$langs->transnoentities("Action".$this->type_code).')');
}
}
}
$result .= $linkstart;
if ($withpicto) {
- $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$libelle), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
+ $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
}
- $result .= $libelleshort;
+ $result .= $labelshort;
$result .= $linkend;
global $action;
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index aa693d2e41f..ff242430b0a 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -205,9 +205,9 @@ class ActionCommReminder extends CommonObject
}
/**
- * Retourne le libelle du status d'un user (actif, inactif)
+ * Return label of the status of a reminder
*
- * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
+ * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label of status
*/
public function getLibStatut($mode = 0)
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 4d6a032492f..3b2a08a6f6e 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -837,7 +837,7 @@ if ($resql) {
$event->fk_project = $obj->fk_project;
- $event->thirdparty_id = $obj->fk_soc;
+ $event->socid = $obj->fk_soc;
$event->contact_id = $obj->fk_contact;
// Defined date_start_in_calendar and date_end_in_calendar property
@@ -1964,7 +1964,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
if ($event->type_code != 'ICALEVENT') {
$savlabel = $event->label ? $event->label : $event->libelle;
$event->label = $titletoshow;
- $event->libelle = $titletoshow;
+ $event->libelle = $titletoshow; // deprecatd
// Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user.
$titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : '');
$titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0);
@@ -1996,7 +1996,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print '
('.dol_trunc($event->icalname, $maxnbofchar).')';
}
- $thirdparty_id = ($event->thirdparty_id > 0 ? $event->thirdparty_id : ((is_object($event->societe) && $event->societe->id > 0) ? $event->societe->id : 0));
+ $thirdparty_id = ($event->socid > 0 ? $event->socid : ((is_object($event->societe) && $event->societe->id > 0) ? $event->societe->id : 0));
$contact_id = ($event->contact_id > 0 ? $event->contact_id : ((is_object($event->contact) && $event->contact->id > 0) ? $event->contact->id : 0));
// If action related to company / contact
diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php
index 57a88bef157..62f57c008ba 100644
--- a/htdocs/comm/contact.php
+++ b/htdocs/comm/contact.php
@@ -157,10 +157,10 @@ if ($resql) {
print '