diff --git a/.github/workflows/pr-18.yaml b/.github/workflows/pr-18.yaml index 2682e99df383d..b8b18169b589d 100644 --- a/.github/workflows/pr-18.yaml +++ b/.github/workflows/pr-18.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install GitHub CLI run: | @@ -36,7 +36,10 @@ jobs: #REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer run: | + # shellcheck disable=2086 echo "GH_TOKEN=$GH_TOKEN" + # shellcheck disable=2086 pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH) + # shellcheck disable=2086 gh pr edit $pr_number --add-reviewer "$REVIEWER" continue-on-error: true diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 3999e4d96da67..686d19ca860c0 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -18696,12 +18696,6 @@ parameters: count: 4 path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php - - message: '#^Variable \$text might not be defined\.$#' identifier: variable.undefined @@ -18768,12 +18762,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - message: '#^Variable \$from might not be defined\.$#' identifier: variable.undefined @@ -20946,42 +20934,6 @@ parameters: count: 1 path: ../../htdocs/fourn/commande/document.php - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus4 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus9 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/fourn/commande/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -21585,42 +21537,6 @@ parameters: - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse - count: 2 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$canread might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$endhalfdaykey might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$starthalfdaykey might not be defined\.$#' - identifier: variable.undefined count: 1 path: ../../htdocs/holiday/card.php @@ -24462,12 +24378,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - - message: '#^Parameter \#3 \$tab_height of method pdf_standard_myobject\:\:_tableau\(\) expects int, float given\.$#' - identifier: argument.type - count: 6 - path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - message: '#^Property pdf_standard_myobject\:\:\$cols \(array\\) does not accept non\-empty\-array\\.$#' identifier: assign.propertyType @@ -24528,12 +24438,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -27792,12 +27696,6 @@ parameters: count: 1 path: ../../htdocs/projet/admin/project.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/projet/admin/website.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 78c2f2a3a3bbc..78615f801bae5 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1470,7 +1470,7 @@ public function getPayments($id) * Add payment line to a specific invoice with the remain to pay as amount. * * @param int $id Id of invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param string $datepaye {@from body} Payment date * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} @@ -1591,7 +1591,7 @@ public function addPayment($id, $datepaye, $paymentid, $closepaidinvoices, $acco * Example of value for parameter arrayofamounts: {"1": {"amount": "99.99", "multicurrency_amount": ""}, "2": {"amount": "", "multicurrency_amount": "10"}} * * @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param string $datepaye {@from body} Payment date * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9c411ea7caf54..c1ca2befd67b4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1148,8 +1148,10 @@ function GETPOSTFLOAT($paramname, $rounding = '') * @param string $hourTime 'getpost' to include hour, minute, second values from the HTTP request, * or 'XX:YY:ZZ' to set hour, minute, second respectively (for instance '23:59:59') * or '' means '00:00:00' (default) - * @param string $gm Passed to dol_mktime + * @param int|string $gm Passed to dol_mktime * @return int|string Date as a timestamp, '' or false if error + * + * @see dol_mktime() */ function GETPOSTDATE($prefix, $hourTime = '', $gm = 'auto') { @@ -3647,7 +3649,7 @@ function dol_getdate($timestamp, $fast = false, $forcetimezone = '') * @param int $month Month (1 to 12) * @param int $day Day (1 to 31) * @param int $year Year - * @param mixed $gm True or 1 or 'gmt'=Input information are GMT values + * @param bool|int|string $gm True or 1 or 'gmt'=Input information are GMT values * False or 0 or 'tzserver' = local to server TZ * 'auto' * 'tzuser' = local to user TZ taking dst into account at the current date. Not yet implemented. @@ -10577,9 +10579,12 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1' $scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... (' like in 'if ($a == 1)'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions $scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function(' $scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function(' + $scheck = preg_replace('/^!\(/', '__NOTANDPARENTHESIS__', $scheck); // accept parenthesis in '!(' + $scheck = preg_replace('/\s!\(/', '__NOTANDPARENTHESIS__', $scheck); // accept parenthesis in '... !(' $scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)') } //print 'scheck='.$scheck." : ".strpos($scheck, '(')."
\n"; + if (strpos($scheck, '(') !== false) { if ($returnvalue) { return 'Bad string syntax to evaluate (mode '.$onlysimplestring.', found call of a function or method without using the direct name of the function): '.$s; diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 9a2b8aca0b0a1..01b04b0a33857 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -6,7 +6,8 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -25,7 +26,7 @@ /** * \file htdocs/core/modules/supplier_order/modules_commandefournisseur.php - * \ingroup order fournisseur + * \ingroup supplier order * \brief File that contains parent class for supplier orders models * and parent class for supplier orders numbering models */ diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 5f7ef6df8278b..01827248462c4 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -616,8 +616,6 @@ public function createFromClone(User $user, $fk_user_author) */ public function update($user, $notrigger = 0, $userofexpensereport = null) { - global $langs; - $error = 0; $this->db->begin(); @@ -644,24 +642,21 @@ public function update($user, $notrigger = 0, $userofexpensereport = null) dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; } if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_MODIFY', $user); - if ($result < 0) { $error++; } // End call triggers } - if (empty($error)) { + if (!$error) { $this->db->commit(); return 1; } else { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 376ca90db2b2e..d4fff20a846f6 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -32,7 +32,7 @@ /** * \file htdocs/fourn/commande/card.php - * \ingroup supplier, order + * \ingroup supplier order * \brief Card supplier order */ diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 03efd74eaaa03..67b436e308ece 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/contact.php - * \ingroup order + * \ingroup supplier order * \brief Onglet de gestion des contacts de commande */ diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 485470da9457f..d61d72ea72b0a 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -27,7 +27,7 @@ /** * \file htdocs/fourn/commande/dispatch.php - * \ingroup commande + * \ingroup supplier order * \brief Page to dispatch receiving */ diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index e5f3a3f8ebeec..5c43e0ba3d8fc 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -24,7 +24,7 @@ /** * \file htdocs/fourn/commande/document.php - * \ingroup supplier + * \ingroup supplier order * \brief Management page of attached documents to a supplier order */ diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 74c608bfd069a..25f6d7e4f905d 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/index.php - * \ingroup order fournisseur + * \ingroup supplier order * \brief Home page of supplier's orders area */ @@ -52,6 +52,7 @@ // Security check $orderid = GETPOST('orderid'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -116,7 +117,13 @@ $db->free($resql); include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; - + /** + * @var string $badgeStatus0 + * @var string $badgeStatus1 + * @var string $badgeStatus4 + * @var string $badgeStatus6 + * @var string $badgeStatus9 + */ print '
'; print ''; print ''; diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index e55e2c9a1da2e..477b4b11f9596 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -21,7 +21,7 @@ /** * \file htdocs/fourn/commande/info.php - * \ingroup order + * \ingroup supplier order * \brief Info page for Purchase Order / Supplier Order */ diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 44e6630c97030..051e09d453d42 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -29,7 +29,7 @@ /** * \file htdocs/fourn/commande/list.php - * \ingroup fournisseur + * \ingroup supplier order * \brief List of purchase orders */ diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 22cf2d2f02ec3..967a875cd60f7 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/note.php - * \ingroup order + * \ingroup supplier order * \brief page for notes on supplier orders */ diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 95bb39f7f3f70..29595dc17a2f9 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -85,11 +85,11 @@ // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); +$canread = 0; if (($id > 0) || $ref) { $object->fetch($id, $ref); // Check current user can read this leave request - $canread = 0; if ($user->hasRight('holiday', 'readall')) { $canread = 1; } @@ -169,10 +169,10 @@ $db->begin(); - $date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year')); - $date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year')); - $date_debut_gmt = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'), 1); - $date_fin_gmt = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'), 1); + $date_debut = GETPOSTDATE('date_debut_', '00:00:00'); + $date_fin = GETPOSTDATE('date_fin_', '00:00:00'); + $date_debut_gmt = GETPOSTDATE('date_debut_', '00:00:00', 1); + $date_fin_gmt = GETPOSTDATE('date_fin_', '00:00:00', 1); $starthalfday = GETPOST('starthalfday'); $endhalfday = GETPOST('endhalfday'); $type = GETPOST('type'); @@ -325,10 +325,10 @@ } if ($action == 'update' && !GETPOSTISSET('savevalidator')) { // Test on permission done later - $date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year')); - $date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year')); - $date_debut_gmt = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'), 1); - $date_fin_gmt = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'), 1); + $date_debut = GETPOSTDATE('date_debut_', '00:00:00'); + $date_fin = GETPOSTDATE('date_fin_', '00:00:00'); + $date_debut_gmt = GETPOSTDATE('date_debut_', '00:00:00', 1); + $date_fin_gmt = GETPOSTDATE('date_fin_', '00:00:00', 1); $starthalfday = GETPOST('starthalfday'); $endhalfday = GETPOST('endhalfday'); $halfday = 0; @@ -542,6 +542,9 @@ } elseif ($object->halfday == 0 || $object->halfday == 2) { $starthalfdaykey = "Morning"; $endhalfdaykey = "Afternoon"; + } else { + $starthalfdaykey = ""; + $endhalfdaykey = ""; } $link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id; @@ -1154,7 +1157,7 @@ if (!GETPOST('date_debut_')) { // If visitor does not come from agenda print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1); } else { - $tmpdate = dol_mktime(0, 0, 0, GETPOSTINT('date_debut_month'), GETPOSTINT('date_debut_day'), GETPOSTINT('date_debut_year')); + $tmpdate = GETPOSTDATE('date_debut_', '00:00:00'); print $form->selectDate($tmpdate, 'date_debut_', 0, 0, 0, '', 1, 1); } print '     '; @@ -1171,7 +1174,7 @@ if (!GETPOST('date_fin_')) { print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1); } else { - $tmpdate = dol_mktime(0, 0, 0, GETPOSTINT('date_fin_month'), GETPOSTINT('date_fin_day'), GETPOSTINT('date_fin_year')); + $tmpdate = GETPOSTDATE('date_fin_', '00:00:00'); print $form->selectDate($tmpdate, 'date_fin_', 0, 0, 0, '', 1, 1); } print '     '; @@ -1349,7 +1352,7 @@ print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); print ''; print '
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'
'; - $tmpdate = dol_mktime(0, 0, 0, GETPOSTINT('date_debut_month'), GETPOSTINT('date_debut_day'), GETPOSTINT('date_debut_year')); + $tmpdate = GETPOSTDATE('date_debut_', '00:00:00'); print $form->selectDate($tmpdate ? $tmpdate : $object->date_debut, 'date_debut_'); print '     '; print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday') ? GETPOST('starthalfday') : $starthalfday)); @@ -1650,9 +1653,8 @@ print '
'; print ''; // ancre - $includedocgeneration = 0; - // Documents + /* $includedocgeneration = 0; if ($includedocgeneration) { $objref = dol_sanitizeFileName($object->ref); $relativepath = $objref.'/'.$objref.'.pdf'; @@ -1661,7 +1663,7 @@ $genallowed = ($user->hasRight('holiday', 'read') && $object->fk_user == $user->id) || $user->hasRight('holiday', 'readall'); // If you can read, you can build the PDF to read content $delallowed = ($user->hasRight('holiday', 'write') && $object->fk_user == $user->id) || $user->hasRight('holiday', 'writeall_advance'); // If you can create/edit, you can remove a file on card print $formfile->showdocuments('holiday:Holiday', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); - } + } */ // Show links to link elements //$tmparray = $form->showLinkToObjectBlock($object, null, array('myobject'), 1); diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 66d3acc0db3b8..41b87eb8b3055 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -35,19 +35,20 @@ create table llx_user tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, -- user who created dataset fk_user_modif integer, -- user who modified dataset + login varchar(50) NOT NULL, pass_encoding varchar(24), pass varchar(128), pass_crypted varchar(128), - pass_temp varchar(128), -- temporary password when asked for forget password or 'hashtoallowreset:YYYMMDDHHMMSS' (where date is max date of validity) - api_key varchar(128), -- key to use REST API by this user + pass_temp varchar(128), -- temporary password when asked for forget password or 'hashtoallowreset:YYYMMDDHHMMSS' (where date is max date of validity) + api_key varchar(128), -- key to use REST API by this user gender varchar(10), civility varchar(6), lastname varchar(50), firstname varchar(50), - address varchar(255), -- user personal address - zip varchar(25), -- zipcode - town varchar(50), -- town + address varchar(255), -- user personal address + zip varchar(25), -- zipcode + town varchar(50), -- town fk_state integer DEFAULT 0, fk_country integer DEFAULT 0, birth date, -- birthday @@ -74,6 +75,7 @@ create table llx_user fk_user_expense_validator integer NULL, fk_user_holiday_validator integer NULL, + national_registration_number varchar(50), idpers1 varchar(128), idpers2 varchar(128), idpers3 varchar(128), @@ -90,10 +92,11 @@ create table llx_user flagdelsessionsbefore datetime DEFAULT NULL, -- set this to a date if we need to launch an external process to invalidate all sessions for the same login created before this date iplastlogin varchar(250), ippreviouslogin varchar(250), - --egroupware_id integer, ldap_sid varchar(255) DEFAULT NULL, openid varchar(255), + statut tinyint DEFAULT 1, + photo varchar(255), -- filename or url of photo lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. color varchar(6), @@ -114,8 +117,9 @@ create table llx_user weeklyhours double(16,8), -- DENORMALIZED FIELD. Value coming from llx_user_employment import_key varchar(14), -- import key + default_range integer, default_c_exp_tax_cat integer, - national_registration_number varchar(50), + fk_warehouse integer -- default warehouse of user )ENGINE=innodb; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index aa2406f6cc888..8621d9aca3cb3 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -170,7 +170,7 @@ public function __construct($db) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; + global $user, $langs, $conf, $mysoc, $hookmanager, $nblines; dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); @@ -854,8 +854,8 @@ public static function liste_modeles($db, $maxfilenamelength = 0) * Show table for lines * * @param TCPDF|TCPDI $pdf Object PDF - * @param int $tab_top Top position of table - * @param int $tab_height Height of table (rectangle) + * @param float $tab_top Top position of table + * @param float $tab_height Height of table (rectangle) * @param int $nexY Y (not used) * @param Translate $outputlangs Langs object * @param int<-1,1> $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title diff --git a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php index 47d372c68abc2..009d9876cb211 100644 --- a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php +++ b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php @@ -1,6 +1,7 @@ - * Copyright (C) 2024 MDW +/* Copyright (C) 2019 Laurent Destailleur + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * Copyright (C) ---Replace with your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -17,6 +18,11 @@ * along with this program. If not, see . */ +/** + * @var CommonObject $object + * @var Translate $langs + * @var User $user + */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL";