diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 6aadda390dd..a974f86e95a 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2011 Dimitri Mouillard * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -92,7 +93,7 @@ class modHoliday extends DolibarrModules // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0), // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) ); $this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities') - $r = 0; + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment $this->const[$r][0] = "HOLIDAY_ADDON"; $this->const[$r][1] = "chaine"; @@ -155,7 +156,7 @@ class modHoliday extends DolibarrModules // Permissions $this->rights = array(); // Permission array used by this module - $r = 0; + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment $this->rights[$r][0] = 20001; // Permission id (must not be already used) $this->rights[$r][1] = 'Read leave requests (yours and your subordinates)'; // Permission label @@ -221,26 +222,26 @@ class modHoliday extends DolibarrModules $this->export_icon[$r] = 'holiday'; $this->export_permission[$r] = array(array("holiday", "readall")); $this->export_fields_array[$r] = array( - 'd.rowid'=>"LeaveId", 'd.fk_type'=>'TypeOfLeaveId', 't.code'=>'TypeOfLeaveCode', 't.label'=>'TypeOfLeaveLabel', 'd.fk_user'=>'UserID', - 'd.date_debut'=>'DateStart', 'd.date_fin'=>'DateEnd', 'd.halfday'=>'HalfDay', 'none.num_open_days'=>'NbUseDaysCP', - 'd.date_valid'=>'DateApprove', 'd.fk_validator'=>"UserForApprovalID", - 'u.lastname'=>'Lastname', 'u.firstname'=>'Firstname', 'u.login'=>"Login", - 'ua.lastname'=>"UserForApprovalLastname", 'ua.firstname'=>"UserForApprovalFirstname", - 'ua.login'=>"UserForApprovalLogin", 'd.description'=>'Description', 'd.statut'=>'Status' + 'd.rowid' => "LeaveId", 'd.fk_type' => 'TypeOfLeaveId', 't.code' => 'TypeOfLeaveCode', 't.label' => 'TypeOfLeaveLabel', 'd.fk_user' => 'UserID', + 'd.date_debut' => 'DateStart', 'd.date_fin' => 'DateEnd', 'd.halfday' => 'HalfDay', 'none.num_open_days' => 'NbUseDaysCP', + 'd.date_valid' => 'DateApprove', 'd.fk_validator' => "UserForApprovalID", + 'u.lastname' => 'Lastname', 'u.firstname' => 'Firstname', 'u.login' => "Login", + 'ua.lastname' => "UserForApprovalLastname", 'ua.firstname' => "UserForApprovalFirstname", + 'ua.login' => "UserForApprovalLogin", 'd.description' => 'Description', 'd.statut' => 'Status' ); $this->export_TypeFields_array[$r] = array( - 'd.rowid'=>"Numeric", 't.code'=>'Text', 't.label'=>'Text', 'd.fk_user'=>'Numeric', - 'd.date_debut'=>'Date', 'd.date_fin'=>'Date', 'none.num_open_days'=>'NumericCompute', - 'd.date_valid'=>'Date', 'd.fk_validator'=>"Numeric", - 'u.lastname'=>'Text', 'u.firstname'=>'Text', 'u.login'=>"Text", - 'ua.lastname'=>"Text", 'ua.firstname'=>"Text", - 'ua.login'=>"Text", 'd.description'=>'Text', 'd.statut'=>'Numeric' + 'd.rowid' => "Numeric", 't.code' => 'Text', 't.label' => 'Text', 'd.fk_user' => 'Numeric', + 'd.date_debut' => 'Date', 'd.date_fin' => 'Date', 'none.num_open_days' => 'NumericCompute', + 'd.date_valid' => 'Date', 'd.fk_validator' => "Numeric", + 'u.lastname' => 'Text', 'u.firstname' => 'Text', 'u.login' => "Text", + 'ua.lastname' => "Text", 'ua.firstname' => "Text", + 'ua.login' => "Text", 'd.description' => 'Text', 'd.statut' => 'Numeric' ); $this->export_entities_array[$r] = array( - 'u.lastname'=>'user', 'u.firstname'=>'user', 'u.login'=>'user', 'ua.lastname'=>'user', 'ua.firstname'=>'user', 'ua.login'=>'user' + 'u.lastname' => 'user', 'u.firstname' => 'user', 'u.login' => 'user', 'ua.lastname' => 'user', 'ua.firstname' => 'user', 'ua.login' => 'user' ); //$this->export_alias_array[$r] = array('d.rowid'=>"idholiday"); - $this->export_special_array[$r] = array('none.num_open_days'=>'getNumOpenDays'); + $this->export_special_array[$r] = array('none.num_open_days' => 'getNumOpenDays'); $this->export_dependencies_array[$r] = array(); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $keyforselect = 'holiday';