diff --git a/htdocs/api/class/api_objectlinks.class.php b/htdocs/api/class/api_objectlinks.class.php
index 67d1e43beab..b800a4d8507 100644
--- a/htdocs/api/class/api_objectlinks.class.php
+++ b/htdocs/api/class/api_objectlinks.class.php
@@ -478,14 +478,9 @@ class ObjectLinks extends DolibarrApi
unset($object->date_modification);
unset($object->tms);
unset($object->date_cloture);
- unset($object->user_author);
- unset($object->user_creation);
unset($object->user_creation_id);
- unset($object->user_valid);
- unset($object->user_validation);
unset($object->user_validation_id);
unset($object->user_closing_id);
- unset($object->user_modification);
unset($object->user_modification_id);
unset($object->fk_user_creat);
unset($object->fk_user_modif);
diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php
index f22360f191f..169820b5e15 100644
--- a/htdocs/compta/facture/card-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -1523,7 +1523,7 @@ if ($action == 'create') {
print $formconfirm;
$author = new User($db);
- $author->fetch($object->user_author);
+ $author->fetch($object->user_creation_id);
$head = invoice_rec_prepare_head($object);
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index ac78350d54d..ceaeb4ba03f 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -706,7 +706,6 @@ class FactureRec extends CommonInvoice
$this->fk_societe_rib = $obj->fk_societe_rib;
$this->note_private = $obj->note_private;
$this->note_public = $obj->note_public;
- $this->user_author = $obj->fk_user_author; // deprecated
$this->user_creation_id = $obj->fk_user_author;
$this->model_pdf = $obj->model_pdf;
//$this->special_code = $obj->special_code;
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 78dc62998d7..bc0e47698ee 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -145,7 +145,7 @@ class Contrat extends CommonObject
public $fk_user_author;
/**
- * TODO: Which is the correct one?
+ * TODO: Which is the correct one? user_author_id or user_creation_id ?
* Author of the contract
* @var int
*/
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index c069efdf8f6..459c50563bd 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -697,35 +697,11 @@ abstract class CommonObject
*/
public $date_cloture;
- /**
- * @var User User author/creation
- * @deprecated Store only id in user_creation_id
- */
- public $user_author;
-
- /**
- * @var User User author/creation
- * @deprecated
- */
- public $user_creation;
-
/**
* @var int|null User id author/creation
*/
public $user_creation_id;
- /**
- * @var User User of validation
- * @deprecated
- */
- public $user_valid;
-
- /**
- * @var User User of validation
- * @deprecated
- */
- public $user_validation;
-
/**
* @var int|null User id of validation
*/
@@ -736,12 +712,6 @@ abstract class CommonObject
*/
public $user_closing_id;
- /**
- * @var User User last modifier
- * @deprecated
- */
- public $user_modification;
-
/**
* @var int|null User ID who last modified the object
*/
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 960bbb29563..eb91479edcc 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -185,8 +185,8 @@ function dol_print_object_info($object, $usetable = 0)
}
}
- // Creation (old method using already loaded object and not id is kept for backward compatibility)
- if (!empty($object->user_creation) || !empty($object->user_creation_id) || !empty($object->date_creation)) {
+ // Creation
+ if (!empty($object->user_creation_id) || !empty($object->date_creation)) {
if ($usetable) {
print '
| ';
}
@@ -196,23 +196,15 @@ function dol_print_object_info($object, $usetable = 0)
} else {
print ': ';
}
- if (! empty($object->user_creation) && is_object($object->user_creation)) { // deprecated mode
- if ($object->user_creation->id) {
- print $object->user_creation->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ $userstatic = new User($db);
+ $userstatic->fetch($object->user_creation_id);
+ if ($userstatic->id) {
+ print $userstatic->getNomUrl(-1, '', 0, 0, 0);
} else {
- $userstatic = new User($db);
- $userstatic->fetch($object->user_creation_id);
- if ($userstatic->id) {
- print $userstatic->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ print $langs->trans("Unknown");
}
- if ((!empty($object->user_creation) || !empty($object->user_creation_id)) && !empty($object->date_creation)) {
+ if (!empty($object->user_creation_id) && !empty($object->date_creation)) {
print ' - ';
}
@@ -232,8 +224,8 @@ function dol_print_object_info($object, $usetable = 0)
}
}
- // Last modification (old method using already loaded object and not id is kept for backward compatibility)
- if (!empty($object->user_modification) || !empty($object->user_modification_id) || !empty($object->date_modification)) {
+ // Last modification
+ if (!empty($object->user_modification_id) || !empty($object->date_modification)) {
if ($usetable) {
print ' |
| ';
}
@@ -244,20 +236,12 @@ function dol_print_object_info($object, $usetable = 0)
print ': ';
}
print ' ';
- if (is_object($object->user_modification)) {
- if ($object->user_modification->id) {
- print $object->user_modification->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ $userstatic = new User($db);
+ $userstatic->fetch($object->user_modification_id);
+ if ($userstatic->id) {
+ print $userstatic->getNomUrl(-1, '', 0, 0, 0);
} else {
- $userstatic = new User($db);
- $userstatic->fetch($object->user_modification_id);
- if ($userstatic->id) {
- print $userstatic->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ print $langs->trans("Unknown");
}
print ' ';
@@ -278,8 +262,8 @@ function dol_print_object_info($object, $usetable = 0)
}
}
- // Validation (old method using already loaded object and not id is kept for backward compatibility)
- if (!empty($object->user_validation) || !empty($object->user_validation_id) || !empty($object->date_validation)) {
+ // Validation
+ if (!empty($object->user_validation_id) || !empty($object->date_validation)) {
if ($usetable) {
print ' |
| ';
}
@@ -289,20 +273,12 @@ function dol_print_object_info($object, $usetable = 0)
} else {
print ': ';
}
- if (is_object($object->user_validation)) {
- if ($object->user_validation->id) {
- print $object->user_validation->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ $userstatic = new User($db);
+ $userstatic->fetch($object->user_validation_id ? $object->user_validation_id : $object->user_validation);
+ if ($userstatic->id) {
+ print $userstatic->getNomUrl(-1, '', 0, 0, 0);
} else {
- $userstatic = new User($db);
- $userstatic->fetch($object->user_validation_id ? $object->user_validation_id : $object->user_validation);
- if ($userstatic->id) {
- print $userstatic->getNomUrl(-1, '', 0, 0, 0);
- } else {
- print $langs->trans("Unknown");
- }
+ print $langs->trans("Unknown");
}
if (!empty($object->date_validation)) {
diff --git a/htdocs/eventorganization/class/api_eventattendees.class.php b/htdocs/eventorganization/class/api_eventattendees.class.php
index f4bc7381c16..dc27d4f3e2c 100644
--- a/htdocs/eventorganization/class/api_eventattendees.class.php
+++ b/htdocs/eventorganization/class/api_eventattendees.class.php
@@ -539,14 +539,9 @@ class EventAttendees extends DolibarrApi
unset($object->actiontypecode);
unset($object->name);
unset($object->civility_id);
- unset($object->user_author);
- unset($object->user_creation);
unset($object->user_creation_id);
- unset($object->user_valid);
- unset($object->user_validation);
unset($object->user_validation_id);
unset($object->user_closing_id);
- unset($object->user_modification);
unset($object->user_modification_id);
unset($object->totalpaid);
unset($object->product);
diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php
index 1f90d49830e..d8474848ee3 100644
--- a/htdocs/fichinter/card-rec.php
+++ b/htdocs/fichinter/card-rec.php
@@ -510,7 +510,7 @@ if ($action == 'create') {
$object->fetch_thirdparty();
$author = new User($db);
- $author->fetch((int) $object->user_author);
+ $author->fetch((int) $object->user_author_id);
$head = fichinter_rec_prepare_head($object);
diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php
index 4a212898e0c..480e16805df 100644
--- a/htdocs/fichinter/class/fichinterrec.class.php
+++ b/htdocs/fichinter/class/fichinterrec.class.php
@@ -325,7 +325,7 @@ class FichinterRec extends Fichinter
$this->fk_contrat = $obj->fk_contrat;
$this->note_private = $obj->note_private;
$this->note_public = $obj->note_public;
- $this->user_author = $obj->fk_user_author;
+ $this->user_author_id = $obj->fk_user_author;
$this->model_pdf = empty($obj->model_pdf) ? "" : $obj->model_pdf;
$this->rang = !empty($obj->rang) ? $obj->rang : "";
$this->special_code = !empty($obj->special_code) ? $obj->special_code : "";
diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php
index 84f9f3deffe..7381ecc993a 100644
--- a/htdocs/fourn/class/fournisseur.facture-rec.class.php
+++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php
@@ -716,7 +716,7 @@ class FactureFournisseurRec extends CommonInvoice
$this->total_ht = $obj->total_ht;
$this->total_tva = $obj->total_tva;
$this->total_ttc = $obj->total_ttc;
- $this->user_author = $obj->fk_user_author;
+ $this->user_creation_id = $obj->fk_user_author;
$this->user_modif = $obj->fk_user_modif;
$this->fk_project = $obj->fk_project;
$this->fk_account = $obj->fk_account;
diff --git a/htdocs/webhook/class/api_webhook.class.php b/htdocs/webhook/class/api_webhook.class.php
index 8649a8192fc..674e75cc399 100644
--- a/htdocs/webhook/class/api_webhook.class.php
+++ b/htdocs/webhook/class/api_webhook.class.php
@@ -380,14 +380,9 @@ class Webhook extends DolibarrApi
unset($object->date_validation);
unset($object->date_modification);
unset($object->date_cloture);
- unset($object->user_author);
- unset($object->user_creation);
unset($object->user_creation_id);
- unset($object->user_valid);
- unset($object->user_validation);
unset($object->user_validation_id);
unset($object->user_closing_id);
- unset($object->user_modification);
unset($object->user_modification_id);
unset($object->specimen);
unset($object->extraparams);
|