From cbb458486b8fdd3aa96f8dd7810b4131291674df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Jun 2024 09:27:25 +0200 Subject: [PATCH] Debug v20 --- htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/class/timespent.class.php | 2 +- htdocs/projet/class/task.class.php | 2 +- htdocs/projet/tasks/time.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f6a585b2ac5..7d4dd591502 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -584,7 +584,7 @@ abstract class CommonObject * @deprecated Use $note_private instead. * @see $note_private */ - private $note; + public $note; /** * @var float Total amount excluding taxes (HT = "Hors Taxe" in French) @@ -877,7 +877,7 @@ abstract class CommonObject return array( 'alreadypaid' => 'totalpaid', 'cond_reglement' => 'depr_cond_reglement', - 'note' => 'note_private', + //'note' => 'note_private', // Some classes needs ->note and others need ->note_public/private so we can't manage deprecation for this field with dolDeprecationHandler 'commandeFournisseur' => 'origin_object', 'expedition' => 'origin_object', 'fk_project' => 'fk_project', diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php index af0d00d9c15..fe72570d878 100644 --- a/htdocs/core/class/timespent.class.php +++ b/htdocs/core/class/timespent.class.php @@ -149,7 +149,7 @@ class TimeSpent extends CommonObject */ public function __construct(DoliDB $db) { - global $conf, $langs; + global $langs; $this->db = $db; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 7e325f5bcc2..772c51c3847 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1423,7 +1423,7 @@ class Task extends CommonObjectLine */ public function addTimeSpent($user, $notrigger = 0) { - global $conf, $langs; + global $langs; dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 1e1fff42975..669a23e68ba 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -231,7 +231,7 @@ if ($action == 'addtimespent' && $user->hasRight('projet', 'time')) { if (!$error) { $object->fetch_projet(); - if (empty($object->project->statut)) { + if (empty($object->project->status)) { setEventMessages($langs->trans("ProjectMustBeValidatedFirst"), null, 'errors'); $action = 'createtime'; $error++;