From 49051ff1659cf82e16bf3a45f4c8344af4ae1f18 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sun, 21 Sep 2025 15:08:56 +0200 Subject: [PATCH] Removed deprecated property ->projet (replace with ->project) --- htdocs/api/class/api.class.php | 1 - htdocs/contrat/class/contrat.class.php | 3 --- htdocs/core/class/commonobject.class.php | 1 - htdocs/core/lib/functions.lib.php | 2 -- .../asset/doc/pdf_standard_asset.modules.php | 2 +- .../doc/pdf_eagle_proforma.modules.php | 4 ++-- ...face_95_modZapier_ZapierTriggers.class.php | 1 - .../class/conferenceorboothattendee.class.php | 2 +- htdocs/projet/card.php | 1 - htdocs/projet/contact.php | 1 - htdocs/projet/document.php | 1 - htdocs/projet/element.php | 1 - htdocs/projet/ganttview.php | 1 - htdocs/projet/note.php | 1 - htdocs/projet/tasks.php | 2 -- htdocs/projet/tasks/document.php | 1 - htdocs/projet/tasks/note.php | 1 - htdocs/projet/tasks/task.php | 22 +------------------ htdocs/projet/tasks/time.php | 1 - ...tandard_recruitmentjobposition.modules.php | 2 +- 20 files changed, 6 insertions(+), 45 deletions(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 5781871d098..4989a3b4456 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -227,7 +227,6 @@ class DolibarrApi unset($object->contact); // We use contact_id now unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now - unset($object->projet); // Should be fk_project unset($object->project); // Should be fk_project unset($object->fk_projet); // Should be fk_project unset($object->author); // Should be fk_user_author diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index bc0e47698ee..7ecc1c31c69 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1347,9 +1347,6 @@ class Contrat extends CommonObject if (empty($this->socid) && $this->fk_soc > 0) { $this->socid = (int) $this->fk_soc; } - if (empty($this->fk_project) && $this->projet > 0) { - $this->fk_project = (int) $this->projet; - } if (isset($this->ref)) { $this->ref = trim($this->ref); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 459c50563bd..1d11862e80d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2032,7 +2032,6 @@ abstract class CommonObject $project = new Project($this->db); $result = $project->fetch($this->fk_project); - $this->projet = $project; // deprecated $this->project = $project; return $result; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f9b2bbd935d..7250bede70c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10314,8 +10314,6 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $project = null; if (!empty($object->project)) { $project = $object->project; - } elseif (!empty($object->projet)) { // Deprecated, for backward compatibility - $project = $object->projet; } if (!is_null($project) && is_object($project)) { $substitutionarray['__PROJECT_ID__'] = $project->id; diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index 401f1a12ed6..cb1104ad489 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -894,7 +894,7 @@ class pdf_standard_asset extends ModelePDFAsset $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 24e48bc116a..7d4776852a1 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -1315,7 +1315,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } @@ -1325,7 +1325,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } diff --git a/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php b/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php index d6ed6a6383f..77bfd517404 100644 --- a/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modZapier_ZapierTriggers.class.php @@ -458,7 +458,6 @@ function cleanObjectDatas($toclean) unset($toclean->ref_previous); unset($toclean->ref_next); - unset($toclean->projet); // Should be fk_project unset($toclean->project); // Should be fk_project unset($toclean->author); // Should be fk_user_author unset($toclean->timespent_old_duration); diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 1541317fbe5..84bd7e11d46 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -730,8 +730,8 @@ class ConferenceOrBoothAttendee extends CommonObject $project = new Project($this->db); $result = $project->fetch($this->fk_project); - $this->projet = $project; // deprecated $this->project = $project; + return $result; } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index c4d7569f45a..f4b291939e8 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -80,7 +80,6 @@ $location = GETPOST('location', 'alphanohtml'); $mine = GETPOST('mode') == 'mine' ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context $hookmanager->initHooks(array('projectcard', 'globalcard')); diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 22f4d4a33a9..27e732bd91a 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -58,7 +58,6 @@ $socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $mine = GETPOST('mode') == 'mine' ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 867452ef92a..bcc898fe86f 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -50,7 +50,6 @@ $confirm = GETPOST('confirm', 'alpha'); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $mine = (GETPOST('mode', 'alpha') == 'mine' ? 1 : 0); -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index fbc5a7d1ba2..912cd402726 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -181,7 +181,6 @@ if ($id == '' && $ref == '') { } $mine = GETPOST('mode') == 'mine' ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 9b5b93a689b..60ba2323f2a 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -47,7 +47,6 @@ $ref = GETPOST('ref', 'alpha'); $mode = GETPOST('mode', 'alpha'); $mine = ($mode == 'mine' ? 1 : 0); -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 6130564e2da..2a570b74d6c 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -45,7 +45,6 @@ $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $mine = (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mine') ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $object = new Project($db); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index f72a757be9f..43e849bfbfe 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -117,8 +117,6 @@ $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); $search_date_end_endday = GETPOSTINT('search_date_end_endday'); $search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects - $object = new Project($db); $taskstatic = new Task($db); $extrafields = new ExtraFields($db); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 9bdd5b0fbba..088a1f2c46e 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -49,7 +49,6 @@ $langs->loadLangs(array('projects', 'other')); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $mine = GETPOST('mode') == 'mine' ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $withproject = GETPOSTINT('withproject'); diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 0028cdb39ed..2b60a5d6325 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -42,7 +42,6 @@ $langs->load('projects'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $mine = GETPOST('mode') == 'mine' ? 1 : 0; -//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $withproject = GETPOSTINT('withproject'); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index cc092cc600d..4dc8f432cbd 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -478,27 +478,7 @@ if ($id > 0 || !empty($ref)) { /* * Actions - */ - /*print '
'; - - if ($user->rights->projet->all->creer || $user->rights->projet->creer) - { - if ($projectstatic->public || $userWrite > 0) - { - print ''.$langs->trans('AddTask').''; - } - else - { - print ''.$langs->trans('AddTask').''; - } - } - else - { - print ''.$langs->trans('AddTask').''; - } - - print '
'; - */ + */ // To verify role of users //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 7c4e817cced..ad8451c6659 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1144,7 +1144,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); } } - //if ($user->rights->projet->creer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete', 'generateinvoice', 'generateinter'))) { $arrayofmassactions = array(); } diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 46312af0ae3..ba5cf77c509 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -814,7 +814,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } }