Properties ->contactid has been renamed into ->contact_id

This commit is contained in:
Laurent Destailleur 2020-06-25 12:17:47 +02:00
parent e32bed250c
commit 333d4873c3
24 changed files with 106 additions and 93 deletions

View File

@ -2,6 +2,17 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
For users:
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Properties ->contactid has been renamed into ->contact_id
***** ChangeLog for 12.0.0 compared to 11.0.0 *****
For users:

View File

@ -2747,7 +2747,7 @@ class Adherent extends CommonObject
$actioncomm->datef = $now;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->socid = $adherent->thirdparty->id;
$actioncomm->contactid = 0;
$actioncomm->contact_id = 0;
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields when action is en email (content should be added into note)

View File

@ -177,7 +177,7 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes')
//$object->fetch($id);
if (!empty($object->socpeopleassigned)) {
reset($object->socpeopleassigned);
$object->contactid = key($object->socpeopleassigned);
$object->contact_id = key($object->socpeopleassigned);
}
$result = $object->createFromClone($user, GETPOST('socid', 'int'));
if ($result > 0) {
@ -350,7 +350,7 @@ if (empty($reshook) && $action == 'add')
if (!empty($object->socpeopleassigned))
{
reset($object->socpeopleassigned);
$object->contactid = key($object->socpeopleassigned);
$object->contact_id = key($object->socpeopleassigned);
}
// Fill array 'array_options' with data from add form
@ -445,10 +445,10 @@ if (empty($reshook) && $action == 'update')
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
$object->socpeopleassigned = array();
foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid);
$object->contactid = GETPOST("contactid", 'int');
if (empty($object->contactid) && !empty($object->socpeopleassigned)) {
$object->contact_id = GETPOST("contactid", 'int');
if (empty($object->contact_id) && !empty($object->socpeopleassigned)) {
reset($object->socpeopleassigned);
$object->contactid = key($object->socpeopleassigned);
$object->contact_id = key($object->socpeopleassigned);
}
$object->fk_project = GETPOST("projectid", 'int');
$object->note_private = GETPOST("note", "none");
@ -1156,7 +1156,7 @@ if ($id > 0)
$object->socid = GETPOST("socid", "int");
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
foreach ($socpeopleassigned as $tmpid) $object->socpeopleassigned[$id] = array('id' => $tmpid);
$object->contactid = GETPOST("contactid", 'int');
$object->contact_id = GETPOST("contactid", 'int');
$object->fk_project = GETPOST("projectid", 'int');
$object_private = GETPOST("note", 'none');

View File

@ -492,7 +492,7 @@ class ActionComm extends CommonObject
$sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", ";
$sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", ";
$sql .= " '".$this->db->escape($this->note_private)."', ";
$sql .= ((isset($this->contactid) && $this->contactid > 0) ? $this->contactid : "null").", ";
$sql .= ((isset($this->contact_id) && $this->contact_id > 0) ? $this->contact_id : "null").", ";
$sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", ";
$sql .= ($userownerid > 0 ? $userownerid : "null").", ";
$sql .= ($userdoneid > 0 ? $userdoneid : "null").", ";
@ -758,7 +758,7 @@ class ActionComm extends CommonObject
$this->transparency = $obj->transparency;
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
$this->contactid = $obj->fk_contact; // To have fetch_contact method working
$this->contact_id = $obj->fk_contact; // To have fetch_contact method working
$this->fk_project = $obj->fk_project; // To have fetch_projet method working
//$this->societe->id = $obj->fk_soc; // deprecated
@ -999,7 +999,7 @@ class ActionComm extends CommonObject
}
$socid = (($this->socid > 0) ? $this->socid : 0);
$contactid = (($this->contactid > 0) ? $this->contactid : 0);
$contactid = (($this->contact_id > 0) ? $this->contact_id : 0);
$userownerid = ($this->userownerid ? $this->userownerid : 0);
$userdoneid = ($this->userdoneid ? $this->userdoneid : 0);

View File

