From 5b36c7c1ba047e4cccf3d3dac3aa1b747ef9f417 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 4 Feb 2024 18:21:13 +0100 Subject: [PATCH] Clean code --- htdocs/bookcal/availabilities_document.php | 4 ---- htdocs/bookcal/calendar_document.php | 4 ---- htdocs/eventorganization/conferenceorbooth_document.php | 4 ---- htdocs/hrm/job_document.php | 3 --- htdocs/knowledgemanagement/knowledgerecord_document.php | 4 ---- htdocs/partnership/partnership_document.php | 4 ---- htdocs/product/stock/stocktransfer/stocktransfer_document.php | 4 ---- 7 files changed, 27 deletions(-) diff --git a/htdocs/bookcal/availabilities_document.php b/htdocs/bookcal/availabilities_document.php index 94e8fd47384..723df675ef5 100644 --- a/htdocs/bookcal/availabilities_document.php +++ b/htdocs/bookcal/availabilities_document.php @@ -196,10 +196,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'bookcal'; - //$permissiontoadd = $user->hasRight('bookcal', 'availabilities', 'write'); - $permissiontoadd = 1; - //$permtoedit = $user->hasRight('bookcal', 'availabilities', 'write'); - $permtoedit = 1; $param = '&id='.$object->id; //$relativepathwithnofile='availabilities/' . dol_sanitizeFileName($object->id).'/'; diff --git a/htdocs/bookcal/calendar_document.php b/htdocs/bookcal/calendar_document.php index b45c082c6ae..96b8b5b4d83 100644 --- a/htdocs/bookcal/calendar_document.php +++ b/htdocs/bookcal/calendar_document.php @@ -245,10 +245,6 @@ print ''; print dol_get_fiche_end(); $modulepart = 'bookcal'; -//$permissiontoadd = $user->rights->bookcal->calendar->write; -$permissiontoadd = 1; -//$permtoedit = $user->rights->bookcal->calendar->write; -$permtoedit = 1; $param = '&id='.$object->id; //$relativepathwithnofile='calendar/' . dol_sanitizeFileName($object->id).'/'; diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 3ca9ead5d8b..2e759c02658 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -395,10 +395,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'eventorganization'; - //$permission = $user->rights->eventorganization->conferenceorbooth->write; - $permission = 1; - //$permtoedit = $user->rights->eventorganization->conferenceorbooth->write; - $permtoedit = 1; $param = '&id='.$object->id; //$param = ''; if ($withproject) { diff --git a/htdocs/hrm/job_document.php b/htdocs/hrm/job_document.php index 08784d007ef..3f9ff9a74dc 100644 --- a/htdocs/hrm/job_document.php +++ b/htdocs/hrm/job_document.php @@ -158,9 +158,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'hrm'; - //$permissiontoadd = $user->rights->hrm->job->write; - //$permtoedit = $user->rights->hrm->job->write; - $permtoedit = $permissiontoadd; $param = '&id='.$object->id; //$relativepathwithnofile='job/' . dol_sanitizeFileName($object->id).'/'; diff --git a/htdocs/knowledgemanagement/knowledgerecord_document.php b/htdocs/knowledgemanagement/knowledgerecord_document.php index f83bcd883e0..75780701b36 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_document.php +++ b/htdocs/knowledgemanagement/knowledgerecord_document.php @@ -183,10 +183,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'knowledgemanagement'; - //$permission = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); - $permission = 1; - //$permtoedit = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); - $permtoedit = 1; $param = '&id='.$object->id; //$relativepathwithnofile='knowledgerecord/' . dol_sanitizeFileName($object->id).'/'; diff --git a/htdocs/partnership/partnership_document.php b/htdocs/partnership/partnership_document.php index c115151d4e7..c0d83257d3a 100644 --- a/htdocs/partnership/partnership_document.php +++ b/htdocs/partnership/partnership_document.php @@ -196,10 +196,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'partnership'; - //$permission = $user->rights->partnership->write; - $permission = 1; - //$permtoedit = $user->rights->partnership->write; - $permtoedit = 1; $param = '&id='.$object->id; //$relativepathwithnofile='partnership/' . dol_sanitizeFileName($object->id).'/'; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_document.php b/htdocs/product/stock/stocktransfer/stocktransfer_document.php index 5c6a3b77355..72b5352f740 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_document.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_document.php @@ -182,10 +182,6 @@ if ($object->id) { print dol_get_fiche_end(); $modulepart = 'stocktransfer'; - //$permission = $user->rights->stocktransfer->stocktransfer->write; - $permission = 1; - //$permtoedit = $user->rights->stocktransfer->stocktransfer->write; - $permtoedit = 1; $param = '&id='.$object->id; //$relativepathwithnofile='stocktransfer/' . dol_sanitizeFileName($object->id).'/';