@ -1642,7 +1642,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
if ($event->type_code == 'ICALEVENT') print '<br>('.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));
$contact_id = ($event->contact_id > 0 ? $event->contact_id : ((is_object($event->contact) && $event->cotact->id > 0) ? $event->contact->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
$linerelatedto = '';

View File

@ -469,7 +469,7 @@ if ($resql)
$event->fk_project = $obj->fk_project;
$event->socid = $obj->fk_soc;
$event->contactid = $obj->fk_contact;
$event->contact_id = $obj->fk_contact;
$event->fk_element = $obj->fk_element;
$event->elementtype = $obj->elementtype;
@ -880,15 +880,15 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
}
$cases1[$h][$event->id]['string'] .= ', '.$cachethirdparties[$event->socid]->name;
}
if ($event->contactid > 0)
if ($event->contact_id > 0)
{
if (empty($cachecontacts[$event->contactid]))
if (empty($cachecontacts[$event->contact_id]))
{
$tmpcontact = new Contact($db);
$tmpcontact->fetch($event->contactid);
$cachecontacts[$event->contactid] = $tmpcontact;
$tmpcontact->fetch($event->contact_id);
$cachecontacts[$event->contact_id] = $tmpcontact;
}
$cases1[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contactid]->getFullName($langs);
$cases1[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
}
}
if ($event->date_start_in_calendar < $c && $dateendtouse > $b)
@ -926,15 +926,15 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
}
$cases2[$h][$event->id]['string'] .= ', '.$cachethirdparties[$event->socid]->name;
}
if ($event->contactid > 0)
if ($event->contact_id > 0)
{
if (empty($cachecontacts[$event->contactid]))
if (empty($cachecontacts[$event->contact_id]))
{
$tmpcontact = new Contact($db);
$tmpcontact->fetch($event->contactid);
$cachecontacts[$event->contactid] = $tmpcontact;
$tmpcontact->fetch($event->contact_id);
$cachecontacts[$event->contact_id] = $tmpcontact;
}
$cases2[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contactid]->getFullName($langs);
$cases2[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
}
}
} else {

View File

@ -534,7 +534,7 @@ if ($resql)
$event->fk_project = $obj->fk_project;
$event->socid = $obj->fk_soc;
$event->contactid = $obj->fk_contact;
$event->contact_id = $obj->fk_contact;
$event->fk_element = $obj->fk_element;
$event->elementtype = $obj->elementtype;
@ -1071,15 +1071,15 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
$cases1[$h][$event->id]['string'] .= ', '.$cachethirdparties[$event->socid]->name;
}
if ($event->contactid > 0)
if ($event->contact_id > 0)
{
if (empty($cachecontacts[$event->contactid]))
if (empty($cachecontacts[$event->contact_id]))
{
$tmpcontact = new Contact($db);
$tmpcontact->fetch($event->contactid);
$cachecontacts[$event->contactid] = $tmpcontact;
$tmpcontact->fetch($event->contact_id);
$cachecontacts[$event->contact_id] = $tmpcontact;
}
$cases1[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contactid]->getFullName($langs);
$cases1[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
}
}
if ($event->date_start_in_calendar < $c && $dateendtouse > $b)
@ -1117,15 +1117,15 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
$cases2[$h][$event->id]['string'] .= ', '.$cachethirdparties[$event->socid]->name;
}
if ($event->contactid > 0)
if ($event->contact_id > 0)
{
if (empty($cachecontacts[$event->contactid]))
if (empty($cachecontacts[$event->contact_id]))
{
$tmpcontact = new Contact($db);
$tmpcontact->fetch($event->contactid);
$cachecontacts[$event->contactid] = $tmpcontact;
$tmpcontact->fetch($event->contact_id);
$cachecontacts[$event->contact_id] = $tmpcontact;
}
$cases2[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contactid]->getFullName($langs);
$cases2[$h][$event->id]['string'] .= ', '.$cachecontacts[$event->contact_id]->getFullName($langs);
}
}
} else {

View File

@ -347,7 +347,7 @@ if (empty($reshook))
$object->remise_percent = GETPOST('remise_percent');
$object->remise_absolue = GETPOST('remise_absolue');
$object->socid = GETPOST('socid', 'int');
$object->contactid = GETPOST('contactid', 'int');
$object->contact_id = GETPOST('contactid', 'int');
$object->fk_project = GETPOST('projectid', 'int');
$object->modelpdf = GETPOST('model');
$object->author = $user->id; // deprecated
@ -375,7 +375,7 @@ if (empty($reshook))
$object->cond_reglement_id = GETPOST('cond_reglement_id');
$object->mode_reglement_id = GETPOST('mode_reglement_id');
$object->fk_account = GETPOST('fk_account', 'int');
$object->contactid = GETPOST('contactid', 'int');
$object->contact_id = GETPOST('contactid', 'int');
$object->fk_project = GETPOST('projectid', 'int');
$object->modelpdf = GETPOST('model');
$object->author = $user->id; // deprecated

View File

@ -278,7 +278,7 @@ if (empty($reshook))
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
$object->warehouse_id = GETPOST('warehouse_id', 'int');
$object->fk_delivery_address = GETPOST('fk_address');
$object->contactid = GETPOST('contactid');
$object->contact_id = GETPOST('contactid');
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');

View File

@ -1338,7 +1338,7 @@ class Commande extends CommonOrder
$this->shipping_method_id = $object->shipping_method_id;
$this->warehouse_id = $object->warehouse_id;
$this->fk_delivery_address = $object->fk_delivery_address;
$this->contact_id = $object->contactid;
$this->contact_id = $object->contact_id;
$this->ref_client = $object->ref_client;
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))

View File

@ -1311,7 +1311,7 @@ class Facture extends CommonInvoice
$this->demand_reason_id = $object->demand_reason_id;
$this->date_livraison = $object->date_livraison;
$this->fk_delivery_address = $object->fk_delivery_address; // deprecated
$this->contact_id = $object->contactid;
$this->contact_id = $object->contact_id;
$this->ref_client = $object->ref_client;
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))

View File

@ -131,7 +131,7 @@ class CSMSFile
$sms->nostop = $this->nostop;
$sms->socid = $this->socid;
$sms->contactid = $this->contactid;
$sms->contact_id = $this->contact_id;
$sms->project = $this->fk_project;
$res = $sms->SmsSend();
@ -162,7 +162,7 @@ class CSMSFile
$sms->nostop = $this->nostop;
$sms->socid = $this->socid;
$sms->contactid = $this->contactid;
$sms->contact_id = $this->contact_id;
$sms->fk_project = $this->fk_project;
$res = $sms->SmsSend();

View File

@ -1424,15 +1424,15 @@ abstract class CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load object contact with id=$this->contactid into $this->contact
* Load object contact with id=$this->contact_id into $this->contact
*
* @param int $contactid Id du contact. Use this->contactid if empty.
* @param int $contactid Id du contact. Use this->contact_id if empty.
* @return int <0 if KO, >0 if OK
*/
public function fetch_contact($contactid = null)
{
// phpcs:enable
if (empty($contactid)) $contactid = $this->contactid;
if (empty($contactid)) $contactid = $this->contact_id;
if (empty($contactid)) return 0;

View File

@ -338,7 +338,7 @@ class FormTicket
print '</td></tr>';
} else {
print '<tr><td class="titlefield"><input type="hidden" name="socid" value="'.$user->socid.'"/></td>';
print '<td><input type="hidden" name="contactid" value="'.$user->contactid.'"/></td>';
print '<td><input type="hidden" name="contactid" value="'.$user->contact_id.'"/></td>';
print '<td><input type="hidden" name="type" value="Z"/></td></tr>';
}

View File

@ -838,7 +838,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$actioncomm->durationp = 0;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->socid = $societeforaction->id;
$actioncomm->contactid = $contactforaction->id;
$actioncomm->contact_id = $contactforaction->id;
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action
// Fields defined when action is an email (content should be into object->actionmsg to be added into note, subject into object->actionms2 to be added into label)

View File

@ -1533,7 +1533,7 @@ class EmailCollector extends CommonObject
$actioncomm->datef = $date;
$actioncomm->percentage = -1; // Not applicable
$actioncomm->socid = $thirdpartystatic->id;
$actioncomm->contactid = $contactstatic->id;
$actioncomm->contact_id = $contactstatic->id;
$actioncomm->socpeopleassigned = (!empty($contactstatic->id) ? array($contactstatic->id => '') : array());
$actioncomm->authorid = $user->id; // User saving action
$actioncomm->userownerid = $user->id; // Owner of action

View File

@ -54,3 +54,18 @@ ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME;
ALTER TABLE llx_loan_schedule ADD column fk_payment_loan INTEGER;
ALTER TABLE llx_user DROP COLUMN jabberid;
ALTER TABLE llx_user DROP COLUMN skype;
ALTER TABLE llx_user DROP COLUMN twitter;
ALTER TABLE llx_user DROP COLUMN facebook;
ALTER TABLE llx_user DROP COLUMN linkedin;
ALTER TABLE llx_user DROP COLUMN instagram;
ALTER TABLE llx_user DROP COLUMN snapchat;
ALTER TABLE llx_user DROP COLUMN googleplus;
ALTER TABLE llx_user DROP COLUMN youtube;
ALTER TABLE llx_user DROP COLUMN whatsapp;
ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime;
ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime;

View File

@ -57,32 +57,27 @@ create table llx_user
personal_email varchar(255),
socialnetworks text DEFAULT NULL, -- json with socialnetworks
jabberid varchar(255),
skype varchar(255),
twitter varchar(255), --
facebook varchar(255), --
linkedin varchar(255), --
instagram varchar(255), --
snapchat varchar(255), --
googleplus varchar(255), --
youtube varchar(255), --
whatsapp varchar(255), --
signature text DEFAULT NULL,
admin smallint DEFAULT 0,
module_comm smallint DEFAULT 1,
module_compta smallint DEFAULT 1,
fk_soc integer,
fk_socpeople integer,
fk_member integer,
fk_user integer, -- Hierarchic parent
fk_user_expense_validator integer,
fk_user_holiday_validator integer,
note_public text,
note text DEFAULT NULL,
model_pdf varchar(255) DEFAULT NULL,
datelastlogin datetime,
datepreviouslogin datetime,
datestartvalidity datetime,
dateendvalidity datetime,
iplastlogin varchar(250),
ippreviouslogin varchar(250),
egroupware_id integer,

View File

@ -316,7 +316,7 @@ if ($result > 0)
{
$obj = $db->fetch_object($resql);
$contactstatic->id = $obj->contactid;
$contactstatic->id = $obj->contact_id;
$contactstatic->lastname = $obj->lastname;
$contactstatic->firstname = $obj->firstname;
print '<tr class="oddeven"><td>'.$contactstatic->getNomUrl(1);

View File

@ -2618,7 +2618,7 @@ class Ticket extends CommonObject
foreach ($external_contacts as $key => $info_sendto) {
// altairis: avoid duplicate emails to external contacts
if ($info_sendto['id'] == $user->contactid) {
if ($info_sendto['id'] == $user->contact_id) {
continue;
}

View File

@ -1529,7 +1529,7 @@ if ($action == 'create' || $action == 'adduserldap')
print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
print '</td><td>';
$type = $langs->trans("Internal");
if ($object->societe_id > 0) $type = $langs->trans("External");
if ($object->socid > 0) $type = $langs->trans("External");
print $type;
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
print '</td></tr>'."\n";
@ -1766,10 +1766,10 @@ if ($action == 'create' || $action == 'adduserldap')
} else {
print $langs->trans("ThisUserIsNot");
}
if (!empty($object->contactid))
if (!empty($object->contact_id))
{
$contact = new Contact($db);
$contact->fetch($object->contactid);
$contact->fetch($object->contact_id);
if ($object->socid > 0) print ' / ';
else print '<br>';
print $contact->getNomUrl(1, '');
@ -2214,15 +2214,15 @@ if ($action == 'create' || $action == 'adduserldap')
} else {
// Select mode
$type = 0;
if ($object->contactid) $type = $object->contactid;
if ($object->contact_id) $type = $object->contact_id;
if ($object->socid > 0 && ! ($object->contactid > 0)) { // external user but no link to a contact
if ($object->socid > 0 && ! ($object->contact_id > 0)) { // external user but no link to a contact
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;');
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1);
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
} elseif ($object->socid > 0 && $object->contactid > 0) { // external user with a link to a contact
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, $object->contactid, 'contactid', 1, '', '', 1, '', false, 1);
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1);
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
} else { // $object->socid is not > 0 here
print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set
@ -2523,11 +2523,11 @@ if ($action == 'create' || $action == 'adduserldap')
$societe = new Societe($db);
$societe->fetch($object->socid);
print $societe->getNomUrl(1, '');
if ($object->contactid)
if ($object->contact_id)
{
$contact = new Contact($db);
$contact->fetch($object->contactid);
print ' / <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$object->contactid.'">'.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).'</a>';
$contact->fetch($object->contact_id);
print ' / <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$object->contact_id.'">'.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).'</a>';
}
} else {
print $langs->trans("ThisUserIsNot");

View File

@ -130,18 +130,9 @@ class User extends CommonObject
public $datem;
//! If this is defined, it is an external user
/**
* @deprecated
* @see $socid
*/
public $societe_id;
/**
* @deprecated
* @see $contactid
*/
public $contact_id;
public $socid;
public $contactid;
//! If this is defined, it is a user created from a contact
public $contact_id;
/**
* @var int ID
@ -162,6 +153,8 @@ class User extends CommonObject
public $datelastlogin;
public $datepreviouslogin;
public $datestartvalidity;
public $dateedvalidity;
public $photo;
public $lang;
@ -177,7 +170,7 @@ class User extends CommonObject
public $users = array(); // To store all tree of users hierarchy
public $parentof; // To store an array of all parents for all ids.
private $cache_childids;
private $cache_childids; // Cache array of already loaded childs
public $accountancy_code; // Accountancy code in prevision of the complete accountancy module
@ -270,6 +263,8 @@ class User extends CommonObject
$sql .= " u.tms as datem,";
$sql .= " u.datelastlogin as datel,";
$sql .= " u.datepreviouslogin as datep,";
$sql .= " u.datestartvalidity,";
$sql .= " u.dateendvalidity,";
$sql .= " u.photo as photo,";
$sql .= " u.openid as openid,";
$sql .= " u.accountancy_code,";
@ -388,11 +383,11 @@ class User extends CommonObject
$this->datem = $this->db->jdate($obj->datem);
$this->datelastlogin = $this->db->jdate($obj->datel);
$this->datepreviouslogin = $this->db->jdate($obj->datep);
$this->datestartvalidity = $this->db->jdate($obj->datestartvalidity);
$this->dateendvalidity = $this->db->jdate($obj->dateendvalidity);
$this->societe_id = $obj->fk_soc; // deprecated
$this->contact_id = $obj->fk_socpeople; // deprecated
$this->socid = $obj->fk_soc;
$this->contactid = $obj->fk_socpeople;
$this->contact_id = $obj->fk_socpeople;
$this->fk_member = $obj->fk_member;
$this->fk_user = $obj->fk_user;
$this->fk_user_expense_validator = $obj->fk_user_expense_validator;
@ -1044,9 +1039,9 @@ class User extends CommonObject
}
// If contact, remove link
if ($this->contactid > 0 || $this->contact_id > 0)
if ($this->contact_id > 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".(($this->contactid > 0) ? $this->contactid : $this->contact_id);
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".$this->contact_id);
if (!$error && !$this->db->query($sql))
{
$error++;
@ -1651,8 +1646,7 @@ class User extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
// This user is linked with a contact, so we also update contact information
// if this is an update.
// This user is linked with a contact, so we also update contact information if this is an update.
$tmpobj = new Contact($this->db);
$result = $tmpobj->fetch($this->contact_id);
@ -2643,8 +2637,6 @@ class User extends CommonObject
$this->datepreviouslogin = $now;
$this->statut = 1;
//$this->societe_id = 1; For external users
//$this->contact_id = 1; For external users
$this->entity = 1;
}

View File

@ -300,7 +300,7 @@ function getActionComm($authentication, $id)
'fulldayevent'=> $actioncomm->fulldayevent,
'location'=> $actioncomm->location,
'socid'=> $actioncomm->socid,
'contactid'=> $actioncomm->contactid,
'contactid'=> $actioncomm->contact_id,
'projectid'=> $actioncomm->fk_project,
'fk_element'=> $actioncomm->fk_element,
'elementtype'=> $actioncomm->elementtype
@ -438,7 +438,7 @@ function createActionComm($authentication, $actioncomm)
$newobject->socid = $actioncomm['socid'];
$newobject->fk_project = $actioncomm['projectid'];
$newobject->note = $actioncomm['note'];
$newobject->contactid = $actioncomm['contactid'];
$newobject->contact_id = $actioncomm['contactid'];
$newobject->userownerid = $actioncomm['userownerid'];
$newobject->label = $actioncomm['label'];
$newobject->percentage = $actioncomm['percentage'];
@ -533,7 +533,7 @@ function updateActionComm($authentication, $actioncomm)
$object->datef = $actioncomm['datef'];
$object->type_code = $actioncomm['type_code'];
$object->socid = $actioncomm['socid'];
$object->contactid = $actioncomm['contactid'];
$object->contact_id = $actioncomm['contactid'];
$object->fk_project = $actioncomm['projectid'];
$object->note = $actioncomm['note'];
$object->userownerid = $actioncomm['userownerid'];

View File

@ -360,7 +360,7 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '')
'datec' => dol_print_date($user->datec, 'dayhourrfc'),
'datem' => dol_print_date($user->datem, 'dayhourrfc'),
'fk_thirdparty' => $user->socid,
'fk_contact' => $user->contactid,
'fk_contact' => $user->contact_id,
'fk_member' => $user->fk_member,
'datelastlogin' => dol_print_date($user->datelastlogin, 'dayhourrfc'),
'datepreviouslogin' => dol_print_date($user->datepreviouslogin, 'dayhourrfc'),