From 67c7e2fdce3a89e57f66fd1897216368afa68039 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Jul 2024 21:27:56 +0200 Subject: [PATCH 001/127] Fix trans --- htdocs/compta/facture/prelevement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 65c33a8863297..91c63cc50fbaa 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -622,7 +622,7 @@ print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; if (!empty($bac->iban)) { if ($bac->verif() <= 0) { - print img_warning('Error on default bank number for IBAN : '.$bac->error); + print img_warning('Error on default bank number for IBAN : '.$langs->trans($bac->error)); } } else { if ($numopen || ($type != 'bank-transfer' && $object->mode_reglement_code == 'PRE') || ($type == 'bank-transfer' && $object->mode_reglement_code == 'VIR')) { From 50190db5c7c462da562d6bf3389278df070f9d23 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 Jul 2024 22:02:20 +0200 Subject: [PATCH 002/127] Fix option WITHDRAWAL_WITHOUT_BIC --- htdocs/compta/bank/class/account.class.php | 4 ++- test/phpunit/BankAccountTest.php | 35 +++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 420c21abf650b..cc8f6c437098f 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1627,7 +1627,9 @@ public function verif() $error++; $this->error = 'IBANNotValid'; } - if (!checkSwiftForAccount($this) or !(empty($this->bic) && getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC'))) { + // Call function to check Swift/BIC. + // A non valid BIC/Swift is a problem if: it is not empty or always a problem if WITHDRAWAL_WITHOUT_BIC is not set). + if (!checkSwiftForAccount($this) && (!empty($this->bic) || !getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC'))) { $error++; $this->error = 'SwiftNotValid'; } diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index dfa85590a3736..8619231145958 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -142,6 +142,39 @@ public function testBankAccountOther($localobject) print __METHOD__." checkIbanForAccount(".$localobject2->iban.") = ".$result."\n"; $this->assertTrue($result); + return $localobject; + } + + /** + * testCheckSwiftForAccount + * + * @param Account $localobject Account + * @return int + * + * @depends testBankAccountOther + * The depends says test is run only if previous is ok + */ + public function testCheckSwiftForAccount($localobject) + { + global $conf,$user,$langs,$db; + $conf = $this->savconf; + $user = $this->savuser; + $langs = $this->savlangs; + $db = $this->savdb; + + $localobject->bic = 'PSSTFRPPMARBIDON'; + + $result = checkSwiftForAccount($localobject); + print __METHOD__." checkSwiftForAccount ".$localobject->bic." = ".$result."\n"; + $this->assertFalse($result); + + + $localobject->bic = 'PSSTFRPPMAR'; + + $result = checkSwiftForAccount($localobject); + print __METHOD__." checkSwiftForAccount ".$localobject->bic." = ".$result."\n"; + $this->assertTrue($result); + return $localobject->id; } @@ -151,7 +184,7 @@ public function testBankAccountOther($localobject) * @param int $id Id of contract * @return int * - * @depends testBankAccountOther + * @depends testCheckSwiftForAccount * The depends says test is run only if previous is ok */ public function testBankAccountDelete($id) From eba49c22e7896630ae0a8041ad2611fa4bec6bb6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2024 02:21:58 +0200 Subject: [PATCH 003/127] CSS --- htdocs/compta/bank/bankentries_list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index d5a617b95f611..a2a3170fd40d0 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1178,17 +1178,17 @@ } // Numero statement if (!empty($arrayfields['b.num_releve']['checked'])) { - print ''; + print ''; } // Conciliated if (!empty($arrayfields['b.conciliated']['checked'])) { print ''; - print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1, 1, 'search_status onrightofpage maxwidth75'); + print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1, 1, 'search_status onrightofpage width75'); print ''; } // Bordereau if (!empty($arrayfields['b.fk_bordereau']['checked'])) { - print ''; + print ''; } // Action edit/delete and select print ''; From cb5f1aad5ae57ec2279a220af0ff32504ebda0c5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2024 02:41:08 +0200 Subject: [PATCH 004/127] Fix trans --- htdocs/compta/bank/bankentries_list.php | 6 +++--- htdocs/langs/en_US/banks.lang | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index a2a3170fd40d0..dfc5db2d996cc 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1620,7 +1620,7 @@ // Date ope if (!empty($arrayfields['b.dateo']['checked'])) { print ''; - print ''.dol_print_date($db->jdate($objp->do), "day").""; + print ''.dol_print_date($db->jdate($objp->do), "dayreduceformat").""; print ' '; print ''; print ''; @@ -1637,7 +1637,7 @@ // Date value if (!empty($arrayfields['b.datev']['checked'])) { print ''; - print ''.dol_print_date($db->jdate($objp->dv), "day").""; + print ''.dol_print_date($db->jdate($objp->dv), "dayreduceformat").""; print ' '; print ''; print ''; @@ -1676,7 +1676,7 @@ // Third party if (!empty($arrayfields['bu.label']['checked'])) { - print ''; + print ''; $companylinked_id = 0; $userlinked_id = 0; diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 6498de7e815f1..361bcf5695629 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -152,7 +152,7 @@ SelectChequeTransactionAndGenerate=Select/filter the checks which are to be incl SelectPaymentTransactionAndGenerate=Select/filter the documents which are to be included in the %s deposit receipt. Then, click on "Create". InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value InputReceiptNumberBis=YYYYMM or YYYYMMDD -EventualyAddCategory=Eventually, specify a category in which to classify the records +EventualyAddCategory=Optionally, a category in which to classify the operations ToConciliate=To reconcile? ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click DefaultRIB=Default BAN From 07e7fc94ed760715efb02cc8fe0f8dca4626c212 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2024 03:50:14 +0200 Subject: [PATCH 005/127] CSS --- htdocs/theme/eldy/global.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a8d9e41328ebd..dac093c156771 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -220,7 +220,7 @@ 100 ? 'zoom: '.getDolUserInt('MAIN_OPTIMIZEFORTEXTBROWSER').'%;' : 'zoom: 150%;') : ''; ?> - zoom: 105%; /* not supported by al browsers */ + /* zoom: 105%; */ /* not supported by all browsers. pb for popup position with select2. */ } /* Style used to protect html content in output to avoid attack by replacing full page with js content */ From bcb63ae7b468aa007ff45c399e3037baabd1db71 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2024 04:10:10 +0200 Subject: [PATCH 006/127] Fix phpunit --- test/phpunit/FunctionsLibTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 97e882705af52..cca95dc723380 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -1194,19 +1194,19 @@ public function testDolPrintPhone() $object->country_code = 'FR'; $phone = dol_print_phone('1234567890', $object->country_code); - $this->assertEquals('12 34 56 78 90', $phone, 'Phone for FR 1'); + $this->assertEquals('12 34 56 78 90', $phone, 'Phone for FR 1'); $object->country_code = 'FR'; $phone = dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ''); - $this->assertEquals('1234567890', $phone, 'Phone for FR 2'); + $this->assertEquals('1234567890', $phone, 'Phone for FR 2'); $object->country_code = 'FR'; $phone = dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); - $this->assertEquals('12 34 56 78 90', $phone, 'Phone for FR 3'); + $this->assertEquals('12 34 56 78 90', $phone, 'Phone for FR 3'); $object->country_code = 'CA'; $phone = dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); - $this->assertEquals('(123) 456-7890', $phone, 'Phone for CA 1'); + $this->assertEquals('(123) 456-7890', $phone, 'Phone for CA 1'); } From a4908abc8a65f94ed687775ad88863518674b210 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Fri, 26 Jul 2024 05:01:26 +0200 Subject: [PATCH 007/127] New Main checkbox left column to manage this conf for each users (#30439) Co-authored-by: Hystepik Co-authored-by: Laurent Destailleur --- htdocs/core/class/conf.class.php | 6 +++++ htdocs/core/lib/functions2.lib.php | 9 ++++++- htdocs/main.inc.php | 4 ++++ .../modulebuilder/template/myobject_list.php | 14 +++++------ htdocs/user/param_ihm.php | 24 +++++++++++++++++++ 5 files changed, 49 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 2d74064a97b37..6c2148a4b1ef5 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -142,6 +142,7 @@ class Conf extends stdClass public $format_date_hour_text; public $liste_limit; + public $main_checkbox_left_column; public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. @@ -822,6 +823,11 @@ public function setValues($db) } } + // conf->main_checkbox_left_column = constant to set checkbox list to left + if (!isset($this->main_checkbox_left_column)) { + $this->main_checkbox_left_column = getDolGlobalInt("MAIN_CHECKBOX_LEFT_COLUMN"); + } + // Set PRODUIT_LIMIT_SIZE if never defined if (!isset($this->global->PRODUIT_LIMIT_SIZE)) { $this->global->PRODUIT_LIMIT_SIZE = 1000; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 3277bb7ab3c9f..48e8ec902e2e4 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1777,7 +1777,14 @@ function dol_set_user_param($db, $conf, &$user, $tab) foreach ($tab as $key => $value) { // Set new parameters - if ($value) { + $forcevalue = 0; + if (is_array($value)) { + if ($value["forcevalue"] == 1) { + $forcevalue = 1; + } + $value = $value["value"]; + } + if ($forcevalue == 1 || $value) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,entity,param,value)"; $sql .= " VALUES (".((int) $user->id).",".((int) $conf->entity).","; $sql .= " '".$db->escape($key)."','".$db->escape($value)."')"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1514626b8788d..d2c1981deb7c2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1355,6 +1355,10 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type, $stopcode = 1) $conf->liste_limit = 20; } } + // Set main_checkbox_left_column from user setup + if (isset($user->conf->MAIN_CHECKBOX_LEFT_COLUMN)) { // If a user setup exists + $conf->main_checkbox_left_column = getDolUserInt('MAIN_CHECKBOX_LEFT_COLUMN'); // Can be 0 + } // Replace conf->css by personalized value if theme not forced if (!getDolGlobalString('MAIN_FORCETHEME') && getDolUserString('MAIN_THEME')) { diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 2cdc004dae996..2e6f9e6853195 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -584,7 +584,7 @@ } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); @@ -595,7 +595,7 @@ // -------------------------------------------------------------------- print ''; // Action column -if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { +if ($conf->main_checkbox_left_column) { print ''; $searchpicto = $form->showFilterButtons('left'); print $searchpicto; @@ -647,7 +647,7 @@ print ''; }*/ // Action column -if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { +if (!$conf->main_checkbox_left_column) { print ''; $searchpicto = $form->showFilterButtons(); print $searchpicto; @@ -662,7 +662,7 @@ // -------------------------------------------------------------------- print ''; // Action column -if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { +if ($conf->main_checkbox_left_column) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; $totalarray['nbfield']++; } @@ -694,7 +694,7 @@ $totalarray['nbfield']++; }*/ // Action column -if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { +if (!$conf->main_checkbox_left_column) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; $totalarray['nbfield']++; } @@ -766,7 +766,7 @@ print ''; // Action column - if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + if ($conf->main_checkbox_left_column) { print ''; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; @@ -843,7 +843,7 @@ }*/ // Action column - if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + if (!$conf->main_checkbox_left_column) { print ''; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 779bcecafbc1c..b401d90863f15 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -118,6 +118,12 @@ $tabparam["MAIN_SIZE_LISTE_LIMIT"] = ''; } + if (GETPOST("check_MAIN_CHECKBOX_LEFT_COLUMN") == "on") { + $tabparam["MAIN_CHECKBOX_LEFT_COLUMN"] = array("forcevalue" => 1, "value" => GETPOSTINT("MAIN_CHECKBOX_LEFT_COLUMN")); + } else { + $tabparam["MAIN_CHECKBOX_LEFT_COLUMN"] = ''; + } + if (GETPOST("check_MAIN_SIZE_SHORTLIST_LIMIT") == "on") { $tabparam["MAIN_SIZE_SHORTLIST_LIMIT"] = GETPOSTINT("MAIN_SIZE_SHORTLIST_LIMIT"); } else { @@ -325,6 +331,9 @@ function init_myfunc() if (jQuery("#check_MAIN_LANG_DEFAULT").prop("checked")) { jQuery("#main_lang_default").removeAttr(\'disabled\'); } else { jQuery("#main_lang_default").attr(\'disabled\',\'disabled\'); } + if (jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").prop("checked")) { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").removeAttr(\'disabled\');} + else { jQuery("#MAIN_CHECKBOX_LEFT_COLUMN").attr(\'disabled\',\'disabled\');} + if (jQuery("#check_MAIN_SIZE_LISTE_LIMIT").prop("checked")) { jQuery("#MAIN_SIZE_LISTE_LIMIT").removeAttr(\'disabled\'); } else { jQuery("#MAIN_SIZE_LISTE_LIMIT").attr(\'disabled\',\'disabled\'); } @@ -343,6 +352,7 @@ function init_myfunc() init_myfunc(); jQuery("#check_MAIN_LANDING_PAGE").click(function() { init_myfunc(); }); jQuery("#check_MAIN_LANG_DEFAULT").click(function() { init_myfunc(); }); + jQuery("#check_MAIN_CHECKBOX_LEFT_COLUMN").click(function() { init_myfunc(); }); jQuery("#check_MAIN_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); }); jQuery("#check_MAIN_SIZE_SHORTLIST_LIMIT").click(function() { init_myfunc(); }); jQuery("#check_AGENDA_DEFAULT_VIEW").click(function() { init_myfunc(); }); @@ -398,6 +408,14 @@ function init_myfunc() print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, (isset($object->conf->AGENDA_DEFAULT_VIEW) ? $object->conf->AGENDA_DEFAULT_VIEW : ''), 0, 0, 0, ''); print ''."\n"; + // Checkbox left menu + print ''.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").''; + print ''.(getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans("Yes") : $langs->trans("No")).''; + print 'conf->MAIN_CHECKBOX_LEFT_COLUMN) ? " checked" : ""); + print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo + print '> '; + print ''.$form->selectyesno("MAIN_CHECKBOX_LEFT_COLUMN", isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? $object->conf->MAIN_CHECKBOX_LEFT_COLUMN : getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'), 1).''; + // Max size of lists print ''.$langs->trans("MaxSizeList").''; print '' . getDolGlobalString('MAIN_SIZE_LISTE_LIMIT').''; @@ -533,6 +551,12 @@ function init_myfunc() } print ''."\n"; + // Checkbox left menu + print ''.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").''; + print ''.(getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans("Yes") : $langs->trans("No")).''; + print 'conf->MAIN_CHECKBOX_LEFT_COLUMN) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").''; + print ''.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?( $object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans("Yes") : $langs->trans("No")) : ' ').''; + // Max size for lists print ''.$langs->trans("MaxSizeList").''; print ''.getDolGlobalString('MAIN_SIZE_LISTE_LIMIT', ' ').''; From 4ffb024369ea2a3b904c86b6d7dde35c9d895a28 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:12:06 +0300 Subject: [PATCH 008/127] fix #30456 add Not Validated warning when in draft, remove pointless info (#30475) * fix #30456 add Not Validated warning when in draft, remove pointless info * fix Dolibarr#30456 add Not Validated warning when in draft, remove pointless info * remove whitspace --- .../modules/supplier_order/doc/pdf_cornas.modules.php | 11 +++++++++-- .../supplier_order/doc/pdf_muscadet.modules.php | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 4a48c93fc38d3..067211b1cc143 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -1236,6 +1236,10 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref); + if ($object->status == $object::STATUS_DRAFT) { + $pdf->SetTextColor(128, 0, 0); + $title .= ' - '.$outputlangs->transnoentities("NotValidated"); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $posy += 1; @@ -1277,12 +1281,15 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R'); - } else { + } + // no point in having this here this a document sent to supplier + /*} else { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(255, 0, 0); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); - } + }*/ + $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day'; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 1bbb8cbf62375..6ba444a712d42 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -1159,6 +1159,10 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref); + if ($object->status == $object::STATUS_DRAFT) { + $pdf->SetTextColor(128, 0, 0); + $title .= ' - '.$outputlangs->transnoentities("NotValidated"); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $posy += 1; @@ -1200,12 +1204,14 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R'); - } else { + } + // no point in having this here this a document sent to supplier + /*} else { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(255, 0, 0); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); - } + }*/ $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day'; From fa700074c9406f0868df0ed9cb5fd7e4e074d3f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jul 2024 13:31:44 +0200 Subject: [PATCH 009/127] Fix missing migration due to bad table name in previous versions --- htdocs/install/mysql/migration/19.0.0-20.0.0.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql index 70e5b8bc814d1..d2eabcd402b14 100644 --- a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql +++ b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql @@ -32,10 +32,13 @@ -- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); --- V18 forgotten +-- V18 and - forgotten UPDATE llx_paiement SET ref = rowid WHERE ref IS NULL OR ref = ''; +ALTER TABLE llx_c_holiday_types ADD COLUMN block_if_negative integer NOT NULL DEFAULT 0 AFTER fk_country; +ALTER TABLE llx_c_holiday_types ADD COLUMN sortorder smallint; + -- V19 forgotten From 7be611deb74fce36cdf86692f75fbe44615de875 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 27 Jul 2024 12:37:58 +0200 Subject: [PATCH 010/127] FIX Erreur SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key (#30479) specification without a key length --- htdocs/install/mysql/migration/19.0.0-20.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_menu.key.sql | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql index d2eabcd402b14..ff150c92c7ca5 100644 --- a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql +++ b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql @@ -404,7 +404,10 @@ INSERT INTO llx_c_revenuestamp(rowid,fk_pays,taux,revenuestamp_type,note,active) ALTER TABLE llx_hrm_evaluation ADD COLUMN entity INTEGER DEFAULT 1 NOT NULL; +-- Erreur SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length +ALTER TABLE llx_menu DROP INDEX idx_menu_uk_menu; ALTER TABLE llx_menu MODIFY COLUMN url TEXT NOT NULL; +ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity); UPDATE llx_c_units SET short_label = 'mn' WHERE short_label = 'i' AND code = 'MI'; diff --git a/htdocs/install/mysql/tables/llx_menu.key.sql b/htdocs/install/mysql/tables/llx_menu.key.sql index 10746d25b4c41..6380a947737bb 100644 --- a/htdocs/install/mysql/tables/llx_menu.key.sql +++ b/htdocs/install/mysql/tables/llx_menu.key.sql @@ -21,5 +21,7 @@ ALTER TABLE llx_menu ADD INDEX idx_menu_menuhandler_type (menu_handler, type); -ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, url, entity); +-- Erreur SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length +-- ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, url, entity); +ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity); From fa915b775b8c7b442f506017a2ff94bd3a241428 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 14:51:34 +0200 Subject: [PATCH 011/127] Fix migration --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 2a21c7aa4b10f..6bf78e63cea01 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -32,6 +32,16 @@ -- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); +-- Previous version instruction forgotten + +-- missing entity field +ALTER TABLE llx_c_holiday_types DROP INDEX uk_c_holiday_types; +ALTER TABLE llx_c_holiday_types ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; +ALTER TABLE llx_c_holiday_types ADD UNIQUE INDEX uk_c_holiday_types (entity, code); + + +-- V21 migration + DROP TABLE llx_contratdet_log; @@ -79,4 +89,4 @@ ALTER TABLE llx_c_hrm_public_holiday ADD UNIQUE INDEX uk_c_hrm_public_holiday2(e ALTER TABLE llx_societe_account ADD COLUMN date_last_reset_password datetime after date_previous_login; -- Rename of bank table -ALTER TABLE llx_bank_categ RENAME TO llx_category_bank; \ No newline at end of file +ALTER TABLE llx_bank_categ RENAME TO llx_category_bank; From 5432c9dfc71b4584025bb6f0f3708ff1771b6f3b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 14:57:01 +0200 Subject: [PATCH 012/127] Add translation --- htdocs/langs/en_US/languages.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index 96b0c5a8fbbd2..a824d6334bd4e 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - languages Language_am_ET=Ethiopian Language_af_ZA=Afrikaans (South Africa) +Language_ar_AE=Arabic (Arab Emirates) Language_ar_AR=Arabic Language_ar_DZ=Arabic (Algeria) Language_ar_EG=Arabic (Egypt) From c37b909debb54927a24c94e8ab72b9d7176f2047 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 14:57:01 +0200 Subject: [PATCH 013/127] Add translation --- htdocs/langs/en_US/languages.lang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index 96b0c5a8fbbd2..6afa486d0339e 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -1,10 +1,12 @@ # Dolibarr language file - Source file is en_US - languages Language_am_ET=Ethiopian Language_af_ZA=Afrikaans (South Africa) +Language_ar_AE=Arabic (Arab Emirates) Language_ar_AR=Arabic Language_ar_DZ=Arabic (Algeria) Language_ar_EG=Arabic (Egypt) Language_ar_JO=Arabic (Jordania) +Language_ar_LB=Arabic (Liban) Language_ar_MA=Arabic (Moroco) Language_ar_SA=Arabic (Saudi Arabia) Language_ar_TN=Arabic (Tunisia) From 290f164b4f165413b48e0acdabf0ba59318133a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 15:26:56 +0200 Subject: [PATCH 014/127] Sanitize output --- htdocs/core/lib/functions.lib.php | 1 - htdocs/ticket/card.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fa69487be7e9b..0b614f642545b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2617,7 +2617,6 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $morehtmlref = $hookmanager->resPrint; } - print '
'; print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright); print '
'; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 3a75823806235..94431b74b0ccf 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1049,7 +1049,7 @@ $object->ref = $object->id; print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'track_id'); } else { - print $object->track_id; + print dolPrintLabel($object->track_id); } } else { print $langs->trans('None'); From 73e4aa31471aacb09674ca19d5a283e1a9184655 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 15:47:17 +0200 Subject: [PATCH 015/127] Fix no html allowed into the subject of email/message --- htdocs/public/ticket/create_ticket.php | 4 ++-- htdocs/ticket/card.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index e4401520ca068..066fe034d2125 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -210,7 +210,7 @@ } } - if (!GETPOST("subject", "restricthtml")) { + if (!GETPOST("subject", "alphanohtml")) { $error++; array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject"))); $action = ''; @@ -272,7 +272,7 @@ $object->db->begin(); - $object->subject = GETPOST("subject", "restricthtml"); + $object->subject = GETPOST("subject", "alphanohtml"); $object->message = GETPOST("message", "restricthtml"); $object->origin_email = $origin_email; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 43ebd2bf7b6dc..e969889fe5e19 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -885,7 +885,7 @@ print dol_get_fiche_head($head, 'tabTicket', $langs->trans("Ticket"), -1, 'ticket'); $morehtmlref = '
'; - $morehtmlref .= $object->subject; + $morehtmlref .= dolPrintLabel($object->subject); // Author $createdbyshown = 0; if ($object->fk_user_create > 0) { From 8ac368ce175a7add44aa0035d02769208f05ae65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 18:07:37 +0200 Subject: [PATCH 016/127] FIX Better sanitizing for javascript. Fix <> bypass. --- htdocs/core/lib/functions.lib.php | 31 ++++++--- htdocs/main.inc.php | 8 ++- test/phpunit/ExampleTest.php | 102 ++++++++++++++++++++++++++++++ test/phpunit/SecurityTest.php | 63 +++++++++++++++--- 4 files changed, 183 insertions(+), 21 deletions(-) create mode 100644 test/phpunit/ExampleTest.php diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 031a87ac0520e..cdc7057c05dba 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7859,14 +7859,14 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto = * Clean a string to keep only desirable HTML tags. * WARNING: This also clean HTML comments (because they can be used to obfuscate tag name). * - * @param string $stringtoclean String to clean - * @param int $cleanalsosomestyles Remove absolute/fixed positioning from inline styles - * @param int $removeclassattribute 1=Remove the class attribute from tags - * @param int $cleanalsojavascript Remove also occurrence of 'javascript:'. - * @param int $allowiframe Allow iframe tags. - * @param string[] $allowed_tags List of allowed tags to replace the default list - * @param int $allowlink Allow "link" tags. - * @return string String cleaned + * @param string $stringtoclean String to clean + * @param int $cleanalsosomestyles Remove absolute/fixed positioning from inline styles + * @param int $removeclassattribute 1=Remove the class attribute from tags + * @param int $cleanalsojavascript Remove also occurrence of 'javascript:'. + * @param int $allowiframe Allow iframe tags. + * @param string[] $allowed_tags List of allowed tags to replace the default list + * @param int $allowlink Allow "link" tags. + * @return string String cleaned * * @see dol_htmlwithnojs() dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_neverthesehtmltags() */ @@ -7904,9 +7904,10 @@ function dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles = 1, $stringtoclean = preg_replace('/:/i', ':', $stringtoclean); $stringtoclean = preg_replace('/:|�+58|:/i', '', $stringtoclean); // refused string ':' encoded (no reason to have a : encoded like this) to disable 'javascript:...' + // Remove all HTML tags $temp = strip_tags($stringtoclean, $allowed_tags_string); // Warning: This remove also undesired , so may changes string obfuscated with that pass the injection detection into a harmfull string - if ($cleanalsosomestyles) { // Clean for remaining html tags + if ($cleanalsosomestyles) { // Clean for remaining html tags $temp = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/i', '', $temp); // Note: If hacker try to introduce css comment into string to bypass this regex, the string must also be encoded by the dol_htmlentitiesbr during output so it become harmless } if ($removeclassattribute) { // Clean for remaining html tags @@ -8159,6 +8160,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' } else { $out = $stringtoencode; + // First clean HTML content do { $oldstringtoclean = $out; @@ -8270,6 +8272,17 @@ static function ($m) { // Restore entity ' into ' (restricthtml is for html content so we can use html entity) $out = preg_replace('/'/i', "'", $out); + + // Now remove js + // List of dom events is on https://www.w3schools.com/jsref/dom_obj_event.asp and https://developer.mozilla.org/en-US/docs/Web/Events + $out = preg_replace('/on(mouse|drag|key|load|touch|pointer|select|transition)[a-z]*\s*=/i', '', $out); // onmousexxx can be set on img or any html tag like + $out = preg_replace('/on(abort|after|animation|auxclick|before|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|copy|cut)[a-z]*\s*=/i', '', $out); + $out = preg_replace('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', '', $out); + $out = preg_replace('/on(lostpointercapture|offline|online|pagehide|pageshow)[a-z]*\s*=/i', '', $out); + $out = preg_replace('/on(paste|pause|play|playing|progress|ratechange|reset|resize|scroll|search|seeked|seeking|show|stalled|start|submit|suspend)[a-z]*\s*=/i', '', $out); + $out = preg_replace('/on(timeupdate|toggle|unload|volumechange|waiting|wheel)[a-z]*\s*=/i', '', $out); + // More not into the previous list + $out = preg_replace('/on(repeat|begin|finish|beforeinput)[a-z]*\s*=/i', '', $out); } while ($oldstringtoclean != $out); // Check the limit of external links that are automatically executed in a Rich text content. We count: diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 30909d0cd59be..91758cb05cdcf 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -211,6 +211,7 @@ static function ($m) { } $inj += preg_match('/base\s+href/si', $val); $inj += preg_match('/=data:/si', $val); + // List of dom events is on https://www.w3schools.com/jsref/dom_obj_event.asp and https://developer.mozilla.org/en-US/docs/Web/Events $inj += preg_match('/on(mouse|drag|key|load|touch|pointer|select|transition)[a-z]*\s*=/i', $val); // onmousexxx can be set on img or any html tag like $inj += preg_match('/on(abort|after|animation|auxclick|before|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|copy|cut)[a-z]*\s*=/i', $val); @@ -219,11 +220,12 @@ static function ($m) { $inj += preg_match('/on(paste|pause|play|playing|progress|ratechange|reset|resize|scroll|search|seeked|seeking|show|stalled|start|submit|suspend)[a-z]*\s*=/i', $val); $inj += preg_match('/on(timeupdate|toggle|unload|volumechange|waiting|wheel)[a-z]*\s*=/i', $val); // More not into the previous list - $inj += preg_match('/on(repeat|begin|finish|beforeinput)[a-z]*\s*=/i', $val); - // We refuse html into html because some hacks try to obfuscate evil strings by inserting HTML into HTML. Example: error=alert(1) to bypass test on onerror - $tmpval = preg_replace('/<[^<]+>/', '', $val); + // We refuse html into html because some hacks try to obfuscate evil strings by inserting HTML into HTML. + // Example: error=alert(1) or =alert(1) to bypass test on onerror= + $tmpval = preg_replace('/<[^<]*>/', '', $val); + // List of dom events is on https://www.w3schools.com/jsref/dom_obj_event.asp and https://developer.mozilla.org/en-US/docs/Web/Events $inj += preg_match('/on(mouse|drag|key|load|touch|pointer|select|transition)[a-z]*\s*=/i', $tmpval); // onmousexxx can be set on img or any html tag like $inj += preg_match('/on(abort|after|animation|auxclick|before|blur|cancel|canplay|canplaythrough|change|click|close|contextmenu|cuechange|copy|cut)[a-z]*\s*=/i', $tmpval); diff --git a/test/phpunit/ExampleTest.php b/test/phpunit/ExampleTest.php new file mode 100644 index 0000000000000..eea008679971d --- /dev/null +++ b/test/phpunit/ExampleTest.php @@ -0,0 +1,102 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see https://www.gnu.org/ + */ + +/** + * \file test/phpunit/ExampleTest.php + * \ingroup test + * \brief PHPUnit test to use as example or test. this one is not called by AllTest.php + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +//require_once 'PHPUnit/Autoload.php'; + +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (! defined("NOSESSION")) { + define("NOSESSION", '1'); +} + +require_once dirname(__FILE__).'/../../htdocs/main.inc.php'; // We force include of main.inc.php instead of master.inc.php even if we are in CLI mode because it contains a lot of security components we want to test. +require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; +require_once dirname(__FILE__).'/CommonClassTest.class.php'; + +if (empty($user->id)) { + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS = 1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class SecurityTest extends CommonClassTest +{ + /** + * testExample + * + * @return string + */ + public function testExample() + { + global $conf,$user,$langs,$db; + $conf = $this->savconf; + $user = $this->savuser; + $langs = $this->savlangs; + $db = $this->savdb; + + // Force default mode + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 0; + $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0; + $conf->global->MAIN_DISALLOW_URL_INTO_DESCRIPTIONS = 0; + + /* + $result = testSqlAndScriptInject('=alert(document.domain)', 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'Test example a'); + */ + } +} diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 89864c36451d3..368d95fff5769 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -280,6 +280,14 @@ public function testSqlAndScriptInjectWithPHPUnit() $result = testSqlAndScriptInject($test, 2); //print "test=".$test." result=".$result."\n"; $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject with a non valid UTF8 char'); + + $test = '=alert(document.domain)'; + $result = testSqlAndScriptInject($test, 0); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject with an obfuscated string that bypass the WAF'); + + $test = '=alert(document.domain)'; + $result = testSqlAndScriptInject($test, 0); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject with an obfuscated string that bypass the WAF'); } /** @@ -328,8 +336,8 @@ public function testGETPOST() $_POST["param13b"] = 'n n > < " XSS'; $_POST["param13c"] = 'aaa:<:bbb'; $_POST["param14"] = "Text with ' encoded with the numeric html entity converted into text entity ' (like when submitted by CKEditor)"; - $_POST["param15"] = " src=>0xbeefed"; - //$_POST["param15b"]="Example HTML

This is a paragraph.

  • Item 1
  • Item 2
  • "; + $_POST["param15"] = " src=>0xbeefed"; + $_POST["param15b"] = " src=>0xbeefed"; $_POST["param16"] = 'abc'; $_POST["param17"] = 'abc'; $_POST["param18"] = 'abc'; @@ -506,14 +514,19 @@ public function testGETPOST() print __METHOD__." result=".$result."\n"; $this->assertEquals("Text with ' encoded with the numeric html entity converted into text entity ' (like when submitted by CKEditor)", $result, 'Test 14'); - $result = GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string + $result = GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string + print __METHOD__." result=".$result."\n"; + $this->assertEquals("0xbeefed", $result, 'Test 15'); // The GETPOST return a harmull string + + $result = GETPOST("param15b", 'restricthtml'); // param15b = src=>0xbeefed that is a dangerous string print __METHOD__." result=".$result."\n"; - $this->assertEquals("0xbeefed", $result, 'Test 15'); // The GETPOST return a harmull string + $this->assertEquals("0xbeefed", $result, 'Test 15b'); // The GETPOST return a harmull string $result = GETPOST("param19", 'restricthtml'); print __METHOD__." result=".$result."\n"; $this->assertEquals('XSS', $result, 'Test 19'); + // Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML only to test disabling of bad attributes $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1; @@ -525,8 +538,8 @@ public function testGETPOST() print __METHOD__." result for param0=".$result."\n"; $this->assertEquals($resultexpected, $result, 'Test on param0'); - $result = GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string - print __METHOD__." result for param15=".$result."\n"; + $result = GETPOST("param15b", 'restricthtml'); // param15b = src=>0xbeefed that is a dangerous string + print __METHOD__." result for param15b=".$result."\n"; //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... //$this->assertEquals(' src=>0xbeefed', $result, 'Test 15b'); // ... on other PHP and libxml versions, we got a HTML that has been cleaned @@ -552,15 +565,19 @@ public function testGETPOST() print __METHOD__." result for param0=".$result."\n"; $this->assertEquals($resultexpected, $result, 'Test on param0'); - $result = GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string - print __METHOD__." result=".$result."\n"; + $result = GETPOST("param15b", 'restricthtml'); // param15b = src=>0xbeefed that is a dangerous string + print __METHOD__." result for param15b=".$result."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... + //$this->assertEquals(' src=>0xbeefed', $result, 'Test 15b'); // ... on other PHP and libxml versions, we got a HTML that has been cleaned $result = GETPOST("param6", 'restricthtml'); print __METHOD__." result for param6=".$result." - before=".$_POST["param6"]."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... $this->assertEquals('">', $result); $result = GETPOST("param7", 'restricthtml'); print __METHOD__." result param7 = ".$result."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... $this->assertEquals('"c:\this is a path~1\aaan &#x110;" abcdef', $result); } @@ -576,15 +593,19 @@ public function testGETPOST() print __METHOD__." result for param0=".$result."\n"; $this->assertEquals($resultexpected, $result, 'Test on param0'); - $result = GETPOST("param15", 'restricthtml'); // param15 = src=>0xbeefed that is a dangerous string + $result = GETPOST("param15b", 'restricthtml'); // param15b = src=>0xbeefed that is a dangerous string print __METHOD__." result=".$result."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... + //$this->assertEquals(' src=>0xbeefed', $result, 'Test 15b'); // ... on other PHP and libxml versions, we got a HTML that has been cleaned $result = GETPOST("param6", 'restricthtml'); print __METHOD__." result for param6=".$result." - before=".$_POST["param6"]."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... $this->assertEquals('">', $result); $result = GETPOST("param7", 'restricthtml'); print __METHOD__." result param7 = ".$result."\n"; + //$this->assertEquals('InvalidHTMLStringCantBeCleaned', $result, 'Test 15b'); // With some PHP and libxml version, we got this result when parsing invalid HTML, but ... $this->assertEquals('"c:\this is a path~1\aaan 110;" abcdef', $result); } @@ -1208,6 +1229,7 @@ public function testDolPrintHTML() print __METHOD__." result=".$result."\n"; $this->assertEquals($stringtotest, $result, 'Error'); + $conf->global->MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 0; $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0; // Enabled option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY if possible @@ -1298,6 +1320,29 @@ public function testDolHtmlWithNoJs() $this->assertEquals($test, $result, 'dol_htmlwithnojs failed with an emoji when MAIN_RESTRICTHTML_ONLY_VALID_HTML=1'); + // For a string with js on attribute + + // Without HTML_TIDY + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 0; + $result = dol_htmlwithnojs('', 1, 'restricthtml'); + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $sav1; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $sav2; + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result, 'Test example'); + + // With HTML TIDY + if (extension_loaded('tidy') && class_exists("tidy")) { + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = 0; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1; + $result = dol_htmlwithnojs('', 1, 'restricthtml'); + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML = $sav1; + $conf->global->MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = $sav2; + //$result = dol_string_onlythesehtmltags($aa, 0, 1, 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result, 'Test example'); + } + return 0; } From 306e1225dda8047b8196dbaacbf9394c14e7db99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 19:13:19 +0200 Subject: [PATCH 017/127] Missing date creation --- .../OAuth/Common/Storage/DoliStorage.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 036cc320e4aca..070a5d2b92a14 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -137,8 +137,8 @@ public function storeAccessToken($service, TokenInterface $tokenobj) if ($obj) { // update $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'"; - $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $sql .= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'"; + $sql .= " WHERE rowid = ".((int) $obj['rowid']); $resql = $this->db->query($sql); if (!$resql) { dol_print_error($this->db); @@ -147,7 +147,7 @@ public function storeAccessToken($service, TokenInterface $tokenobj) // save $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity, datec)"; $sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape(dolEncrypt($serializedToken))."', ".((int) $conf->entity).", "; - $sql .= " '".$this->db->idate(dol_now())."'"; + $sql .= "'".$this->db->idate(dol_now())."'"; $sql .= ")"; $resql = $this->db->query($sql); if (!$resql) { @@ -299,13 +299,15 @@ public function storeAuthorizationState($service, $state) if ($obj) { // update $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET state = '".$this->db->escape($newstate)."'"; - $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $sql .= " SET state = '".$this->db->escape($newstate)."'"; + $sql .= " WHERE rowid = ".((int) $obj['rowid']); $resql = $this->db->query($sql); } else { // insert (should not happen) - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity)"; - $sql.= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity, datec)"; + $sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).", "; + $sql .= "'".$this->db->idate(dol_now())."'"; + $sql .= ")"; $resql = $this->db->query($sql); } From fbdc94cd748813614f641cc77d8a4961ce996335 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 19:32:02 +0200 Subject: [PATCH 018/127] Fix bad position of selected option --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9a1aeeb5cd0c3..d1c6c58d83226 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8744,7 +8744,7 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, } } else { $id = (string) $id; // if $id = 0, then $id = '0' - if ($id != '' && ($id == $key || ($id == 'ifone' && count($array) == 1)) && !$disabled) { + if ($id != '' && (($id == (string) $key) || ($id == 'ifone' && count($array) == 1)) && !$disabled) { $out .= ' selected'; // To preselect a value } } From 07079fc2394d90788e76ce6d080894cc4b3f70fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 19:32:02 +0200 Subject: [PATCH 019/127] Fix bad position of selected option --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 023982e6a7ba1..f32c0f4119fd6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8707,7 +8707,7 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, } } else { $id = (string) $id; // if $id = 0, then $id = '0' - if ($id != '' && ($id == $key || ($id == 'ifone' && count($array) == 1)) && !$disabled) { + if ($id != '' && (($id == (string) $key) || ($id == 'ifone' && count($array) == 1)) && !$disabled) { $out .= ' selected'; // To preselect a value } } From d062575204733814641092e2195d3fe125732200 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 19:13:19 +0200 Subject: [PATCH 020/127] Missing date creation --- .../OAuth/Common/Storage/DoliStorage.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 036cc320e4aca..070a5d2b92a14 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -137,8 +137,8 @@ public function storeAccessToken($service, TokenInterface $tokenobj) if ($obj) { // update $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'"; - $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $sql .= " SET token = '".$this->db->escape(dolEncrypt($serializedToken))."'"; + $sql .= " WHERE rowid = ".((int) $obj['rowid']); $resql = $this->db->query($sql); if (!$resql) { dol_print_error($this->db); @@ -147,7 +147,7 @@ public function storeAccessToken($service, TokenInterface $tokenobj) // save $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity, datec)"; $sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape(dolEncrypt($serializedToken))."', ".((int) $conf->entity).", "; - $sql .= " '".$this->db->idate(dol_now())."'"; + $sql .= "'".$this->db->idate(dol_now())."'"; $sql .= ")"; $resql = $this->db->query($sql); if (!$resql) { @@ -299,13 +299,15 @@ public function storeAuthorizationState($service, $state) if ($obj) { // update $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET state = '".$this->db->escape($newstate)."'"; - $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $sql .= " SET state = '".$this->db->escape($newstate)."'"; + $sql .= " WHERE rowid = ".((int) $obj['rowid']); $resql = $this->db->query($sql); } else { // insert (should not happen) - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity)"; - $sql.= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, state, entity, datec)"; + $sql .= " VALUES ('".$this->db->escape($servicepluskeyforprovider)."', '".$this->db->escape($newstate)."', ".((int) $conf->entity).", "; + $sql .= "'".$this->db->idate(dol_now())."'"; + $sql .= ")"; $resql = $this->db->query($sql); } From 221bdc78f62d541a0e3fe1b5a109d82ee93e0d7c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 27 Jul 2024 19:51:25 +0200 Subject: [PATCH 021/127] FIX replace __ENTITY__ tag with id 1 (master entity) (#30478) * FIX replace __ENTITY__ tag with id 1 (master entity) * FIX phan error --- htdocs/install/step2.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index cb18b8a4c9143..0686e19acaedf 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -536,6 +536,9 @@ $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer); } + // Replace __ENTITY__ tag with 1 (master entity), this is only for dictionaries. + $buffer = preg_replace('/__ENTITY__/i', '1', $buffer); + //dolibarr_install_syslog("step2: request: " . $buffer); $resql = $db->query($buffer, 1); if ($resql) { From 57ad79a95bcbf560b880469139d1e1e74154274f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Jul 2024 22:25:13 +0200 Subject: [PATCH 022/127] QUAL: Move the public css file into the public directory --- htdocs/admin/ticket_public.php | 17 ---------------- htdocs/public/ticket/create_ticket.php | 2 +- htdocs/{ => public}/ticket/css/styles.css.php | 20 +++++++++---------- htdocs/public/ticket/index.php | 2 +- htdocs/public/ticket/list.php | 2 +- htdocs/public/ticket/view.php | 2 +- htdocs/ticket/class/ticket.class.php | 2 +- 7 files changed, 14 insertions(+), 33 deletions(-) rename htdocs/{ => public}/ticket/css/styles.css.php (93%) diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index abda918f20200..83a5f66d5e835 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -346,23 +346,6 @@ print ''; */ - /*if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) - { - // Show logo for module - print '' . $langs->trans("TicketsShowModuleLogo") . ''; - print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('TICKET_SHOW_MODULE_LOGO'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("TICKET_SHOW_MODULE_LOGO", $arrval, getDolGlobalInt('TICKET_SHOW_MODULE_LOGO')); - } - print ''; - print ''; - print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help'); - print ''; - print ''; - }*/ // Show logo for company print ''.$langs->trans("TicketsShowCompanyLogo").''; diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 10b0cf496b1c3..df93d86311ba3 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -510,7 +510,7 @@ $arrayofjs = array(); -$arrayofcss = array('/opensurvey/css/style.css', getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/ticket/').'css/styles.css.php'); +$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); llxHeaderTicket($langs->trans("CreateTicket"), "", 0, 0, $arrayofjs, $arrayofcss); diff --git a/htdocs/ticket/css/styles.css.php b/htdocs/public/ticket/css/styles.css.php similarity index 93% rename from htdocs/ticket/css/styles.css.php rename to htdocs/public/ticket/css/styles.css.php index 5e3ec60d98ce9..e981f3742b014 100644 --- a/htdocs/ticket/css/styles.css.php +++ b/htdocs/public/ticket/css/styles.css.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/ticket/css/styles.css.php + * \file htdocs/public/ticket/css/styles.css.php * \brief File for CSS style sheet for ticket module */ @@ -45,7 +45,7 @@ session_cache_limiter('public'); -require_once '../../main.inc.php'; +require_once '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Define css type @@ -63,15 +63,6 @@ min-height: 100%; height: 100%; } -html { - -} - - div.ticketform { font-family: arial; position: static; @@ -131,3 +122,10 @@ margin-right: 0; } } + +.ticketform { + a.butAction { + box-shadow: 3px 3px 10px #ddd; + /* background-color: #666; */ + } +} diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index 860a82ec0ffc4..b2af42bfc7849 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -82,7 +82,7 @@ } $arrayofjs = array(); -$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/ticket/').'css/styles.css.php'); +$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); llxHeaderTicket($langs->trans('Tickets'), "", 0, 0, $arrayofjs, $arrayofcss); diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 6413bb102d3e7..627cb026b7858 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -189,7 +189,7 @@ } $arrayofjs = array(); -$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/ticket/').'css/styles.css.php'); +$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index ff1da7c898bfd..41a58e1713a0c 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -237,7 +237,7 @@ } $arrayofjs = array(); -$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/ticket/').'css/styles.css.php'); +$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index f5a7c80c1ffe3..4d62ac11a589f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2940,7 +2940,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) // If public interface is not enable, use link to internal page into mail $url_public_ticket = (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE') ? - (getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') . '/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.$object->track_id; + (getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') . '/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.urlencode($object->track_id); $message .= '
    '.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$object->track_id.'
    '; From b423c31343f6faa090bb7334c5823b2ce6886879 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 00:06:39 +0200 Subject: [PATCH 023/127] CSS --- htdocs/theme/eldy/timeline.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index f4588117939db..cee089a246f0e 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -205,6 +205,10 @@ color: #fff !important; } +.timeline-item .messaging-title { + word-break: break-all; +} + .timeline-documents-container{ } From 7d1aa1e7f6cb74c34b505473fb4189c5c4eae7ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 14:54:06 +0200 Subject: [PATCH 024/127] Debug v20 - fix cond to show dict, several fix in public ticket gui --- htdocs/admin/dict.php | 12 +++-- htdocs/admin/ticket.php | 3 ++ htdocs/core/class/html.formticket.class.php | 46 +++++++++---------- htdocs/core/lib/admin.lib.php | 4 +- htdocs/core/modules/DolibarrModules.class.php | 6 ++- htdocs/core/modules/modTicket.class.php | 8 ++-- htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 2 +- htdocs/public/ticket/create_ticket.php | 9 ++-- htdocs/public/ticket/list.php | 16 ++++--- htdocs/theme/eldy/global.inc.php | 19 +++++--- htdocs/theme/md/style.css.php | 10 +++- htdocs/ticket/class/actions_ticket.class.php | 11 +++-- htdocs/ticket/class/ticket.class.php | 2 +- 14 files changed, 88 insertions(+), 61 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ca4c3618797f9..4e79bde4b08fc 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -656,7 +656,7 @@ continue; } $tabcomplete[$key]['id'] = $i; - // TODO Comment the line when data is stored into the tabcomplete array + // TODO Comment this lines when data is stored into the tabcomplete array $tabcomplete[$key]['cond'] = $tabcond[$i]; $tabcomplete[$key]['rowid'] = $tabrowid[$i]; $tabcomplete[$key]['fieldinsert'] = $tabfieldinsert[$i]; @@ -2247,8 +2247,8 @@ if (!is_null($withentity)) { print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } else { $tmpaction = 'view'; @@ -2303,8 +2303,10 @@ } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { $valuetoshow = price($valuetoshow); } - if ($value == 'private') { - $valuetoshow = yn($valuetoshow); + if (in_array($value, array('private', 'joinfile', 'use_default'))) { + if ($valuetoshow) { + $valuetoshow = yn($valuetoshow); + } } elseif ($value == 'libelle_facture') { $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->$value); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 86e723de58522..44e8f5e9f3d90 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -583,6 +583,7 @@ $htmlname = "product_category_id"; print ''.$langs->trans("TicketChooseProductCategory").''; print ''; + print img_picto('', 'category', 'class="pictofixedwidth"'); $formcategory->selectProductCategory(getDolGlobalString('TICKET_PRODUCT_CATEGORY'), $htmlname); if ($conf->use_javascript_ajax) { print ajax_combobox('select_'.$htmlname); @@ -620,9 +621,11 @@ print ''; + /* * Notification */ + // Admin var of module print load_fiche_titre($langs->trans("Notification"), '', ''); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index b2bf6e51c30d8..e648b5a367761 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -243,8 +243,8 @@ public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Con print ''; + // Ref if ($this->withref) { - // Ref $defaultref = $ticketstat->getDefaultRef(); if ($mode == 'edit') { @@ -255,10 +255,10 @@ public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Con print ''; } - // TITLE + // Title if ($this->withemail) { print ''; if ($with_contact) { @@ -382,21 +382,21 @@ function(response) { // Type of Ticket print ''; // Group => Category print ''; // Severity => Priority print ''; if (isModEnabled('knowledgemanagement')) { @@ -476,13 +476,13 @@ function groupticketchange() { print ''; } - // MESSAGE + // Message print '"; } } @@ -536,7 +536,7 @@ function groupticketchange() { } $out = ''; - $out .= ''; + $out .= ''; $out .= ''; } if (!empty($arrayfields['severity.code']['checked'])) { print ''; } @@ -580,21 +584,21 @@ // Date ticket if (!empty($arrayfields['t.datec']['checked'])) { print ''; } // Date read if (!empty($arrayfields['t.date_read']['checked'])) { print ''; } // Date close if (!empty($arrayfields['t.date_close']['checked'])) { print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index dac093c156771..463be239053db 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1705,7 +1705,11 @@ overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ +div.fiche>div.tabBar>form>div.div-table-responsive { + min-height: 392px; +} .div-table-responsive, .div-table-responsive-no-min { overflow-x: auto; min-height: 0.01%; @@ -1713,20 +1717,21 @@ .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ -div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; -} div.fiche>form>div.div-table-responsive { min-height: 392px; } -div.fiche>div.tabBar>form>div.div-table-responsive { - min-height: 392px; +div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { + overflow-x: auto; } -div.fiche { - /* text-align: justify; */ + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { + min-height: 392px; } + .display-flex { display: flex; flex-wrap: wrap; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 02a81fbc25a46..e8464f67c3753 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1861,6 +1861,7 @@ overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ div.fiche>div.tabBar>form>div.div-table-responsive { min-height: 392px; @@ -1872,14 +1873,21 @@ .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ +div.fiche>form>div.div-table-responsive { + min-height: 392px; +} div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { overflow-x: auto; } -div.fiche>form>div.div-table-responsive { + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { min-height: 392px; } + .display-flex { display: flex; flex-wrap: wrap; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 7bb1dbc713a4c..dda526d3cf4f8 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -295,7 +295,7 @@ public function viewTicketMessages($show_private, $show_user, $object) || ($arraymsgs['private'] == "1" && $show_private) ) { //print ''; - print ''; + print ''; print ''; @@ -316,13 +316,14 @@ public function viewTicketMessages($show_private, $show_user, $object) print $arraymsgs['fk_contact_author']; } } else { - print $langs->trans('Customer'); + print ''.$langs->trans('Unknown').''; } print ''; } - print ''; - print ''; - print ''; + + print ''; + print ''; print $arraymsgs['message']; //attachment diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 4d62ac11a589f..fa6eefcde5c1d 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1956,7 +1956,7 @@ public function loadCacheMsgsTicket() $obj = $this->db->fetch_object($resql); $this->cache_msgs_ticket[$i]['id'] = $obj->rowid; $this->cache_msgs_ticket[$i]['fk_user_author'] = $obj->fk_user_author; - if ($obj->code == 'TICKET_MSG' && empty($obj->fk_user_author)) { + if (in_array($obj->code, array('TICKET_MSG', 'AC_TICKET_CREATE')) && empty($obj->fk_user_author)) { $this->cache_msgs_ticket[$i]['fk_contact_author'] = $obj->email_from; } $this->cache_msgs_ticket[$i]['datec'] = $this->db->jdate($obj->datec); From d0216a4922dd273aefb50ec120b6e54ed2b8b2bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 00:06:39 +0200 Subject: [PATCH 025/127] CSS --- htdocs/theme/eldy/timeline.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index f4588117939db..cee089a246f0e 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -205,6 +205,10 @@ color: #fff !important; } +.timeline-item .messaging-title { + word-break: break-all; +} + .timeline-documents-container{ } From 75d1fbc49ff8a11db07c3acc4623a3c1d087c9ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 14:54:06 +0200 Subject: [PATCH 026/127] Debug v20 - fix cond to show dict, several fix in public ticket gui --- htdocs/admin/dict.php | 12 +++-- htdocs/admin/ticket.php | 3 ++ htdocs/core/class/html.formticket.class.php | 46 +++++++++---------- htdocs/core/lib/admin.lib.php | 4 +- htdocs/core/modules/DolibarrModules.class.php | 6 ++- htdocs/core/modules/modTicket.class.php | 8 ++-- htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 2 +- htdocs/public/ticket/create_ticket.php | 5 +- htdocs/public/ticket/list.php | 16 ++++--- htdocs/theme/eldy/global.inc.php | 19 +++++--- htdocs/theme/md/style.css.php | 10 +++- htdocs/ticket/class/actions_ticket.class.php | 11 +++-- htdocs/ticket/class/ticket.class.php | 2 +- 14 files changed, 86 insertions(+), 59 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index a88a6b7dda274..38f29df1b13a5 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -656,7 +656,7 @@ continue; } $tabcomplete[$key]['id'] = $i; - // TODO Comment the line when data is stored into the tabcomplete array + // TODO Comment this lines when data is stored into the tabcomplete array $tabcomplete[$key]['cond'] = $tabcond[$i]; $tabcomplete[$key]['rowid'] = $tabrowid[$i]; $tabcomplete[$key]['fieldinsert'] = $tabfieldinsert[$i]; @@ -2243,8 +2243,8 @@ if (!is_null($withentity)) { print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } else { $tmpaction = 'view'; @@ -2297,8 +2297,10 @@ } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { $valuetoshow = price($valuetoshow); } - if ($value == 'private') { - $valuetoshow = yn($valuetoshow); + if (in_array($value, array('private', 'joinfile', 'use_default'))) { + if ($valuetoshow) { + $valuetoshow = yn($valuetoshow); + } } elseif ($value == 'libelle_facture') { $langs->load("bills"); $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 0ad9e90d92d37..6ae7405ca87e1 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -583,6 +583,7 @@ $htmlname = "product_category_id"; print ''; print '
    '; - print ''; + print ''; // Do not use "required", it breaks button cancel print '
    '; - $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200'); + $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; $filter = ''; if ($public) { - $filter = 'public=1'; + $filter = '(public:=:1)'; } - $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200'); + $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; - $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1); + $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; // If public form, display more information $toolbarname = 'dolibarr_notes'; if ($this->ispublic) { - $toolbarname = 'dolibarr_details'; + $toolbarname = 'dolibarr_details'; // TODO Allow image so use can do paste of image into content but disallow file manager print '
    '.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'
    '; } include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -505,14 +505,14 @@ function groupticketchange() { } // Categories - if (isModEnabled('category')) { + if (isModEnabled('category') && !$public) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 3); if (count($cate_arbo)) { // Categories - print '
    '.$langs->trans("Categories").''; - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print '
    '; + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories")); print "
    '.$langs->trans("MailFile").''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript $out .= ''."\n"; @@ -556,8 +556,6 @@ function groupticketchange() { } $out .= '
    '; } - } else { - $out .= ''.$langs->trans("NoAttachedFiles").'
    '; } if ($this->withfile == 2) { // Can add other files $maxfilesizearray = getMaxFileSizeArray(); @@ -821,7 +819,7 @@ public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $fi print ' selected="selected"'; } elseif (in_array($id, $selected)) { print ' selected="selected"'; - } elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) { + } elseif ($arraytypes['use_default'] == "1" && empty($selected)) { print ' selected="selected"'; } @@ -857,7 +855,7 @@ public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $fi * @param string $htmlname Name of select component * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users. * @param int $format 0 = id+label, 1 = code+code, 2 = code+label, 3 = id+code - * @param int $empty 1 = can be empty, 0 = or not + * @param int $empty 1 = can be empty, 0 = or can't be empty * @param int $noadmininfo 0 = ddd admin info, 1 = disable admin info * @param int $maxlength Max length of label * @param string $morecss More CSS @@ -923,15 +921,15 @@ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', if ($format == 3) { print '
    '; - $formTicket->selectGroupTickets($search_category, 'search_category', 'public=1', 2, 1, 1); + $formTicket->selectGroupTickets($search_category, 'search_category', '(public:=:1)', 2, 1, 1, 0, 'maxwidth150'); print ''; - $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1); + $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1, 0, 'maxwidth150'); print ''; - print dol_print_date($db->jdate($obj->datec), 'dayhour'); + print dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_read), 'dayhour'); + print dol_print_date($db->jdate($obj->date_read), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_close), 'dayhour'); + print dol_print_date($db->jdate($obj->date_close), 'dayhour', 'tzuserrel'); print '
    '; print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour'); print '
    '; + print '
    '.$langs->trans("TicketChooseProductCategory").''; + print img_picto('', 'category', 'class="pictofixedwidth"'); $formcategory->selectProductCategory(getDolGlobalString('TICKET_PRODUCT_CATEGORY'), $htmlname); if ($conf->use_javascript_ajax) { print ajax_combobox('select_'.$htmlname); @@ -635,9 +636,11 @@ print ''; + /* * Notification */ + // Admin var of module print load_fiche_titre($langs->trans("Notification"), '', ''); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index f63160d787bfc..65a9326662c83 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -243,8 +243,8 @@ public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Con print ''; + // Ref if ($this->withref) { - // Ref $defaultref = $ticketstat->getDefaultRef(); if ($mode == 'edit') { @@ -255,10 +255,10 @@ public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Con print ''; } - // TITLE + // Title if ($this->withemail) { print ''; if ($with_contact) { @@ -382,21 +382,21 @@ function(response) { // Type of Ticket print ''; // Group => Category print ''; // Severity => Priority print ''; if (isModEnabled('knowledgemanagement')) { @@ -476,13 +476,13 @@ function groupticketchange() { print ''; } - // MESSAGE + // Message print '"; } } @@ -536,7 +536,7 @@ function groupticketchange() { } $out = ''; - $out .= ''; + $out .= ''; $out .= ''; } if (!empty($arrayfields['severity.code']['checked'])) { print ''; } @@ -580,21 +584,21 @@ // Date ticket if (!empty($arrayfields['t.datec']['checked'])) { print ''; } // Date read if (!empty($arrayfields['t.date_read']['checked'])) { print ''; } // Date close if (!empty($arrayfields['t.date_close']['checked'])) { print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d1cd6b69db00b..8f99b911fba3b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1695,7 +1695,11 @@ overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ +div.fiche>div.tabBar>form>div.div-table-responsive { + min-height: 392px; +} .div-table-responsive, .div-table-responsive-no-min { overflow-x: auto; min-height: 0.01%; @@ -1703,20 +1707,21 @@ .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ -div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; -} div.fiche>form>div.div-table-responsive { min-height: 392px; } -div.fiche>div.tabBar>form>div.div-table-responsive { - min-height: 392px; +div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { + overflow-x: auto; } -div.fiche { - /* text-align: justify; */ + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { + min-height: 392px; } + .display-flex { display: flex; flex-wrap: wrap; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 5fce9f186c413..b6bdcb9bdcd77 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1858,6 +1858,7 @@ overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; }*/ + /* Style used for most tables */ div.fiche>div.tabBar>form>div.div-table-responsive { min-height: 392px; @@ -1869,14 +1870,21 @@ .div-table-responsive { line-height: var(--heightrow); } + /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ +div.fiche>form>div.div-table-responsive { + min-height: 392px; +} div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { overflow-x: auto; } -div.fiche>form>div.div-table-responsive { + +/* Style used for table in public ticket */ +div.ticketpublicarealist>form>div.div-table-responsive { min-height: 392px; } + .display-flex { display: flex; flex-wrap: wrap; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 7bb1dbc713a4c..dda526d3cf4f8 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -295,7 +295,7 @@ public function viewTicketMessages($show_private, $show_user, $object) || ($arraymsgs['private'] == "1" && $show_private) ) { //print ''; - print ''; + print ''; print ''; @@ -316,13 +316,14 @@ public function viewTicketMessages($show_private, $show_user, $object) print $arraymsgs['fk_contact_author']; } } else { - print $langs->trans('Customer'); + print ''.$langs->trans('Unknown').''; } print ''; } - print ''; - print ''; - print ''; + + print ''; + print ''; print $arraymsgs['message']; //attachment diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 82b2ade450427..60443e28eec7e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1956,7 +1956,7 @@ public function loadCacheMsgsTicket() $obj = $this->db->fetch_object($resql); $this->cache_msgs_ticket[$i]['id'] = $obj->rowid; $this->cache_msgs_ticket[$i]['fk_user_author'] = $obj->fk_user_author; - if ($obj->code == 'TICKET_MSG' && empty($obj->fk_user_author)) { + if (in_array($obj->code, array('TICKET_MSG', 'AC_TICKET_CREATE')) && empty($obj->fk_user_author)) { $this->cache_msgs_ticket[$i]['fk_contact_author'] = $obj->email_from; } $this->cache_msgs_ticket[$i]['datec'] = $this->db->jdate($obj->datec); From 21dd677e2872902c71d98b3ec68cb302866a2d03 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 15:45:20 +0200 Subject: [PATCH 027/127] Fix var_dump --- htdocs/core/class/html.formticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 65a9326662c83..7755f5dd0ec0f 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -921,7 +921,7 @@ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', if ($format == 3) { print ''; @@ -1828,7 +1828,7 @@ // Fields from hook $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Action edit/delete and select diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 3525edb1ee7ba..3aeaf7081cba5 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -281,7 +281,7 @@ } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sqlfields = $sql; // $sql fields to remove for count total @@ -314,7 +314,7 @@ // Add table from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; @@ -458,12 +458,12 @@ // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add HAVING from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPrint; $nbtotalofrecords = ''; @@ -670,7 +670,7 @@ $moreforfilter .= ''; } $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -798,7 +798,7 @@ // Fields from hook $parameters = array('arrayfields'=>$arrayfields); -$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['e.datec']['checked'])) { @@ -902,7 +902,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, '$totalarray'=>&$totalarray); -$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['e.datec']['checked'])) { print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); @@ -1137,7 +1137,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['e.datec']['checked'])) { @@ -1207,7 +1207,7 @@ $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, 'sql'=>$sql); -$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print "
    '; - print ''; + print ''; // Do not use "required", it breaks button cancel print '
    '; - $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200'); + $this->selectTypesTickets($type_code, 'type_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; $filter = ''; if ($public) { - $filter = 'public=1'; + $filter = '(public:=:1)'; } - $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200'); + $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; - $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1); + $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); print '
    '; // If public form, display more information $toolbarname = 'dolibarr_notes'; if ($this->ispublic) { - $toolbarname = 'dolibarr_details'; + $toolbarname = 'dolibarr_details'; // TODO Allow image so use can do paste of image into content but disallow file manager print '
    '.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'
    '; } include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -505,14 +505,14 @@ function groupticketchange() { } // Categories - if (isModEnabled('category')) { + if (isModEnabled('category') && !$public) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_TICKET, '', 'parent', 64, 0, 3); if (count($cate_arbo)) { // Categories - print '
    '.$langs->trans("Categories").''; - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print '
    '; + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories")); print "
    '.$langs->trans("MailFile").''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript $out .= ''."\n"; @@ -556,8 +556,6 @@ function groupticketchange() { } $out .= '
    '; } - } else { - $out .= ''.$langs->trans("NoAttachedFiles").'
    '; } if ($this->withfile == 2) { // Can add other files $maxfilesizearray = getMaxFileSizeArray(); @@ -821,7 +819,7 @@ public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $fi print ' selected="selected"'; } elseif (in_array($id, $selected)) { print ' selected="selected"'; - } elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) { + } elseif ($arraytypes['use_default'] == "1" && empty($selected)) { print ' selected="selected"'; } @@ -857,7 +855,7 @@ public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $fi * @param string $htmlname Name of select component * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users. * @param int $format 0 = id+label, 1 = code+code, 2 = code+label, 3 = id+code - * @param int $empty 1 = can be empty, 0 = or not + * @param int $empty 1 = can be empty, 0 = or can't be empty * @param int $noadmininfo 0 = ddd admin info, 1 = disable admin info * @param int $maxlength Max length of label * @param string $morecss More CSS @@ -923,15 +921,15 @@ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', if ($format == 3) { print '
    '; - $formTicket->selectGroupTickets($search_category, 'search_category', 'public=1', 2, 1, 1); + $formTicket->selectGroupTickets($search_category, 'search_category', '(public:=:1)', 2, 1, 1, 0, 'maxwidth150'); print ''; - $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1); + $formTicket->selectSeveritiesTickets($search_severity, 'search_severity', '', 2, 1, 1, 0, 'maxwidth150'); print ''; - print dol_print_date($db->jdate($obj->datec), 'dayhour'); + print dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_read), 'dayhour'); + print dol_print_date($db->jdate($obj->date_read), 'dayhour', 'tzuserrel'); print ''; - print dol_print_date($db->jdate($obj->date_close), 'dayhour'); + print dol_print_date($db->jdate($obj->date_close), 'dayhour', 'tzuserrel'); print '
    '; print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour'); print '
    '; + print '
    "; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index fdd8f6dea86bd..8dfac47ae405a 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -285,7 +285,7 @@ } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sqlfields = $sql; // $sql fields to remove for count total @@ -342,7 +342,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Count total nb of records @@ -543,7 +543,7 @@ $moreforfilter = ''; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -639,7 +639,7 @@ // Fields from hook $parameters = array('arrayfields'=>$arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation if (!empty($arrayfields['d.date_create']['checked'])) { @@ -715,7 +715,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['d.date_create']['checked'])) { print_liste_field_titre($arrayfields['d.date_create']['label'], $_SERVER["PHP_SELF"], "d.date_create", "", $param, '', $sortfield, $sortorder, 'nowraponall center'); @@ -922,7 +922,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -991,7 +991,7 @@ $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
    '."\n"; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 96122b75e68bf..c9d2553dbb2a5 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -705,7 +705,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Add $param from hooks $parameters = array('param' => &$param); -$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; // List of mass actions available @@ -1092,7 +1092,7 @@ 'sortorder' => $sortorder, 'totalarray' => &$totalarray, ); -$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['t.datec']['checked'])) { print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 11677ea24a2b6..8b24f209ebaa7 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1382,7 +1382,7 @@ } // Add $param from hooks $parameters = array('param' => &$param); - $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $param .= $hookmanager->resPrint; print ''; @@ -1563,7 +1563,7 @@ function setDetailVisibility() { $sql .= " t.invoice_line_id"; // Add fields from hooks $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql = preg_replace('/,\s*$/', '', $sql); @@ -1580,7 +1580,7 @@ function setDetailVisibility() { // Add table from hooks $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " WHERE elementtype = 'task'"; $sql .= " AND p.entity IN (".getEntity('project').")"; @@ -1663,7 +1663,7 @@ function setDetailVisibility() { // Add where from hooks $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Count total nb of records @@ -1760,7 +1760,7 @@ function setDetailVisibility() { } // Hook fields $parameters = array('mode' => 'create'); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print ''; print "\n"; @@ -1843,7 +1843,7 @@ function setDetailVisibility() { // Fields from hook $parameters = array('mode' => 'create'); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print ''; @@ -1861,7 +1861,7 @@ function setDetailVisibility() { $moreforfilter = ''; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -1979,7 +1979,7 @@ function setDetailVisibility() { */ // Fields from hook $parameters = array('arrayfields' => $arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { @@ -2063,7 +2063,7 @@ function setDetailVisibility() { */ // Hook fields $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch '); @@ -2432,7 +2432,7 @@ function setDetailVisibility() { // Fields from hook $parameters = array('arrayfields' => $arrayfields, 'obj' => $task_time, 'i' => $i, 'totalarray' => &$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -2627,7 +2627,7 @@ function setDetailVisibility() { // Fields from hook $parameters = array('arrayfields' => $arrayfields, 'obj' => $task_time, 'mode' => 'split1'); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -2785,7 +2785,7 @@ function setDetailVisibility() { // Fields from hook $parameters = array('arrayfields' => $arrayfields, 'obj' => $task_time, 'mode' => 'split2'); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -2836,7 +2836,7 @@ function setDetailVisibility() { } $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print ""; From b4b3f8a7edee3480d504e007cce78d7e846c18a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 16:37:54 +0200 Subject: [PATCH 029/127] Close #30480 --- htdocs/langs/am_ET/recruitment.lang | 2 +- htdocs/langs/ar_SA/recruitment.lang | 2 +- htdocs/langs/az_AZ/recruitment.lang | 2 +- htdocs/langs/bg_BG/recruitment.lang | 2 +- htdocs/langs/bn_BD/recruitment.lang | 2 +- htdocs/langs/bn_IN/recruitment.lang | 2 +- htdocs/langs/bs_BA/recruitment.lang | 2 +- htdocs/langs/ca_ES/recruitment.lang | 2 +- htdocs/langs/cs_CZ/recruitment.lang | 2 +- htdocs/langs/cy_GB/recruitment.lang | 2 +- htdocs/langs/da_DK/recruitment.lang | 2 +- htdocs/langs/de_DE/recruitment.lang | 2 +- htdocs/langs/el_GR/recruitment.lang | 2 +- htdocs/langs/en_US/recruitment.lang | 2 +- htdocs/langs/es_AR/recruitment.lang | 2 +- htdocs/langs/es_ES/recruitment.lang | 2 +- htdocs/langs/es_MX/recruitment.lang | 2 +- htdocs/langs/et_EE/recruitment.lang | 2 +- htdocs/langs/fa_IR/recruitment.lang | 2 +- htdocs/langs/fi_FI/recruitment.lang | 2 +- htdocs/langs/fr_FR/recruitment.lang | 2 +- htdocs/langs/gl_ES/recruitment.lang | 2 +- htdocs/langs/he_IL/recruitment.lang | 2 +- htdocs/langs/hr_HR/recruitment.lang | 2 +- htdocs/langs/hu_HU/recruitment.lang | 2 +- htdocs/langs/id_ID/recruitment.lang | 2 +- htdocs/langs/is_IS/recruitment.lang | 2 +- htdocs/langs/it_IT/recruitment.lang | 2 +- htdocs/langs/ja_JP/recruitment.lang | 2 +- htdocs/langs/kk_KZ/recruitment.lang | 2 +- htdocs/langs/km_KH/recruitment.lang | 2 +- htdocs/langs/ko_KR/recruitment.lang | 2 +- htdocs/langs/lo_LA/recruitment.lang | 2 +- htdocs/langs/lt_LT/recruitment.lang | 2 +- htdocs/langs/lv_LV/recruitment.lang | 2 +- htdocs/langs/mk_MK/recruitment.lang | 2 +- htdocs/langs/nb_NO/recruitment.lang | 2 +- htdocs/langs/nl_NL/recruitment.lang | 2 +- htdocs/langs/pl_PL/recruitment.lang | 2 +- htdocs/langs/pt_PT/recruitment.lang | 2 +- htdocs/langs/ro_RO/recruitment.lang | 2 +- htdocs/langs/ru_RU/recruitment.lang | 2 +- htdocs/langs/sk_SK/recruitment.lang | 2 +- htdocs/langs/sl_SI/recruitment.lang | 2 +- htdocs/langs/sq_AL/recruitment.lang | 2 +- htdocs/langs/sr_RS/recruitment.lang | 2 +- htdocs/langs/sv_SE/recruitment.lang | 2 +- htdocs/langs/sw_SW/recruitment.lang | 2 +- htdocs/langs/ta_IN/recruitment.lang | 2 +- htdocs/langs/tg_TJ/recruitment.lang | 2 +- htdocs/langs/th_TH/recruitment.lang | 2 +- htdocs/langs/tr_TR/recruitment.lang | 2 +- htdocs/langs/uk_UA/recruitment.lang | 2 +- htdocs/langs/ur_PK/recruitment.lang | 2 +- htdocs/langs/uz_UZ/recruitment.lang | 2 +- htdocs/langs/vi_VN/recruitment.lang | 2 +- htdocs/langs/zh_CN/recruitment.lang | 2 +- htdocs/langs/zh_TW/recruitment.lang | 2 +- 58 files changed, 58 insertions(+), 58 deletions(-) diff --git a/htdocs/langs/am_ET/recruitment.lang b/htdocs/langs/am_ET/recruitment.lang index c383437a92c78..725005604bcda 100644 --- a/htdocs/langs/am_ET/recruitment.lang +++ b/htdocs/langs/am_ET/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=እየቀጠርን ነው። ይህ የሚሞሉ ክፍት የ NoPositionOpen=በአሁኑ ጊዜ ምንም ክፍት ቦታዎች የሉም ConfirmClose=መሰረዙን ያረጋግጡ ConfirmCloseAsk=እርግጠኛ ነዎት ይህን የምልመላ እጩ መሰረዝ ይፈልጋሉ -recruitment=ምልመላ +Recruitment=ምልመላ diff --git a/htdocs/langs/ar_SA/recruitment.lang b/htdocs/langs/ar_SA/recruitment.lang index 3b6d3c13750c7..884d6a9c830e7 100644 --- a/htdocs/langs/ar_SA/recruitment.lang +++ b/htdocs/langs/ar_SA/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=نحن نوظف. هذه قائمة بالوظائف الشاغر NoPositionOpen=لا توجد وظائف مفتوحة في الوقت الحالي ConfirmClose=تأكيد الالغاء ConfirmCloseAsk=هل أنت متأكد أنك تريد إلغاء ترشيح التوظيف هذا -recruitment=توظيف +Recruitment=توظيف diff --git a/htdocs/langs/az_AZ/recruitment.lang b/htdocs/langs/az_AZ/recruitment.lang index efb490607d88d..e55c4d3ec8bd5 100644 --- a/htdocs/langs/az_AZ/recruitment.lang +++ b/htdocs/langs/az_AZ/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=İşə qəbul edirik. Bu doldurulmalı olan açıq vəzifələri NoPositionOpen=Hazırda heç bir vəzifə açıq deyil ConfirmClose=Ləğv etməyi təsdiqləyin ConfirmCloseAsk=Bu işə qəbul namizədliyini ləğv etmək istədiyinizə əminsiniz -recruitment=İşə qəbul +Recruitment=İşə qəbul diff --git a/htdocs/langs/bg_BG/recruitment.lang b/htdocs/langs/bg_BG/recruitment.lang index b2efc822f2fa7..267904c7861a2 100644 --- a/htdocs/langs/bg_BG/recruitment.lang +++ b/htdocs/langs/bg_BG/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Ние набираме персонал. Това е списъ NoPositionOpen=В момента няма отворени позиции ConfirmClose=Потвърдете анулирането ConfirmCloseAsk=Сигурни ли сте, че искате, за да отмените тази кандидатура за набиране на персонал -recruitment=подбор на персонал +Recruitment=подбор на персонал diff --git a/htdocs/langs/bn_BD/recruitment.lang b/htdocs/langs/bn_BD/recruitment.lang index c2578b25dc061..79a01ca547fa6 100644 --- a/htdocs/langs/bn_BD/recruitment.lang +++ b/htdocs/langs/bn_BD/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=আমরা নিয়োগ করছি। এটি পূ NoPositionOpen=এই মুহূর্তে কোনো পজিশন খোলা নেই ConfirmClose=বাতিল নিশ্চিত করুন ConfirmCloseAsk=আপনি কি নিশ্চিত যে আপনি এই নিয়োগের প্রার্থীতা বাতিল করতে চান? -recruitment=নিয়োগ +Recruitment=নিয়োগ diff --git a/htdocs/langs/bn_IN/recruitment.lang b/htdocs/langs/bn_IN/recruitment.lang index c6570ca5baa10..73cc4dc10946d 100644 --- a/htdocs/langs/bn_IN/recruitment.lang +++ b/htdocs/langs/bn_IN/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=আমরা নিয়োগ করছি। এটি পূ NoPositionOpen=এই মুহূর্তে কোন পজিশন খোলা নেই ConfirmClose=বাতিল নিশ্চিত করুন ConfirmCloseAsk=আপনি কি নিশ্চিত যে আপনি এই নিয়োগের প্রার্থীতা বাতিল করতে চান? -recruitment=নিয়োগ +Recruitment=নিয়োগ diff --git a/htdocs/langs/bs_BA/recruitment.lang b/htdocs/langs/bs_BA/recruitment.lang index 4ff63bae5ea30..f38076fc5cfe8 100644 --- a/htdocs/langs/bs_BA/recruitment.lang +++ b/htdocs/langs/bs_BA/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Zapošljavamo. Ovo je lista otvorenih pozicija koje treba popuni NoPositionOpen=Trenutno nema otvorenih pozicija ConfirmClose=Potvrdite otkazivanje ConfirmCloseAsk=Jeste li sigurni da želite poništiti ovu kandidaturu za zapošljavanje -recruitment=Regrutacija +Recruitment=Regrutacija diff --git a/htdocs/langs/ca_ES/recruitment.lang b/htdocs/langs/ca_ES/recruitment.lang index 3a826f61cabb1..b80ad3bad33ad 100644 --- a/htdocs/langs/ca_ES/recruitment.lang +++ b/htdocs/langs/ca_ES/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Estem reclutant. Aquesta és una llista de places obertes per a NoPositionOpen=No hi ha posicions obertes de moment ConfirmClose=Confirmeu la cancel·lació ConfirmCloseAsk=Esteu segur que voleu cancel·lar aquesta candidatura de contractació? -recruitment=Contractació +Recruitment=Contractació diff --git a/htdocs/langs/cs_CZ/recruitment.lang b/htdocs/langs/cs_CZ/recruitment.lang index 9eb0850ee7ab7..dde9203e8a4ed 100644 --- a/htdocs/langs/cs_CZ/recruitment.lang +++ b/htdocs/langs/cs_CZ/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/cy_GB/recruitment.lang b/htdocs/langs/cy_GB/recruitment.lang index 2ecbacacb141d..b1af13db85d46 100644 --- a/htdocs/langs/cy_GB/recruitment.lang +++ b/htdocs/langs/cy_GB/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/da_DK/recruitment.lang b/htdocs/langs/da_DK/recruitment.lang index e3c978a2b57db..dda0a2fda57a9 100644 --- a/htdocs/langs/da_DK/recruitment.lang +++ b/htdocs/langs/da_DK/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Vi rekrutterer. Dette er en liste over ledige stillinger, der sk NoPositionOpen=Ingen ledige stillinger i øjeblikket ConfirmClose=Bekræft annullering ConfirmCloseAsk=Er du sikker på, at du vil annullere denne rekrutteringskandidatur -recruitment=Rekruttering +Recruitment=Rekruttering diff --git a/htdocs/langs/de_DE/recruitment.lang b/htdocs/langs/de_DE/recruitment.lang index 89084f4321413..7404d1e55bfba 100644 --- a/htdocs/langs/de_DE/recruitment.lang +++ b/htdocs/langs/de_DE/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Wir stellen ein. Dies ist eine Liste mit offenen Stellen, die zu NoPositionOpen=Zur Zeit sind keine Stellen offen ConfirmClose=Abbruch bestätigen ConfirmCloseAsk=Sind Sie sicher, dass Sie diese Stellenausschreibung beenden wollen? -recruitment=Personalbeschaffung +Recruitment=Personalbeschaffung diff --git a/htdocs/langs/el_GR/recruitment.lang b/htdocs/langs/el_GR/recruitment.lang index a7787d909ef5a..5e50f6157583f 100644 --- a/htdocs/langs/el_GR/recruitment.lang +++ b/htdocs/langs/el_GR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Προσλαμβάνουμε. Αυτή είναι η λίστα NoPositionOpen=Δεν υπάρχουν ανοιχτές θέσεις αυτή τη στιγμή ConfirmClose=Επιβεβαιώστε την ακύρωση ConfirmCloseAsk=Είστε σίγουροι ότι θέλετε να ακυρώσετε αυτήν την υποψηφιότητα πρόσληψης -recruitment=Προσλήψεις +Recruitment=Προσλήψεις diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index fcbf87e49f424..eecdc1f004ccc 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/es_AR/recruitment.lang b/htdocs/langs/es_AR/recruitment.lang index 938cbea9ddbcc..2819f857c1fcf 100644 --- a/htdocs/langs/es_AR/recruitment.lang +++ b/htdocs/langs/es_AR/recruitment.lang @@ -10,4 +10,4 @@ JobLabel=Etiqueta de puesto de trabajo ResponsibleOfRecruitement=Responsable de contrataciones IfJobIsLocatedAtAPartner=Si el trabajo se encuentra en un lugar asociado Remuneration=Sueldo -recruitment=Contrataciones +Recruitment=Contrataciones diff --git a/htdocs/langs/es_ES/recruitment.lang b/htdocs/langs/es_ES/recruitment.lang index 4852fe02be6ca..0d19fe7fd70be 100644 --- a/htdocs/langs/es_ES/recruitment.lang +++ b/htdocs/langs/es_ES/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Estamos reclutando. Esta es una lista de vacantes a cubrir... NoPositionOpen=No hay posiciones abiertas en este momento ConfirmClose=Confirmar cancelación ConfirmCloseAsk=¿Está seguro de que desea cancelar esta candidatura de contratación? -recruitment=Contratación +Recruitment=Contratación diff --git a/htdocs/langs/es_MX/recruitment.lang b/htdocs/langs/es_MX/recruitment.lang index f438723203ad4..249061efe4181 100644 --- a/htdocs/langs/es_MX/recruitment.lang +++ b/htdocs/langs/es_MX/recruitment.lang @@ -28,4 +28,4 @@ JobClosedTextCanceled=La vacante esta cerrada. ExtrafieldsJobPosition=Atributos complementarios (puestos de trabajo) ExtrafieldsApplication=Atributos complementarios (solicitudes de empleo) MakeOffer=Hacer una oferta -recruitment=Reclutamiento +Recruitment=Reclutamiento diff --git a/htdocs/langs/et_EE/recruitment.lang b/htdocs/langs/et_EE/recruitment.lang index b11a87ab34c67..82af1e8462e27 100644 --- a/htdocs/langs/et_EE/recruitment.lang +++ b/htdocs/langs/et_EE/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/fa_IR/recruitment.lang b/htdocs/langs/fa_IR/recruitment.lang index 645f80cbbd5d2..ccb17e13db99e 100644 --- a/htdocs/langs/fa_IR/recruitment.lang +++ b/htdocs/langs/fa_IR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/fi_FI/recruitment.lang b/htdocs/langs/fi_FI/recruitment.lang index 0ff6f0cf64652..054463e470527 100644 --- a/htdocs/langs/fi_FI/recruitment.lang +++ b/htdocs/langs/fi_FI/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Olemme rekrytoimassa. Tämä on lista avoimista työpaikoista, j NoPositionOpen=Tällä hetkellä ei avoimia paikkoja ConfirmClose=Vahvista peruutus ConfirmCloseAsk=Haluatko varmasti peruuttaa tämän rekrytointiehdokkaan -recruitment=Rekrytointi +Recruitment=Rekrytointi diff --git a/htdocs/langs/fr_FR/recruitment.lang b/htdocs/langs/fr_FR/recruitment.lang index fa32493629f4f..115541e6ce8cf 100644 --- a/htdocs/langs/fr_FR/recruitment.lang +++ b/htdocs/langs/fr_FR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Nous recrutons. Voici une liste de postes à pourvoir... NoPositionOpen=Aucun poste ouvert pour le moment ConfirmClose=Confirmer l'annulation ConfirmCloseAsk=Êtes-vous sûr de vouloir annuler cette candidature ? -recruitment=Recrutement +Recruitment=Recrutement diff --git a/htdocs/langs/gl_ES/recruitment.lang b/htdocs/langs/gl_ES/recruitment.lang index 94757e0826002..cb9629536a2fe 100644 --- a/htdocs/langs/gl_ES/recruitment.lang +++ b/htdocs/langs/gl_ES/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Estamos contratando. Esta é unha lista de prazas abertas para c NoPositionOpen=Non hai postos laborais libres polo momento ConfirmClose=Confirmar cancelación ConfirmCloseAsk=Está certo de querer cancelar esta candidatura de contratación? -recruitment=Contratación +Recruitment=Contratación diff --git a/htdocs/langs/he_IL/recruitment.lang b/htdocs/langs/he_IL/recruitment.lang index afbdae7326642..cafa480551d97 100644 --- a/htdocs/langs/he_IL/recruitment.lang +++ b/htdocs/langs/he_IL/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=אנחנו מגייסים. זוהי רשימה של משרות NoPositionOpen=אין משרות פתוחות כרגע ConfirmClose=אשר את הביטול ConfirmCloseAsk=האם אתה בטוח שברצונך לבטל את מועמדות הגיוס הזו -recruitment=גיוס +Recruitment=גיוס diff --git a/htdocs/langs/hr_HR/recruitment.lang b/htdocs/langs/hr_HR/recruitment.lang index 4768825c7a92b..ccfec3f1cfd39 100644 --- a/htdocs/langs/hr_HR/recruitment.lang +++ b/htdocs/langs/hr_HR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Zapošljavamo. Ovo je popis otvorenih pozicija koje treba popuni NoPositionOpen=Trenutno nema otvorenih pozicija ConfirmClose=Potvrdite otkazivanje ConfirmCloseAsk=Jeste li sigurni da želite da poništite ovu kandidaturu za zapošljavanje -recruitment=Zapošljavanje +Recruitment=Zapošljavanje diff --git a/htdocs/langs/hu_HU/recruitment.lang b/htdocs/langs/hu_HU/recruitment.lang index 0f8dd0917f938..085a81402032d 100644 --- a/htdocs/langs/hu_HU/recruitment.lang +++ b/htdocs/langs/hu_HU/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Toborozunk. Ez a betöltendő pozíciók listája... NoPositionOpen=Jelenleg nincs nyitott pozíció ConfirmClose=Erősítse meg a törlést ConfirmCloseAsk=Biztosan visszavonja ezt a toborzási jelentkezést? -recruitment=Toborzás +Recruitment=Toborzás diff --git a/htdocs/langs/id_ID/recruitment.lang b/htdocs/langs/id_ID/recruitment.lang index c4a3ebc0840ba..735e3b3e5208f 100644 --- a/htdocs/langs/id_ID/recruitment.lang +++ b/htdocs/langs/id_ID/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Perekrutan +Recruitment=Perekrutan diff --git a/htdocs/langs/is_IS/recruitment.lang b/htdocs/langs/is_IS/recruitment.lang index fcbf87e49f424..eecdc1f004ccc 100644 --- a/htdocs/langs/is_IS/recruitment.lang +++ b/htdocs/langs/is_IS/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/it_IT/recruitment.lang b/htdocs/langs/it_IT/recruitment.lang index 40c32a75e6103..c4504dd5e04f6 100644 --- a/htdocs/langs/it_IT/recruitment.lang +++ b/htdocs/langs/it_IT/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Stiamo reclutando. Questo è un elenco di posizioni aperte da ri NoPositionOpen=Nessuna posizione aperta al momento ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Selezione +Recruitment=Selezione diff --git a/htdocs/langs/ja_JP/recruitment.lang b/htdocs/langs/ja_JP/recruitment.lang index 048564b05da2c..64f58c1d2e1d8 100644 --- a/htdocs/langs/ja_JP/recruitment.lang +++ b/htdocs/langs/ja_JP/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=募集中。これは、募集職種のリスト... NoPositionOpen=現在募集職種なし ConfirmClose=確定 キャンセル ConfirmCloseAsk=この採用候補をキャンセルしてもよいか -recruitment=採用 +Recruitment=採用 diff --git a/htdocs/langs/kk_KZ/recruitment.lang b/htdocs/langs/kk_KZ/recruitment.lang index b72e20dc33b06..40804207bdc66 100644 --- a/htdocs/langs/kk_KZ/recruitment.lang +++ b/htdocs/langs/kk_KZ/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Біз жұмысқа қабылдап жатырмыз. Бұл NoPositionOpen=Қазіргі уақытта позициялар ашылған ConfirmClose=Бас тартуды растаңыз ConfirmCloseAsk=Осы жалдау кандидатурасынан бас тартқыңыз келетініне сенімдісіз бе -recruitment=Жұмысқа қабылдау +Recruitment=Жұмысқа қабылдау diff --git a/htdocs/langs/km_KH/recruitment.lang b/htdocs/langs/km_KH/recruitment.lang index fcbf87e49f424..eecdc1f004ccc 100644 --- a/htdocs/langs/km_KH/recruitment.lang +++ b/htdocs/langs/km_KH/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/ko_KR/recruitment.lang b/htdocs/langs/ko_KR/recruitment.lang index fcd0d820dcba0..bd5ee9c77147a 100644 --- a/htdocs/langs/ko_KR/recruitment.lang +++ b/htdocs/langs/ko_KR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/lo_LA/recruitment.lang b/htdocs/langs/lo_LA/recruitment.lang index b548b0962cecd..7edf516279b21 100644 --- a/htdocs/langs/lo_LA/recruitment.lang +++ b/htdocs/langs/lo_LA/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=ພວກເຮົາຮັບສະໝັກພະນັກງ NoPositionOpen=ບໍ່​ມີ​ຕໍາ​ແຫນ່ງ​ເປີດ​ໃນ​ປັດ​ຈຸ​ບັນ​ ConfirmClose=ຢືນຢັນການຍົກເລີກ ConfirmCloseAsk=ທ່ານແນ່ໃຈບໍ່ວ່າຕ້ອງການຍົກເລີກການສະໝັກຮັບສະໝັກງານນີ້ -recruitment=ຮັບສະໝັກພະນັກງານ +Recruitment=ຮັບສະໝັກພະນັກງານ diff --git a/htdocs/langs/lt_LT/recruitment.lang b/htdocs/langs/lt_LT/recruitment.lang index e6cb239b75d99..b32ab3fe8d87e 100644 --- a/htdocs/langs/lt_LT/recruitment.lang +++ b/htdocs/langs/lt_LT/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/lv_LV/recruitment.lang b/htdocs/langs/lv_LV/recruitment.lang index e5db2f0d96b19..cbe164714e0bf 100644 --- a/htdocs/langs/lv_LV/recruitment.lang +++ b/htdocs/langs/lv_LV/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Mēs vervējam. Šis ir aizpildāmo brīvo vietu saraksts... NoPositionOpen=Šobrīd neviena atvērta pozīcija ConfirmClose=Apstipriniet atcelšanu ConfirmCloseAsk=Vai tiešām vēlaties atcelt šo personāla atlases kandidatūru? -recruitment=Darbā pieņemšana +Recruitment=Darbā pieņemšana diff --git a/htdocs/langs/mk_MK/recruitment.lang b/htdocs/langs/mk_MK/recruitment.lang index fcbf87e49f424..eecdc1f004ccc 100644 --- a/htdocs/langs/mk_MK/recruitment.lang +++ b/htdocs/langs/mk_MK/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/nb_NO/recruitment.lang b/htdocs/langs/nb_NO/recruitment.lang index 9877fa914391f..f7293a1cebcdd 100644 --- a/htdocs/langs/nb_NO/recruitment.lang +++ b/htdocs/langs/nb_NO/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Vi rekrutterer. Dette er en liste over ledige stillinger som ska NoPositionOpen=Ingen ledige stillinger for øyeblikket ConfirmClose=Bekreft kansellering ConfirmCloseAsk=Er du sikker på at du vil kansellere dette rekrutteringskandidaturet -recruitment=Rekruttering +Recruitment=Rekruttering diff --git a/htdocs/langs/nl_NL/recruitment.lang b/htdocs/langs/nl_NL/recruitment.lang index 2cfc7c2bd764a..773fc7675181b 100644 --- a/htdocs/langs/nl_NL/recruitment.lang +++ b/htdocs/langs/nl_NL/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We zijn aan het rekruteren. Dit is een lijst met openstaande vac NoPositionOpen=Op dit moment geen vacatures ConfirmClose=Bevestig de annulering ConfirmCloseAsk=Weet u zeker dat u deze sollicitatiekandidatuur wilt annuleren? -recruitment=Werving +Recruitment=Werving diff --git a/htdocs/langs/pl_PL/recruitment.lang b/htdocs/langs/pl_PL/recruitment.lang index 501c3a34c8c53..fd197bdfa9bb7 100644 --- a/htdocs/langs/pl_PL/recruitment.lang +++ b/htdocs/langs/pl_PL/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Prowadzimy rekrutację. Oto lista wolnych stanowisk do obsadzeni NoPositionOpen=W tej chwili nie ma żadnych wolnych stanowisk ConfirmClose=Potwierdź anulowanie ConfirmCloseAsk=Czy na pewno chcesz anulować tę kandydaturę rekrutacyjną? -recruitment=Rekrutacja +Recruitment=Rekrutacja diff --git a/htdocs/langs/pt_PT/recruitment.lang b/htdocs/langs/pt_PT/recruitment.lang index c2764aa40cd88..0d37fbe3b7b78 100644 --- a/htdocs/langs/pt_PT/recruitment.lang +++ b/htdocs/langs/pt_PT/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Estamos recrutando. Esta é uma lista de abrir cargos a serem pr NoPositionOpen=Nenhuma posição abrir no momento ConfirmClose=Confirme cancelamento ConfirmCloseAsk=Tem a certeza que pretende para cancelar esta candidatura de recrutamento -recruitment=Recrutamento +Recruitment=Recrutamento diff --git a/htdocs/langs/ro_RO/recruitment.lang b/htdocs/langs/ro_RO/recruitment.lang index f0696fc4bdb15..7e4e878c1118f 100644 --- a/htdocs/langs/ro_RO/recruitment.lang +++ b/htdocs/langs/ro_RO/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Recrutăm. Aceasta este o listă de posturi vacante care trebuie NoPositionOpen=Niciun post vacant la acest moment ConfirmClose=Confirmare anulare ConfirmCloseAsk=Sigur vrei să anulezi această candidatură de recrutare -recruitment=Recrutare personal +Recruitment=Recrutare personal diff --git a/htdocs/langs/ru_RU/recruitment.lang b/htdocs/langs/ru_RU/recruitment.lang index c0ee8aea68f93..f132113f432c6 100644 --- a/htdocs/langs/ru_RU/recruitment.lang +++ b/htdocs/langs/ru_RU/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Мы набираем. Это список вакансий, к NoPositionOpen=На данный момент открытых позиций нет ConfirmClose=Подтвердить отмену ConfirmCloseAsk=Вы действительно хотите — отменить этой кандидатуре найма -recruitment=Рекрутинг +Recruitment=Рекрутинг diff --git a/htdocs/langs/sk_SK/recruitment.lang b/htdocs/langs/sk_SK/recruitment.lang index cf5d1293bd691..833b33a8d39c3 100644 --- a/htdocs/langs/sk_SK/recruitment.lang +++ b/htdocs/langs/sk_SK/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Robíme nábor. Toto je zoznam voľných pozícií, ktoré sa ma NoPositionOpen=Momentálne nie sú otvorené žiadne pozície ConfirmClose=Potvrďte zrušenie ConfirmCloseAsk=Naozaj chcete zrušiť túto náborovú kandidatúru? -recruitment=Nábor +Recruitment=Nábor diff --git a/htdocs/langs/sl_SI/recruitment.lang b/htdocs/langs/sl_SI/recruitment.lang index 151861ecc616c..44b17927730a9 100644 --- a/htdocs/langs/sl_SI/recruitment.lang +++ b/htdocs/langs/sl_SI/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Zaposlujemo. To je seznam odprtih delovnih mest, ki jih je treba NoPositionOpen=Trenutno ni odprtih pozicij ConfirmClose=Potrdite preklic ConfirmCloseAsk=Ali ste prepričani, da želite preklicati to kandidaturo za zaposlitev -recruitment=Zaposlovanje +Recruitment=Zaposlovanje diff --git a/htdocs/langs/sq_AL/recruitment.lang b/htdocs/langs/sq_AL/recruitment.lang index 0557a301acaf0..ed09d264b77a1 100644 --- a/htdocs/langs/sq_AL/recruitment.lang +++ b/htdocs/langs/sq_AL/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Ne jemi duke rekrutuar. Kjo është lista e pozicioneve të hapu NoPositionOpen=Asnjë pozicion i hapur për momentin ConfirmClose=Konfirmo anulimin ConfirmCloseAsk=Jeni i sigurt që dëshironi ta anuloni këtë kandidaturë rekrutimi -recruitment=Rekrutimi +Recruitment=Rekrutimi diff --git a/htdocs/langs/sr_RS/recruitment.lang b/htdocs/langs/sr_RS/recruitment.lang index 5a9da1a619d67..7ac29b962dd00 100644 --- a/htdocs/langs/sr_RS/recruitment.lang +++ b/htdocs/langs/sr_RS/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/sv_SE/recruitment.lang b/htdocs/langs/sv_SE/recruitment.lang index 29d07ff94d15a..39cd152144a8a 100644 --- a/htdocs/langs/sv_SE/recruitment.lang +++ b/htdocs/langs/sv_SE/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Vi rekryterar! Detta är en lista över lediga tjänster som ska NoPositionOpen=Inga lediga tjänster för tillfället ConfirmClose=Bekräfta avbokningen ConfirmCloseAsk=Är du säker på att du vill avbryta denna rekryteringskandidatur -recruitment=Rekrytering +Recruitment=Rekrytering diff --git a/htdocs/langs/sw_SW/recruitment.lang b/htdocs/langs/sw_SW/recruitment.lang index a020f4077743a..1f3cc99fd5f22 100644 --- a/htdocs/langs/sw_SW/recruitment.lang +++ b/htdocs/langs/sw_SW/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Tunaajiri. Hii ni orodha ya nafasi zilizo wazi zitakazojazwa... NoPositionOpen=Hakuna nafasi zilizofunguliwa kwa sasa ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/ta_IN/recruitment.lang b/htdocs/langs/ta_IN/recruitment.lang index c87fb30a8dd8d..67d5414ac418f 100644 --- a/htdocs/langs/ta_IN/recruitment.lang +++ b/htdocs/langs/ta_IN/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/tg_TJ/recruitment.lang b/htdocs/langs/tg_TJ/recruitment.lang index 626ff16c8fcad..d4a95b0ecd78a 100644 --- a/htdocs/langs/tg_TJ/recruitment.lang +++ b/htdocs/langs/tg_TJ/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/th_TH/recruitment.lang b/htdocs/langs/th_TH/recruitment.lang index f94c2af711b5e..7e25a0e714ff2 100644 --- a/htdocs/langs/th_TH/recruitment.lang +++ b/htdocs/langs/th_TH/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=เรากำลังรับสมัครงาน. น NoPositionOpen=ไม่มีตำแหน่งที่เปิดอยู่ในขณะนี้ ConfirmClose=ยืนยันการยกเลิก ConfirmCloseAsk=คุณแน่ใจหรือไม่ว่าต้องการยกเลิกผู้สมัครรับสมัครงานรายนี้ -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/tr_TR/recruitment.lang b/htdocs/langs/tr_TR/recruitment.lang index 0ebc5488e3a6b..082e970015d34 100644 --- a/htdocs/langs/tr_TR/recruitment.lang +++ b/htdocs/langs/tr_TR/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=We are recruiting. This is a list of open positions to be filled NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=İşe Alım +Recruitment=İşe Alım diff --git a/htdocs/langs/uk_UA/recruitment.lang b/htdocs/langs/uk_UA/recruitment.lang index ef922868afa5f..68f23abd2deda 100644 --- a/htdocs/langs/uk_UA/recruitment.lang +++ b/htdocs/langs/uk_UA/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Ми набираємо. Це список відкритих в NoPositionOpen=На даний момент немає відкритих позицій ConfirmClose=Підтвердити скасування ConfirmCloseAsk=Ви впевнені, що бажаєте скасувати цю кандидатуру на роботу? -recruitment=вербування +Recruitment=вербування diff --git a/htdocs/langs/ur_PK/recruitment.lang b/htdocs/langs/ur_PK/recruitment.lang index cba4420972edc..8561062dd1931 100644 --- a/htdocs/langs/ur_PK/recruitment.lang +++ b/htdocs/langs/ur_PK/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=ہم بھرتی کر رہے ہیں۔ یہ پُر کیے جانے NoPositionOpen=اس وقت کوئی عہدہ نہیں کھلا ہے۔ ConfirmClose=منسوخی کی تصدیق کریں۔ ConfirmCloseAsk=کیا آپ واقعی اس بھرتی کی امیدواری کو منسوخ کرنا چاہتے ہیں؟ -recruitment=Recruitment +Recruitment=Recruitment diff --git a/htdocs/langs/uz_UZ/recruitment.lang b/htdocs/langs/uz_UZ/recruitment.lang index 39f5674860223..ddde30427cc08 100644 --- a/htdocs/langs/uz_UZ/recruitment.lang +++ b/htdocs/langs/uz_UZ/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Biz ishga qabul qilamiz. Bu to'ldirilishi kerak bo'lgan ochiq la NoPositionOpen=Ayni paytda hech qanday lavozim ochilmagan ConfirmClose=Bekor qilishni tasdiqlang ConfirmCloseAsk=Haqiqatan ham bu ishga yollash nomzodini bekor qilmoqchimisiz -recruitment=Ishga qabul qilish +Recruitment=Ishga qabul qilish diff --git a/htdocs/langs/vi_VN/recruitment.lang b/htdocs/langs/vi_VN/recruitment.lang index 08ae250f58a9e..a2bd7748c5e7f 100644 --- a/htdocs/langs/vi_VN/recruitment.lang +++ b/htdocs/langs/vi_VN/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=Chúng tôi đang tuyển dụng. Đây là danh sách các vị NoPositionOpen=Không có vị trí nào mở vào lúc này ConfirmClose=Xác nhận hủy ConfirmCloseAsk=Bạn có chắc chắn muốn hủy ứng tuyển tuyển dụng này không -recruitment=Tuyển dụng +Recruitment=Tuyển dụng diff --git a/htdocs/langs/zh_CN/recruitment.lang b/htdocs/langs/zh_CN/recruitment.lang index 8801ce46d55e5..7f16ac0fd577c 100644 --- a/htdocs/langs/zh_CN/recruitment.lang +++ b/htdocs/langs/zh_CN/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=我们正在招聘。这是一份有待填补的空缺职位清 NoPositionOpen=暂时没有职位空缺 ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=招聘 +Recruitment=招聘 diff --git a/htdocs/langs/zh_TW/recruitment.lang b/htdocs/langs/zh_TW/recruitment.lang index 4b253d7467e1f..093cb87b94470 100644 --- a/htdocs/langs/zh_TW/recruitment.lang +++ b/htdocs/langs/zh_TW/recruitment.lang @@ -77,4 +77,4 @@ WeAreRecruiting=我們正在招聘。這是一個待填補的空缺職位清單. NoPositionOpen=暫時沒有職位空缺 ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature -recruitment=招募 +Recruitment=招募 From 7d7149da5056490fd4b93da10229329447f40739 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 17:27:05 +0200 Subject: [PATCH 030/127] Code comment --- htdocs/product/class/product.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index b064f077e39a5..7780b436fe54b 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5924,8 +5924,9 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_sending_client = $this->stats_expedition['qty']; } + // Include supplier order lines if (isModEnabled("supplier_order")) { - $filterStatus = !getDolGlobalString('SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK') ? '3,4' : $conf->global->SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK; + $filterStatus = getDolGlobalString('SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK', '3,4'); if (isset($includedraftpoforvirtual)) { $filterStatus = '0,1,2,'.$filterStatus; // 1,2 may have already been inside $filterStatus but it is better to have twice than missing $filterStatus does not include them } @@ -5935,7 +5936,8 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && empty($conf->reception->enabled)) { + // Include reception lines (when module reception is NOT used) + if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && !isModEnabled('reception')) { // Case module reception is not used $filterStatus = '4'; if (isset($includedraftpoforvirtual)) { @@ -5947,6 +5949,7 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_reception_fournisseur = $this->stats_reception['qty']; } + // Include reception lines (when module reception is used) if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && isModEnabled("reception")) { // Case module reception is used $filterStatus = '4'; @@ -5959,6 +5962,7 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_reception_fournisseur = $this->stats_reception['qty']; } + // Include manufacturing if (isModEnabled('mrp')) { $result = $this->load_stats_inproduction(0, '1,2', 1, $dateofvirtualstock); if ($result < 0) { From 2c0e7fb4adc2397633f0d10f68ab83e06ad08502 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 17:41:26 +0200 Subject: [PATCH 031/127] Merge two similar code section. Clean not used global var. --- htdocs/product/class/product.class.php | 107 +++++++++---------------- 1 file changed, 38 insertions(+), 69 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1492d75876f8d..00cca51dd6727 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -587,7 +587,7 @@ class Product extends CommonObject * 1 = modify the stock of this child Product upon modification of the stock of its parent Product * ("incdec" stands for increase/decrease) * - * @var 0|1 + * @var int<0,1> * @see Product::is_sousproduit() To set this property * @see Product::add_sousproduit() * @see Product::update_sousproduit() @@ -965,7 +965,7 @@ public function create($user, $notrigger = 0) $sql .= ", accountancy_code_sell_export"; $sql .= ") VALUES ("; $sql .= $this->id; - $sql .= ", " . $conf->entity; + $sql .= ", " . ((int) $conf->entity); $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'"; $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'"; @@ -1085,6 +1085,7 @@ public function check_barcode($valuetotest, $typefortest) { // phpcs:enable global $conf; + if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) { $module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')); @@ -1399,8 +1400,8 @@ public function update($id, $user, $notrigger = 0, $action = 'update', $updatety $sql .= ", accountancy_code_sell_intra"; $sql .= ", accountancy_code_sell_export"; $sql .= ") VALUES ("; - $sql .= $this->id; - $sql .= ", " . $conf->entity; + $sql .= ((int) $this->id); + $sql .= ", " . ((int) $conf->entity); $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'"; $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'"; @@ -1543,7 +1544,7 @@ public function update($id, $user, $notrigger = 0, $action = 'update', $updatety */ public function delete(User $user, $notrigger = 0) { - global $conf, $langs; + global $conf; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $error = 0; @@ -1739,7 +1740,7 @@ public function getSellOrEatByMandatoryLabel() */ public function setMultiLangs($user) { - global $conf, $langs; + global $langs; $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 0, 2); $current_lang = $langs->getDefaultLang(); @@ -1881,7 +1882,7 @@ public function delMultiLangs($langtodelete, $user) */ public function setAccountancyCode($type, $value) { - global $user, $langs, $conf; + global $user; $error = 0; @@ -2081,7 +2082,7 @@ public function log_price_delete($user, $rowid) */ public function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp = 0) { - global $conf, $hookmanager, $action; + global $hookmanager, $action; // Call hook if any if (is_object($hookmanager)) { @@ -2378,8 +2379,6 @@ public function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref */ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $newminprice = 0, $level = 0, $newnpr = 0, $newpbq = 0, $ignore_autogen = 0, $localtaxes_array = array(), $newdefaultvatcode = '', $price_label = '', $notrigger = 0) { - global $conf, $langs; - $lastPriceData = $this->getArrayForPriceCompare($level); // temporary store current price before update $id = $this->id; @@ -2597,7 +2596,7 @@ public function fetch($id = 0, $ref = '', $ref_ext = '', $barcode = '', $ignore_ { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - global $langs, $conf; + global $conf; dol_syslog(get_class($this)."::fetch id=".$id." ref=".$ref." ref_ext=".$ref_ext); @@ -3078,7 +3077,7 @@ public function load_stats_mo($socid = 0) public function load_stats_bom($socid = 0) { // phpcs:enable - global $user, $hookmanager, $action; + global $hookmanager, $action; $error = 0; @@ -3147,7 +3146,7 @@ public function load_stats_bom($socid = 0) public function load_stats_propale($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_customers, COUNT(DISTINCT p.rowid) as nb,"; $sql .= " COUNT(pd.rowid) as nb_rows, SUM(pd.qty) as qty"; @@ -3222,7 +3221,7 @@ public function load_stats_propale($socid = 0) public function load_stats_proposal_supplier($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_suppliers, COUNT(DISTINCT p.rowid) as nb,"; $sql .= " COUNT(pd.rowid) as nb_rows, SUM(pd.qty) as qty"; @@ -3278,7 +3277,7 @@ public function load_stats_proposal_supplier($socid = 0) public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; @@ -3406,7 +3405,7 @@ public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualS public function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb,"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; @@ -3467,7 +3466,7 @@ public function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $filterShipmentStatus = '') { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb,"; $sql .= " COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty"; @@ -3553,7 +3552,7 @@ public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualSt public function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $dateofvirtualstock = null) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; @@ -3738,7 +3737,7 @@ public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirt public function load_stats_contrat($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; @@ -3812,7 +3811,7 @@ public function load_stats_contrat($socid = 0) public function load_stats_facture($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(".$this->db->ifsql('f.type != 2', 'fd.qty', 'fd.qty * -1').") as qty"; @@ -3887,7 +3886,7 @@ public function load_stats_facture($socid = 0) public function load_stats_facturerec($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; @@ -3961,7 +3960,7 @@ public function load_stats_facturerec($socid = 0) public function load_stats_facture_fournisseur($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager, $action; + global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_suppliers, COUNT(DISTINCT f.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; @@ -4096,7 +4095,6 @@ private function _get_stats($sql, $mode, $year = 0) public function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf; global $user; $sql = "SELECT sum(d.qty) as qty, date_format(f.datef, '%Y%m')"; @@ -4150,7 +4148,6 @@ public function get_nb_vente($socid, $mode, $filteronproducttype = -1, $year = 0 public function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf; global $user; $sql = "SELECT sum(d.qty) as qty, date_format(f.datef, '%Y%m')"; @@ -4203,7 +4200,7 @@ public function get_nb_achat($socid, $mode, $filteronproducttype = -1, $year = 0 public function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf, $user; + global $user; $sql = "SELECT sum(d.qty) as qty, date_format(p.datep, '%Y%m')"; if ($mode == 'bynumber') { @@ -4255,7 +4252,6 @@ public function get_nb_propal($socid, $mode, $filteronproducttype = -1, $year = public function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf; global $user; $sql = "SELECT sum(d.qty) as qty, date_format(p.date_valid, '%Y%m')"; @@ -4308,7 +4304,7 @@ public function get_nb_propalsupplier($socid, $mode, $filteronproducttype = -1, public function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf, $user; + global $user; $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')"; if ($mode == 'bynumber') { @@ -4360,7 +4356,7 @@ public function get_nb_order($socid, $mode, $filteronproducttype = -1, $year = 0 public function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf, $user; + global $user; $sql = "SELECT sum(d.qty) as qty, date_format(c.date_commande, '%Y%m')"; if ($mode == 'bynumber') { @@ -4412,7 +4408,7 @@ public function get_nb_ordersupplier($socid, $mode, $filteronproducttype = -1, $ public function get_nb_contract($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf, $user; + global $user; $sql = "SELECT sum(d.qty) as qty, date_format(c.date_contrat, '%Y%m')"; if ($mode == 'bynumber') { @@ -4466,7 +4462,7 @@ public function get_nb_contract($socid, $mode, $filteronproducttype = -1, $year public function get_nb_mos($socid, $mode, $filteronproducttype = -1, $year = 0, $morefilter = '') { // phpcs:enable - global $conf, $user; + global $user; $sql = "SELECT sum(d.qty), date_format(d.date_valid, '%Y%m')"; if ($mode == 'bynumber') { @@ -4876,7 +4872,7 @@ public function list_suppliers() */ public function clone_price($fromId, $toId) { - global $conf, $user; + global $user; $now = dol_now(); @@ -5043,9 +5039,8 @@ public function clone_fournisseurs($fromId, $toId) public function fetch_prod_arbo($prod, $compl_path = '', $multiply = 1, $level = 1, $id_parent = 0, $ignore_stock_load = 0) { // phpcs:enable - global $conf, $langs; - $tmpproduct = null; + //var_dump($prod); foreach ($prod as $id_product => $desc_pere) { // $id_product is 0 (first call starting with root top) or an id of a sub_product if (is_array($desc_pere)) { // If desc_pere is an array, this means it's a child @@ -5183,7 +5178,6 @@ public function hasVariants() */ public function isVariant() { - global $conf; if (isModEnabled('variants')) { $sql = "SELECT rowid FROM ".$this->db->prefix()."product_attribute_combination WHERE fk_product_child = ".((int) $this->id)." AND entity IN (".getEntity('product').")"; @@ -5482,7 +5476,8 @@ public function getTooltipContentArray($params) */ public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0, $morecss = '', $add_label = 0, $sep = ' - ') { - global $conf, $langs, $hookmanager, $user; + global $langs, $hookmanager; + include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; $result = ''; @@ -5585,7 +5580,7 @@ public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_la */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { - global $conf, $user, $langs; + global $langs; $langs->load("products"); $outputlangs->load("products"); @@ -5634,7 +5629,7 @@ public function getLibStatut($mode = 0, $type = 0) public function LibStatut($status, $mode = 0, $type = 0) { // phpcs:enable - global $conf, $langs; + global $langs; $labelStatus = $labelStatusShort = ''; @@ -5711,6 +5706,7 @@ public function LibStatut($status, $mode = 0, $type = 0) public function getLibFinished() { global $langs; + $langs->load('products'); $label = ''; @@ -5869,8 +5865,6 @@ public function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $l public function load_stock($option = '', $includedraftpoforvirtual = null, $dateofvirtualstock = null) { // phpcs:enable - global $conf; - $this->stock_reel = 0; $this->stock_warehouse = array(); $this->stock_theorique = 0; @@ -5948,7 +5942,7 @@ public function load_stock($option = '', $includedraftpoforvirtual = null, $date public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirtualstock = null) { // phpcs:enable - global $conf, $hookmanager, $action; + global $hookmanager, $action; $stock_commande_client = 0; $stock_commande_fournisseur = 0; @@ -5991,9 +5985,8 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - // Include reception lines (when module reception is NOT used) - if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && !isModEnabled('reception')) { - // Case module reception is not used + // Include reception lines + if (isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) { $filterStatus = '4'; if (isset($includedraftpoforvirtual)) { $filterStatus = '0,'.$filterStatus; @@ -6004,19 +5997,6 @@ public function load_virtual_stock($includedraftpoforvirtual = null, $dateofvirt } $stock_reception_fournisseur = $this->stats_reception['qty']; } - // Include reception lines (when module reception is used) - if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && isModEnabled("reception")) { - // Case module reception is used - $filterStatus = '4'; - if (isset($includedraftpoforvirtual)) { - $filterStatus = '0,'.$filterStatus; - } - $result = $this->load_stats_reception(0, $filterStatus, 1, $dateofvirtualstock); // Use same tables than when module reception is not used. - if ($result < 0) { - dol_print_error($this->db, $this->error); - } - $stock_reception_fournisseur = $this->stats_reception['qty']; - } // Include manufacturing if (isModEnabled('mrp')) { $result = $this->load_stats_inproduction(0, '1,2', 1, $dateofvirtualstock); @@ -6121,8 +6101,6 @@ public function loadBatchInfo($batch) public function add_photo($sdir, $file) { // phpcs:enable - global $conf; - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $result = 0; @@ -6170,8 +6148,6 @@ public function is_photo_available($sdir) include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; - global $conf; - $dir = $sdir; if (getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) { $dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos/"; @@ -6179,8 +6155,6 @@ public function is_photo_available($sdir) $dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product'); } - $nbphoto = 0; - $dir_osencoded = dol_osencode($dir); if (file_exists($dir_osencoded)) { $handle = opendir($dir_osencoded); @@ -6195,6 +6169,7 @@ public function is_photo_available($sdir) } } } + return false; } @@ -6527,8 +6502,6 @@ public function getLabelOfUnit($type = 'long') public function min_recommended_price() { // phpcs:enable - global $conf; - $maxpricesupplier = 0; if (getDolGlobalString('PRODUCT_MINIMUM_RECOMMENDED_PRICE')) { @@ -6598,8 +6571,6 @@ public static function replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id) */ public function generateMultiprices(User $user, $baseprice, $price_type, $price_vat, $npr, $psq) { - global $conf; - $sql = "SELECT rowid, level, fk_level, var_percent, var_min_percent FROM ".$this->db->prefix()."product_pricerules"; $query = $this->db->query($sql); @@ -6706,8 +6677,6 @@ public function info($id) */ public function getProductDurationHours() { - global $langs; - if (empty($this->duration_value)) { $this->errors[] = 'ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice'; return -1; @@ -6746,7 +6715,7 @@ public function getProductDurationHours() */ public function getKanbanView($option = '', $arraydata = null) { - global $langs,$conf; + global $langs, $conf; $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); From 6b80e2000b864b5790dd2a8fb2d2453dbe6de4d0 Mon Sep 17 00:00:00 2001 From: Bahfir Abbes Date: Sun, 28 Jul 2024 17:42:19 +0200 Subject: [PATCH 032/127] Fix: strpos($InfoFieldList[4], 'extra') generates a warning if $InfoFieldList[4] does not exist (#30483) --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 99adb9cc0134f..c7127f6e49233 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8263,7 +8263,7 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix $sql = "SELECT ".$keyList; $sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0]; - if (strpos($InfoFieldList[4], 'extra') !== false) { + if (isset($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra') !== false) { $sql .= ' as main'; } if ($selectkey == 'rowid' && empty($value)) { From a671c91d3e793f85f1f5ecc68c8d0c2b4046ebb3 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Date: Sun, 28 Jul 2024 17:43:46 +0200 Subject: [PATCH 033/127] QUAL bankline category table name (#30419) * FIX bankline category table name * remove bad space --------- Co-authored-by: Hystepik Co-authored-by: Laurent Destailleur --- htdocs/categories/class/categorie.class.php | 4 ++-- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/budget.php | 2 +- htdocs/compta/bank/class/account.class.php | 6 +++--- htdocs/compta/bank/class/bankcateg.class.php | 2 +- htdocs/compta/bank/line.php | 6 +++--- htdocs/compta/bank/releve.php | 2 +- htdocs/compta/cashcontrol/report.php | 2 +- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 1 + htdocs/install/mysql/tables/llx_bank_class.key.sql | 2 +- htdocs/install/mysql/tables/llx_bank_class.sql | 2 +- htdocs/install/upgrade.php | 2 +- 12 files changed, 17 insertions(+), 16 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 68788d49fa9e6..b3fabcd497d94 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -673,7 +673,7 @@ public function delete($user, $notrigger = 0) 'categorie_ticket' => array('field' => 'fk_categorie', 'enabled' => isModEnabled('ticket')), 'categorie_warehouse' => 'fk_categorie', 'categorie_website_page' => array('field' => 'fk_categorie', 'enabled' => isModEnabled('website')), - 'bank_class' => 'fk_categ', + 'category_bankline' => 'fk_categ', 'categorie_lang' => 'fk_category', 'categorie' => 'rowid', ); @@ -1535,7 +1535,7 @@ public function containing($id, $type, $mode = 'object') if ($type === Categorie::TYPE_BANK_LINE) { // TODO Remove this with standard category code after migration of llx_category_bank into llx_categorie // Load bank categories $sql = "SELECT c.label, c.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."bank_class as a, ".MAIN_DB_PREFIX."category_bank as c"; + $sql .= " FROM ".MAIN_DB_PREFIX."category_bankline as a, ".MAIN_DB_PREFIX."category_bank as c"; $sql .= " WHERE a.lineid=".((int) $id)." AND a.fk_categ = c.rowid"; $sql .= " AND c.entity IN (".getEntity('category').")"; $sql .= " ORDER BY c.label"; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index dd0fc0b4835a5..8e001b3b0e3aa 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -607,7 +607,7 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM "; if ($search_bid > 0) { - $sql .= MAIN_DB_PREFIX."bank_class as l,"; + $sql .= MAIN_DB_PREFIX."category_bankline as l,"; } $sql .= " ".MAIN_DB_PREFIX."bank_account as ba,"; $sql .= " ".MAIN_DB_PREFIX."bank as b"; diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index f8f9848d4c1a5..ad9d83d450af2 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -63,7 +63,7 @@ $sql = "SELECT sum(d.amount) as somme, count(*) as nombre, c.label, c.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."category_bank as c"; -$sql .= ", ".MAIN_DB_PREFIX."bank_class as l"; +$sql .= ", ".MAIN_DB_PREFIX."category_bankline as l"; $sql .= ", ".MAIN_DB_PREFIX."bank as d"; $sql .= " WHERE c.entity = ".$conf->entity; $sql .= " AND c.rowid = l.fk_categ"; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index cc8f6c437098f..b25dcf6001b43 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -676,7 +676,7 @@ public function addline($date, $oper, $label, $amount, $num_chq, $categorie, Use if ($accline->insert() > 0) { if ($categorie > 0) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."category_bankline("; $sql .= "lineid, fk_categ"; $sql .= ") VALUES ("; $sql .= ((int) $accline->id).", '".$this->db->escape($categorie)."'"; @@ -2350,7 +2350,7 @@ public function delete(User $user = null, $notrigger = 0) $nbko++; } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".(int) $this->rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."category_bankline WHERE lineid=".(int) $this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (!$result) { @@ -2509,7 +2509,7 @@ public function update_conciliation(User $user, $cat, $conciliated = 1) $resql = $this->db->query($sql); if ($resql) { if (!empty($cat) && $cat > 0) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class ("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."category_bankline ("; $sql .= "lineid"; $sql .= ", fk_categ"; $sql .= ") VALUES ("; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index d10ce27b017a1..9bdd66838e1eb 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -245,7 +245,7 @@ public function delete(User $user, $notrigger = 0) // Delete link between tag and bank lines if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."category_bankline"; $sql .= " WHERE fk_categ = ".((int) $this->id); $resql = $this->db->query($sql); diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index 44e5276e914d9..7275bdb3cc999 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -118,7 +118,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->hasRight('banque', 'modifier')) { $cat1 = GETPOSTINT("cat1"); if (!empty($rowid) && !empty($cat1)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".((int) $rowid)." AND fk_categ = ".((int) $cat1); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."category_bankline WHERE lineid = ".((int) $rowid)." AND fk_categ = ".((int) $cat1); if (!$db->query($sql)) { dol_print_error($db); } @@ -201,14 +201,14 @@ if (!$error) { $arrayofcategs = GETPOST('custcats', 'array'); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".((int) $rowid); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."category_bankline WHERE lineid = ".((int) $rowid); if (!$db->query($sql)) { $error++; dol_print_error($db); } if (count($arrayofcategs)) { foreach ($arrayofcategs as $val) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class (lineid, fk_categ) VALUES (".((int) $rowid).", ".((int) $val).")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."category_bankline (lineid, fk_categ) VALUES (".((int) $rowid).", ".((int) $val).")"; if (!$db->query($sql)) { $error++; dol_print_error($db); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 7cf3f03bee8a4..7951ceb34efa2 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -664,7 +664,7 @@ if ($ve) { $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."category_bank as ct"; - $sql .= ", ".MAIN_DB_PREFIX."bank_class as cl"; + $sql .= ", ".MAIN_DB_PREFIX."category_bankline as cl"; $sql .= " WHERE ct.rowid = cl.fk_categ"; $sql .= " AND ct.entity = ".((int) $conf->entity); $sql .= " AND cl.lineid = ".((int) $objp->rowid); diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 974a53f147682..198a451a1db9e 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -107,7 +107,7 @@ $sql.= " bu.url_id,"; $sql.= " f.module_source, f.ref as ref"; $sql.= " FROM "; -//if ($bid) $sql.= MAIN_DB_PREFIX."bank_class as l,"; +//if ($bid) $sql.= MAIN_DB_PREFIX."category_bankline as l,"; $sql.= " ".MAIN_DB_PREFIX."bank_account as ba,"; $sql.= " ".MAIN_DB_PREFIX."bank as b"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'payment'"; diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 6bf78e63cea01..f1328e1797cbe 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -90,3 +90,4 @@ ALTER TABLE llx_societe_account ADD COLUMN date_last_reset_password datetime aft -- Rename of bank table ALTER TABLE llx_bank_categ RENAME TO llx_category_bank; +ALTER TABLE llx_bank_class RENAME TO llx_category_bankline; diff --git a/htdocs/install/mysql/tables/llx_bank_class.key.sql b/htdocs/install/mysql/tables/llx_bank_class.key.sql index 0ca5cac8b04dc..812389c74d470 100644 --- a/htdocs/install/mysql/tables/llx_bank_class.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_class.key.sql @@ -16,4 +16,4 @@ -- -- =================================================================== -ALTER TABLE llx_bank_class ADD UNIQUE INDEX uk_bank_class_lineid (lineid, fk_categ); +ALTER TABLE llx_category_bankline ADD UNIQUE INDEX uk_category_bankline_lineid (lineid, fk_categ); diff --git a/htdocs/install/mysql/tables/llx_bank_class.sql b/htdocs/install/mysql/tables/llx_bank_class.sql index 185e149138db1..61112c3bec849 100644 --- a/htdocs/install/mysql/tables/llx_bank_class.sql +++ b/htdocs/install/mysql/tables/llx_bank_class.sql @@ -17,7 +17,7 @@ -- Table to link bank tag/categories with bank lines -- =================================================================== -create table llx_bank_class +create table llx_category_bankline ( lineid integer NOT NULL, fk_categ integer NOT NULL diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index e323fb88b6268..c7ed1c28ae47a 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -259,7 +259,7 @@ // Les contraintes indesirables ont un nom qui commence par 0_ ou se determine par ibfk_999 $listtables = array( MAIN_DB_PREFIX.'adherent_options', - MAIN_DB_PREFIX.'bank_class', + MAIN_DB_PREFIX.'category_bankline', MAIN_DB_PREFIX.'c_ecotaxe', MAIN_DB_PREFIX.'c_methode_commande_fournisseur', // table renamed MAIN_DB_PREFIX.'c_input_method' From e16abacf91ed0936882b2196ae0e09167bf4a3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Sun, 28 Jul 2024 18:48:58 +0200 Subject: [PATCH 034/127] NEW : allow link feature to task (#30235) * Update html.form.class.php * Create linkedobjectblock.tpl.php * Update task.php * Update linkedobjectblock.tpl.php * Update linkedobjectblock.tpl.php --- htdocs/core/class/html.form.class.php | 2 + htdocs/projet/tasks/task.php | 6 ++ .../tasks/tpl/linkedobjectblock.tpl.php | 86 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d1c6c58d83226..a06b4e029fa82 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9439,6 +9439,8 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI if (!isModEnabled('mrp')) { continue; // Do not show if module disabled } + } elseif ($objecttype == 'project_task') { + $tplpath = 'projet/tasks'; } global $linkedObjectBlock; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 617c6c263a004..31eeb7544e0bc 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -759,6 +759,12 @@ print $formfile->showdocuments('project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf); + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('project_task')); + + $compatibleImportElementsList = false; + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList); + print '
'; // List of actions on element diff --git a/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php b/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php new file mode 100644 index 0000000000000..3f5cda2507417 --- /dev/null +++ b/htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php @@ -0,0 +1,86 @@ + + * Copyright (C) 2014 Marcos García + * Copyright (C) 2019 Laurent Destailleur + * Copyright (C) 2024 Charlene Benke + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Protection to avoid direct call of template +if (empty($conf) || !is_object($conf)) { + print "Error, template page can't be called as URL"; + exit(1); +} + +?> + + + +load("tasks"); + +$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); + +$total = 0; $ilink = 0; +foreach ($linkedObjectBlock as $key => $objectlink) { + $ilink++; + + $trclass = 'oddeven'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> + + trans("Task"); ?> + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + print ' + + getNomUrl(1); ?> + date_start, 'day'); ?> + date_stop, 'day'); ?> + budget_amount; + echo price($objectlink->budget_amount); + ?> + getLibStatut(3); ?> + + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> + + + 1) { + ?> + + trans("Total"); ?> + + + + + + + + + + From 7e4624c2c09400c1abb19b82bfe42b61172c0e09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 19:10:36 +0200 Subject: [PATCH 035/127] Look and feel v21 --- htdocs/core/class/html.form.class.php | 25 ++++++++++++---------- htdocs/core/class/html.formsetup.class.php | 1 + htdocs/webportal/admin/setup.php | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d1c6c58d83226..f2822daaa1151 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2095,15 +2095,15 @@ public function select_remises($selected, $htmlname, $filter, $socid, $maxvalue /** * Return the HTML select list of users * - * @param string $selected Id user preselected - * @param string $htmlname Field name in form - * @param int<0,1> $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue - * @param int[] $exclude Array list of users id to exclude - * @param int<0,1> $disabled If select list must be disabled - * @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me - * @param int[]|int $enableonly Array list of users id to be enabled. All other must be disabled - * @param string $force_entity '0' or Ids of environment to force - * @return void + * @param string $selected Id user preselected + * @param string $htmlname Field name in form + * @param int<0,1> $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue + * @param int[] $exclude Array list of users id to exclude + * @param int<0,1> $disabled If select list must be disabled + * @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param int[]|int $enableonly Array list of users id to be enabled. All other must be disabled + * @param string $force_entity '0' or Ids of environment to force + * @return void * @deprecated Use select_dolusers instead * @see select_dolusers() */ @@ -2128,11 +2128,11 @@ public function select_users($selected = '', $htmlname = 'userid', $show_empty = * @param string $force_entity '0' or list of Ids of environment to force, separated by a coma, or 'default' = do no extend to all entities allowed to superadmin. * @param int $maxlength Maximum length of string into list (0=no limit) * @param int<-1,1> $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status - * @param string $morefilter Add more filters into sql request (Example: 'employee = 1'). This value must not come from user input. + * @param string $morefilter Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input. * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. * @param string $morecss More css - * @param int<0,1> $notdisabled Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). + * @param int<0,1> $notdisabled Show only active users (note: this will also happen, whatever is this option, if USER_HIDE_INACTIVE_IN_COMBOBOX is on). * @param int<0,2> $outputmode 0=HTML select string, 1=Array, 2=Detailed array * @param bool $multiple add [] in the name of element and add 'multiple' attribute * @param int<0,1> $forcecombo Force the component to be a simple combo box without ajax @@ -8754,6 +8754,9 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, if (is_array($tmpvalue)) { foreach ($tmpvalue as $keyforvalue => $valueforvalue) { + if ($keyforvalue == 'labelhtml') { + $keyforvalue = 'data-html'; + } if (preg_match('/^data-/', $keyforvalue)) { // The best solution if you want to use HTML values into the list is to use data-html. $out .= ' '.dol_escape_htmltag($keyforvalue).'="'.dol_escape_htmltag($valueforvalue).'"'; } diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 2761261986c66..4e747ad2f5677 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -1119,6 +1119,7 @@ public function generateInputFieldSelect() if ($this->picto) { $s .= img_picto('', $this->picto, 'class="pictofixedwidth"'); } + $s .= $this->form->selectarray($this->confKey, $this->fieldOptions, $this->fieldValue, 0, 0, 0, '', 0, 0, 0, '', $this->cssClass); return $s; diff --git a/htdocs/webportal/admin/setup.php b/htdocs/webportal/admin/setup.php index 1b6554be7e5da..30c98aa0ee8d0 100644 --- a/htdocs/webportal/admin/setup.php +++ b/htdocs/webportal/admin/setup.php @@ -118,7 +118,7 @@ // Add logged user //$formSetup->newItem('WEBPORTAL_USER_LOGGED2')->setAsSelectUser(); // only enabled users -$userList = $formSetup->form->select_dolusers(getDolGlobalInt('WEBPORTAL_USER_LOGGED'), 'WEBPORTAL_USER_LOGGED', 0, null, 0, '', '', '0', 0, 0, '', 0, '', '', 1, 1); +$userList = $formSetup->form->select_dolusers(getDolGlobalInt('WEBPORTAL_USER_LOGGED'), 'WEBPORTAL_USER_LOGGED', 0, null, 0, '', '', '0', 0, 0, '', 0, '', '', 1, 2); $item = $formSetup->newItem('WEBPORTAL_USER_LOGGED'); $item->setAsSelect($userList); From c00c17bb9939a2eb37e01c768a8afea56fdb79bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 19:38:56 +0200 Subject: [PATCH 036/127] Look and feel v21 --- .../public/webportal/tpl/header_login.tpl.php | 4 +-- htdocs/theme/eldy/global.inc.php | 28 +++++++++++++++++++ htdocs/theme/md/style.css.php | 28 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/htdocs/public/webportal/tpl/header_login.tpl.php b/htdocs/public/webportal/tpl/header_login.tpl.php index de81710c502f8..813c6a15b6c25 100644 --- a/htdocs/public/webportal/tpl/header_login.tpl.php +++ b/htdocs/public/webportal/tpl/header_login.tpl.php @@ -27,7 +27,7 @@ rootUrl.'includes/jquery/plugins/jnotify/jquery.jnotify.css'; - $jNotifyCSSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.css', 2); + $jNotifyCSSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.min.css', 2); print ''; // JQuery @@ -37,7 +37,7 @@ // JNotify //$jNotifyJSUrl = $context->rootUrl.'includes/jquery/plugins/jnotify/jquery.jnotify.js'; - $jNotifyJSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.js', 2); + $jNotifyJSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.min.js', 2); print ''; ?> diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 463be239053db..a068454cd1dae 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6535,6 +6535,10 @@ .jnotify-container .jnotify-notification-warning .jnotify-close, .jnotify-container .jnotify-notification-warning .jnotify-message { color: #a28918 !important; } +.jnotify-container .jnotify-close { + top: 4px !important; + font-size: 1.6em !important; +} /* use or not ? */ div.jnotify-background { @@ -6543,6 +6547,30 @@ box-shadow: 2px 2px 4px #8888 !important; } +/* jnotify for the login page */ +.bodylogin .jnotify-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 100000; + max-width: unset; + padding-left: unset !important; + padding-right: unset !important; + padding-top: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification { + margin: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification .jnotify-background { + border-radius: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification .jnotify-message { + text-align: center; + font-size: 1.1em; + font-weight: bold; +} + /* ============================================================================== */ /* blockUI */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e8464f67c3753..8b7eac9d3e26c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6506,6 +6506,10 @@ .jnotify-container .jnotify-notification-warning .jnotify-close, .jnotify-container .jnotify-notification-warning .jnotify-message { color: #a28918 !important; } +.jnotify-container .jnotify-close { + top: 4px !important; + font-size: 1.6em !important; +} /* use or not ? */ div.jnotify-background { @@ -6514,6 +6518,30 @@ box-shadow: 2px 2px 4px #8888 !important; } +/* jnotify for the login page */ +.bodylogin .jnotify-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 100000; + max-width: unset; + padding-left: unset !important; + padding-right: unset !important; + padding-top: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification { + margin: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification .jnotify-background { + border-radius: unset !important; +} +.bodylogin .jnotify-container .jnotify-notification .jnotify-message { + text-align: center; + font-size: 1.1em; + font-weight: bold; +} + /* ============================================================================== */ /* blockUI */ From feee2e13e795f912f9393e35cf9201021f9eb699 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Jul 2024 20:05:10 +0200 Subject: [PATCH 037/127] CSS --- htdocs/admin/modules.php | 18 +++++++----------- htdocs/core/modules/DolibarrModules.class.php | 7 ++++--- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 765a72d38a7b9..94d4466fdbe1a 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -851,19 +851,15 @@ $versiontrans .= $objMod->getVersion(1); } - if ($objMod->isCoreOrExternalModule() == 'external' - && ( - $action == 'checklastversion' - // This is a bad practice to activate a check on an external access during the building of the admin page. 1 external module can hang the application. - // Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate() - || getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE') - ) - ) { + if ($objMod->isCoreOrExternalModule() == 'external' && ($action == 'checklastversion' || getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE'))) { + // Setting CHECKLASTVERSION_EXTERNALMODULE to on is a bad practice to activate a check on an external access during the building of the admin page. + // 1 external module can hang the application. + // Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate() $checkRes = $objMod->checkForUpdate(); if ($checkRes > 0) { - setEventMessage($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion); + setEventMessages($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion, null, 'warnings'); } elseif ($checkRes < 0) { - setEventMessage($objMod->getName().' '.$langs->trans('CheckVersionFail'), 'warnings'); + setEventMessages($objMod->getName().' '.$langs->trans('CheckVersionFail'), null, 'errors'); } } @@ -1092,7 +1088,7 @@ if ($action == 'checklastversion') { if ($foundoneexternalmodulewithupdate) { - setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'mesgs'); + setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'warnings'); } else { setEventMessages($langs->trans("NoExternalModuleWithUpdate"), null, 'mesgs'); } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index b0ba5d6929011..88232c594f0c6 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2606,9 +2606,10 @@ public function getKanbanView($codeenabledisable = '', $codetoconfig = '') } /** - * Check for module update - * TODO : store results for $this->url_last_version and $this->needUpdate - * Add a cron task to monitor for updates + * Check for module update. + * Get URL content of $this->url_last_version and set $this->lastVersion and$this->needUpdate + * TODO Store result in DB. + * TODO Add a cron task to monitor for updates. * * @return int Return integer <0 if Error, 0 == no update needed, >0 if need update */ From 416bfe020b40580886cf0bd4c635252b86b8e390 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 01:00:49 +0200 Subject: [PATCH 038/127] Fix css --- htdocs/compta/bank/bankentries_list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 8e001b3b0e3aa..868baffdf5a3e 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1619,7 +1619,7 @@ // Date ope if (!empty($arrayfields['b.dateo']['checked'])) { - print ''; + print ''; print ''.dol_print_date($db->jdate($objp->do), "dayreduceformat").""; print ' '; print ''; @@ -1636,7 +1636,7 @@ // Date value if (!empty($arrayfields['b.datev']['checked'])) { - print ''; + print ''; print ''.dol_print_date($db->jdate($objp->dv), "dayreduceformat").""; print ' '; print ''; @@ -1668,7 +1668,7 @@ // Num cheque if (!empty($arrayfields['b.num_chq']['checked'])) { - print ''.($objp->num_chq ? dol_escape_htmltag($objp->num_chq) : "")."\n"; + print ''.($objp->num_chq ? dolPrintLabel($objp->num_chq) : "")."\n"; if (!$i) { $totalarray['nbfield']++; } @@ -1755,7 +1755,7 @@ // Debit if (!empty($arrayfields['b.debit']['checked'])) { - print ''; + print ''; if ($objp->amount < 0) { print price($objp->amount * -1); $totalarray['totaldeb'] += $objp->amount; @@ -1771,7 +1771,7 @@ // Credit if (!empty($arrayfields['b.credit']['checked'])) { - print ''; + print ''; if ($objp->amount > 0) { print price($objp->amount); $totalarray['totalcred'] += $objp->amount; From 0542c956dcdc582514fe3a273acbecac2ab4e7e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 01:21:08 +0200 Subject: [PATCH 039/127] CSS --- htdocs/compta/bank/bankentries_list.php | 55 ++++++++++++++----------- htdocs/core/class/translate.class.php | 2 +- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 868baffdf5a3e..d1016e199b4ae 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -155,7 +155,8 @@ 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1,'position' => 30), 'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40), 'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50), - 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60), + 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 0,'position' => 60), + 'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 65), 'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70), 'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80), 'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 90), @@ -164,7 +165,6 @@ 'balance' => array('label' => $langs->trans("Balance"), 'checked' => 1, 'position' => 120), 'b.num_releve' => array('label' => $langs->trans("AccountStatement"), 'checked' => 1, 'position' => 130), 'b.conciliated' => array('label' => $langs->trans("BankLineReconciled"), 'enabled' => $object->rappro, 'checked' => ($action == 'reconcile' ? 1 : 0), 'position' => 140), - 'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 150), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -1131,6 +1131,7 @@ if (!empty($arrayfields['b.datev']['checked'])) { print ' '; } + // Type if (!empty($arrayfields['type']['checked'])) { print ''; print $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100', 1); @@ -1140,7 +1141,11 @@ if (!empty($arrayfields['b.num_chq']['checked'])) { print ''; } - // Checked + // Bordereau + if (!empty($arrayfields['b.fk_bordereau']['checked'])) { + print ''; + } + // Thirdparty if (!empty($arrayfields['bu.label']['checked'])) { print ''; } @@ -1186,10 +1191,6 @@ print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1, 1, 'search_status onrightofpage width75'); print ''; } - // Bordereau - if (!empty($arrayfields['b.fk_bordereau']['checked'])) { - print ''; - } // Action edit/delete and select print ''; @@ -1238,6 +1239,10 @@ print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, '', $sortfield, $sortorder, "center "); $totalarray['nbfield']++; } + if (!empty($arrayfields['b.fk_bordereau']['checked'])) { + print_liste_field_titre($arrayfields['b.fk_bordereau']['label'], $_SERVER['PHP_SELF'], 'b.fk_bordereau', '', $param, '', $sortfield, $sortorder, "center "); + $totalarray['nbfield']++; + } if (!empty($arrayfields['bu.label']['checked'])) { print_liste_field_titre($arrayfields['bu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; @@ -1270,10 +1275,6 @@ print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, '', $sortfield, $sortorder, "center "); $totalarray['nbfield']++; } - if (!empty($arrayfields['b.fk_bordereau']['checked'])) { - print_liste_field_titre($arrayfields['b.fk_bordereau']['label'], $_SERVER['PHP_SELF'], 'b.fk_bordereau', '', $param, '', $sortfield, $sortorder, "center "); - $totalarray['nbfield']++; - } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -1418,6 +1419,7 @@ } print ''; } + if (!empty($arrayfields['b.num_releve']['checked'])) { print ''; } @@ -1653,12 +1655,15 @@ // Payment type if (!empty($arrayfields['type']['checked'])) { - print ''; - $labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1); + $labeltype = ($langs->transnoentitiesnoconv("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->transnoentitiesnoconv("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1); + if (empty($arrayfields['b.num_chq']['checked'])) { + $labeltype .= ($objp->num_chq ? ' - '.$objp->num_chq : ''); + } + print ''; if ($labeltype == 'SOLD') { print ' '; //$langs->trans("InitialBankBalance"); } else { - print $labeltype; + print dolPrintLabel($labeltype); } print "\n"; if (!$i) { @@ -1674,6 +1679,17 @@ } } + // Cheque + if (!empty($arrayfields['b.fk_bordereau']['checked'])) { + $bordereaustatic->fetch($objp->fk_bordereau); + print ''; + print $bordereaustatic->getNomUrl(); + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Third party if (!empty($arrayfields['bu.label']['checked'])) { print ''; @@ -1832,6 +1848,7 @@ } } + // Conciliated if (!empty($arrayfields['b.conciliated']['checked'])) { print ''; print yn($objp->conciliated); @@ -1841,16 +1858,6 @@ } } - if (!empty($arrayfields['b.fk_bordereau']['checked'])) { - $bordereaustatic->fetch($objp->fk_bordereau); - print ''; - print $bordereaustatic->getNomUrl(); - print ''; - if (!$i) { - $totalarray['nbfield']++; - } - } - // Fields from hook $parameters = array('arrayfields' => $arrayfields, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 534aa18773e65..e15b80798f26d 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -1025,7 +1025,7 @@ public function getLabelFromNumber($number, $isamount = '') * @param string $fieldlabel Field for label. This value must always be a hardcoded string and not a value coming from user input. * @param string $keyforselect Use another value than the translation key for the where into select * @param int $filteronentity Use a filter on entity - * @return string|int Label in UTF8 (but without entities) or -1 if error + * @return string|int Label in UTF8 (not HTML entity encoded) or -1 if error * @see dol_getIdFromCode() */ public function getLabelFromKey($db, $key, $tablename, $fieldkey, $fieldlabel, $keyforselect = '', $filteronentity = 0) From a75d51be548001b1ba9ed7cfdf9e08c789298337 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 01:39:37 +0200 Subject: [PATCH 040/127] Trans --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index cab5389f98412..5f7b495452c48 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1497,7 +1497,7 @@ InvoiceOptionCategoryOfOperationsYes2=Yes, in the lower left-hand corner InvoiceClassifyBilledSupplierOrderWithoutInvoice=Disallow the classification of an order as billed without invoice. InvoiceClassifyBilledSupplierOrderWithoutInvoiceHelp=An order can be classified as billed by default. If this conf is set to true, it will be not. ##### Supplier Orders ##### -SupplierOrderClassifyBilledWithoutInvoice=Disallow the classification of a supplier order as billed without invoice. +SupplierOrderClassifyBilledWithoutInvoice=Disallow the classification of a purchase order as billed without invoice. SupplierOrderClassifyBilledWithoutInvoiceHelp=A supplier order can be classified as billed by default. If this conf is set to true, it will be not. ##### Proposals ##### PropalSetup=Commercial proposals module setup From ee298218be1bfb06ddece9e88413a9a64cdf246c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 12:16:41 +0200 Subject: [PATCH 041/127] NEW Add more log information --- htdocs/compta/paiement/class/paiement.class.php | 2 ++ .../interface_50_modAgenda_ActionsAuto.class.php | 15 +++++++++++++-- htdocs/public/stripe/ipn.php | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index f1425f1fc56ff..2be4b94997c2f 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -514,6 +514,8 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) // Set invoice to paid if (!$error) { + $invoice->context['actionmsgmore'] = 'Invoice set to paid by the payment->create() of payment '.$this->ref.' because the remain to pay is 0'; + $result = $invoice->setPaid($user, '', ''); if ($result < 0) { $this->error = $invoice->error; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index de03d94553776..68cf8283ace12 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -1368,8 +1368,10 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf // TODO Merge all previous cases into this generic one // $action = PASSWORD, BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ... // Can also be a value defined by an external module like SENTBYSMS, COMPANY_SENTBYSMS, MEMBER_SENTBYSMS, ... - // Note: We are here only if $conf->global->MAIN_AGENDA_ACTIONAUTO_action is on (tested at beginning of this function). - // Note that these key can be set in agenda setup, only if defined into llx_c_action_trigger + // Note: We are here only if getDolGlobalString('MAIN_AGENDA_ACTIONAUTO_action') is on (tested at beginning of this function). + // Note that these activation key can be set in agenda setup (but only if defined into llx_c_action_trigger). + + // If initial message not sent but found into context if (!empty($object->context['actionmsg']) && empty($object->actionmsg)) { // For description $object->actionmsg = $object->context['actionmsg']; } @@ -1377,6 +1379,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf $object->actionmsg2 = $object->context['actionmsg2']; } + // Set the label and message of event if (empty($object->actionmsg2)) { // Load translation files required by the page $langs->loadLangs(array("agenda", "other")); @@ -1401,6 +1404,14 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf } } + // Concat note with data from context + if (!empty($object->context['actionmsgmore'])) { // For description + $object->actionmsg = dol_concatdesc($object->actionmsg, $object->context['actionmsgmore']); + } + if (!empty($object->context['actionmsg2more'])) { // For label + $object->actionmsg2 = dol_concatdesc($object->actionmsg2, $object->context['actionmsg2more']); + } + if (!isset($object->sendtoid) || !is_array($object->sendtoid)) { $object->sendtoid = 0; } diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 1a70c445f81aa..787a1474904a3 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -447,7 +447,7 @@ $paiement->num_payment = ''; $paiement->note_public = ''; - $paiement->note_private = 'StripeSepa payment received by IPN webhook - ' . dol_print_date($now, 'standard') . ' using servicestatus=' . $servicestatus . ($ipaddress ? ' from ip ' . $ipaddress : '') . ' - Transaction ID = ' . $TRANSACTIONID; + $paiement->note_private = 'StripeSepa payment received by IPN webhook - ' . dol_print_date($now, 'standard') . ' (TZ server) using servicestatus=' . $servicestatus . ($ipaddress ? ' from ip ' . $ipaddress : '') . ' - Transaction ID = ' . $TRANSACTIONID; $paiement->ext_payment_id = $TRANSACTIONID.':'.$customer_id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; // May be we should store py_... instead of pi_... but we started with pi_... so we continue. $paiement->ext_payment_site = $service; From 2065adda8b428645d32c50b9a20c02ae73912396 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 13:09:23 +0200 Subject: [PATCH 042/127] FIX Removed deprecated javascript. Use simple url link. --- htdocs/core/lib/website.lib.php | 51 ++++++++++++++------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index ef3ae0a2f98e5..a6aef71072325 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -933,11 +933,12 @@ function getSocialNetworkHeaderCards($params = null) /** * Return HTML content to add structured data for an article, news or Blog Post. * + * @param string $socialnetworks '' or list of social networks * @return string HTML content */ -function getSocialNetworkSharingLinks() +function getSocialNetworkSharingLinks($socialnetworks = '') { - global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running included containers. + global $website, $websitepage; // Very important. Required to have var available when running included containers. $out = ''."\n"; @@ -948,37 +949,29 @@ function getSocialNetworkSharingLinks() $out .= '\n"; From 0d69b5fb206d1f1a26a0891f99772c2c972abf7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Jul 2024 13:17:50 +0200 Subject: [PATCH 045/127] Fix missing /div --- htdocs/core/lib/website.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index f1a6a4fc98192..6f0abb8e1ca0e 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -968,6 +968,7 @@ function getSocialNetworkSharingLinks($socialnetworks = '') $out .= ''; $out .= ''; $out .= ''; + $out .= '
'; } $out .= "\n\n"; From 3229b8ac6e2db92304f8bfd7d7a6ab284fb968fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 11:16:19 +0200 Subject: [PATCH 046/127] Debug v20 - Error message when requesting credit transfer/direct debit --- htdocs/compta/facture/list.php | 3 ++- htdocs/fourn/facture/list.php | 3 ++- htdocs/langs/en_US/errors.lang | 5 +++-- htdocs/salaries/class/salary.class.php | 19 ++++++++++++++----- htdocs/salaries/list.php | 17 ++++++++++------- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ca0e713c97bac..0196004840c20 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -564,8 +564,9 @@ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($objecttmp->ref.' '.$langs->trans("ErrorThisPaymentModeIsNotDirectDebit"), $objecttmp->errors, 'errors'); } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 40cfa977e6c33..d4417b51046c9 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -381,8 +381,9 @@ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'VIR') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($objecttmp->ref.' '.$langs->trans("ErrorThisPaymentModeIsNotCreditTransfer"), $objecttmp->errors, 'errors'); } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index f2bfeefcfc83e..e83bc83143e45 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -303,7 +303,8 @@ ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is man ErrorFailedToWriteInTempDirectory=Failed to write in temp directory ErrorQuantityIsLimitedTo=Quantity is limited to %s ErrorFailedToLoadThirdParty=Failed to find/load third party from id=%s, email=%s, name=%s -ErrorThisPaymentModeIsNotSepa=This payment mode is not a bank account +ErrorThisPaymentModeIsNotDirectDebit=The payment mode is not direct debit +ErrorThisPaymentModeIsNotCreditTransfer=The payment mode is not credit transfer ErrorStripeCustomerNotFoundCreateFirst=Stripe customer is not set for this third party (or set to a value deleted on Stripe side). Create (or re-attach) it first. ErrorCharPlusNotSupportedByImapForSearch=IMAP search is not able to search into sender or recipient for a string containing the character + ErrorTableNotFound=Table %s not found @@ -334,7 +335,7 @@ ErrorDictionaryNotFound=Dictionary %s not found ErrorFailedToCreateSymLinkToMedias=Failed to create the symbolic link %s to point to %s ErrorCheckTheCommandInsideTheAdvancedOptions=Check the command used for the export into the Advanced options of the export ErrorEndTimeMustBeGreaterThanStartTime=End time must be greater than start time -ErrorIncoherentDates=Start date must be earlier than end date +ErrorIncoherentDates=Start date must be earlier than end date ErrorEndHourIsNull=End date field cannot be empty ErrorStartHourIsNull=Start date field cannot be empty ErrorTooManyLinesToProcessPleaseUseAMoreSelectiveFilter=Too many lines to process. Please use a more selective filter. diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 84aa00fa67562..1d21e8101a052 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -78,7 +78,8 @@ class Salary extends CommonObject */ public $fk_project; - public $type_payment; + public $type_payment; // TODO Rename into type_payment_id + public $type_payment_code; /** * @var string salary payments label @@ -130,6 +131,7 @@ class Salary extends CommonObject public $resteapayer; + /** * Constructor * @@ -239,17 +241,21 @@ public function fetch($id, $user = null) $sql .= " s.label,"; $sql .= " s.datesp,"; $sql .= " s.dateep,"; - $sql .= " s.note,"; + $sql .= " s.note as note_private,"; + $sql .= " s.note_public,"; $sql .= " s.paye,"; $sql .= " s.fk_bank,"; $sql .= " s.fk_user_author,"; $sql .= " s.fk_user_modif,"; - $sql .= " s.fk_account"; + $sql .= " s.fk_account,"; + $sql .= " cp.code as type_payment_code"; $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON s.fk_typepayment = cp.id"; $sql .= " WHERE s.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); if ($resql) { if ($this->db->num_rows($resql)) { @@ -264,10 +270,13 @@ public function fetch($id, $user = null) $this->amount = $obj->amount; $this->fk_project = $obj->fk_project; $this->type_payment = $obj->fk_typepayment; + $this->type_payment_code = $obj->type_payment_code; $this->label = $obj->label; $this->datesp = $this->db->jdate($obj->datesp); $this->dateep = $this->db->jdate($obj->dateep); - $this->note = $obj->note; + $this->note = $obj->note_private; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; $this->paye = $obj->paye; $this->status = $obj->paye; $this->fk_bank = $obj->fk_bank; @@ -601,7 +610,7 @@ public function getSommePaiement($multicurrency = 0) $sql .= " FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE ".$field." = ".((int) $this->id); - dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); + dol_syslog(get_class($this)."::getSommePaiement for salary id=".((int) $this->id), LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 7104fbf927f64..f70031bfdf971 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -144,6 +144,8 @@ $permissiontoadd = $user->hasRight('salaries', 'write'); $permissiontodelete = $user->hasRight('salaries', 'delete'); +$error = 0; + // Security check $socid = GETPOSTINT("socid"); if ($user->socid) { @@ -197,10 +199,10 @@ if ($objecttmp->status == Salary::STATUS_PAID || $objecttmp->resteapayer == 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); } elseif ($resteapayer < 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); } $rsql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande"; @@ -221,17 +223,18 @@ if ($numprlv > 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); - } elseif (!empty($objecttmp->type_payment) && $objecttmp->type_payment != '2') { + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); + } elseif (!empty($objecttmp->type_payment_code) && $objecttmp->type_payment_code != 'VIR') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("ErrorThisPaymentModeIsNotCreditTransfer"), $objecttmp->errors, 'errors'); } else { $listofSalries[] = $objecttmp; } } } - if (!empty($listofSalries)) { + if (!$error && !empty($listofSalries)) { $nbwithdrawrequestok = 0; foreach ($listofSalries as $salary) { $db->begin(); @@ -498,7 +501,7 @@ if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (isModEnabled('prelevement') && $user->hasRight('prelevement', 'bons', 'creer')) { +if (isModEnabled('paymentbybanktransfer') && $user->hasRight('paymentbybanktransfer', 'create')) { $langs->load("withdrawals"); $arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeBankTransferOrder"); } From 53561f033bcf06412b622b3bbc8ecf5aa46d8fee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 11:16:19 +0200 Subject: [PATCH 047/127] Debug v20 - Error message when requesting credit transfer/direct debit --- htdocs/compta/facture/list.php | 3 ++- htdocs/fourn/facture/list.php | 3 ++- htdocs/langs/en_US/errors.lang | 9 +++++---- htdocs/salaries/class/salary.class.php | 19 ++++++++++++++----- htdocs/salaries/list.php | 17 ++++++++++------- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 333fe0cea04ca..53596274e3fda 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -564,8 +564,9 @@ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($objecttmp->ref.' '.$langs->trans("ErrorThisPaymentModeIsNotDirectDebit"), $objecttmp->errors, 'errors'); } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 71f104305ea5f..88c208111e018 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -381,8 +381,9 @@ $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'VIR') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($objecttmp->ref.' '.$langs->trans("ErrorThisPaymentModeIsNotCreditTransfer"), $objecttmp->errors, 'errors'); } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 047914c7d1118..e83bc83143e45 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -303,7 +303,8 @@ ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is man ErrorFailedToWriteInTempDirectory=Failed to write in temp directory ErrorQuantityIsLimitedTo=Quantity is limited to %s ErrorFailedToLoadThirdParty=Failed to find/load third party from id=%s, email=%s, name=%s -ErrorThisPaymentModeIsNotSepa=This payment mode is not a bank account +ErrorThisPaymentModeIsNotDirectDebit=The payment mode is not direct debit +ErrorThisPaymentModeIsNotCreditTransfer=The payment mode is not credit transfer ErrorStripeCustomerNotFoundCreateFirst=Stripe customer is not set for this third party (or set to a value deleted on Stripe side). Create (or re-attach) it first. ErrorCharPlusNotSupportedByImapForSearch=IMAP search is not able to search into sender or recipient for a string containing the character + ErrorTableNotFound=Table %s not found @@ -334,9 +335,9 @@ ErrorDictionaryNotFound=Dictionary %s not found ErrorFailedToCreateSymLinkToMedias=Failed to create the symbolic link %s to point to %s ErrorCheckTheCommandInsideTheAdvancedOptions=Check the command used for the export into the Advanced options of the export ErrorEndTimeMustBeGreaterThanStartTime=End time must be greater than start time -ErrorIncoherentDates=Date start must be less than date end -ErrorEndHourIsNull=End date cannot be zero -ErrorStartHourIsNull=Start date cannot be zero +ErrorIncoherentDates=Start date must be earlier than end date +ErrorEndHourIsNull=End date field cannot be empty +ErrorStartHourIsNull=Start date field cannot be empty ErrorTooManyLinesToProcessPleaseUseAMoreSelectiveFilter=Too many lines to process. Please use a more selective filter. ErrorEmptyValueForQty=Quantity cannot be zero. # Warnings diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 84aa00fa67562..1d21e8101a052 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -78,7 +78,8 @@ class Salary extends CommonObject */ public $fk_project; - public $type_payment; + public $type_payment; // TODO Rename into type_payment_id + public $type_payment_code; /** * @var string salary payments label @@ -130,6 +131,7 @@ class Salary extends CommonObject public $resteapayer; + /** * Constructor * @@ -239,17 +241,21 @@ public function fetch($id, $user = null) $sql .= " s.label,"; $sql .= " s.datesp,"; $sql .= " s.dateep,"; - $sql .= " s.note,"; + $sql .= " s.note as note_private,"; + $sql .= " s.note_public,"; $sql .= " s.paye,"; $sql .= " s.fk_bank,"; $sql .= " s.fk_user_author,"; $sql .= " s.fk_user_modif,"; - $sql .= " s.fk_account"; + $sql .= " s.fk_account,"; + $sql .= " cp.code as type_payment_code"; $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON s.fk_typepayment = cp.id"; $sql .= " WHERE s.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); if ($resql) { if ($this->db->num_rows($resql)) { @@ -264,10 +270,13 @@ public function fetch($id, $user = null) $this->amount = $obj->amount; $this->fk_project = $obj->fk_project; $this->type_payment = $obj->fk_typepayment; + $this->type_payment_code = $obj->type_payment_code; $this->label = $obj->label; $this->datesp = $this->db->jdate($obj->datesp); $this->dateep = $this->db->jdate($obj->dateep); - $this->note = $obj->note; + $this->note = $obj->note_private; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; $this->paye = $obj->paye; $this->status = $obj->paye; $this->fk_bank = $obj->fk_bank; @@ -601,7 +610,7 @@ public function getSommePaiement($multicurrency = 0) $sql .= " FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE ".$field." = ".((int) $this->id); - dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); + dol_syslog(get_class($this)."::getSommePaiement for salary id=".((int) $this->id), LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index a4a75462f635f..73e0543ecddbe 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -144,6 +144,8 @@ $permissiontoadd = $user->hasRight('salaries', 'write'); $permissiontodelete = $user->hasRight('salaries', 'delete'); +$error = 0; + // Security check $socid = GETPOSTINT("socid"); if ($user->socid) { @@ -197,10 +199,10 @@ if ($objecttmp->status == Salary::STATUS_PAID || $objecttmp->resteapayer == 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); } elseif ($resteapayer < 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); } $rsql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande"; @@ -221,17 +223,18 @@ if ($numprlv > 0) { $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); - } elseif (!empty($objecttmp->type_payment) && $objecttmp->type_payment != '2') { + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); + } elseif (!empty($objecttmp->type_payment_code) && $objecttmp->type_payment_code != 'VIR') { + $langs->load("errors"); $error++; - setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("ErrorThisPaymentModeIsNotCreditTransfer"), $objecttmp->errors, 'errors'); } else { $listofSalries[] = $objecttmp; } } } - if (!empty($listofSalries)) { + if (!$error && !empty($listofSalries)) { $nbwithdrawrequestok = 0; foreach ($listofSalries as $salary) { $db->begin(); @@ -498,7 +501,7 @@ if (!empty($permissiontodelete)) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } -if (isModEnabled('prelevement') && $user->hasRight('prelevement', 'bons', 'creer')) { +if (isModEnabled('paymentbybanktransfer') && $user->hasRight('paymentbybanktransfer', 'create')) { $langs->load("withdrawals"); $arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeBankTransferOrder"); } From 4223c6241c73a9ca09058193defbdb5e5e2d0adb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 11:52:40 +0200 Subject: [PATCH 048/127] Fix tooltip --- htdocs/societe/class/societe.class.php | 2 +- htdocs/user/class/user.class.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 326a535e7782f..3bed18d74c89b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2869,7 +2869,7 @@ public function getTooltipContentArray($params) * Return a link on thirdparty (with picto) * * @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only) - * @param string $option Target of link ('', 'customer', 'prospect', 'supplier', 'project') + * @param string $option Target of link (''=auto, 'nolink'=no link, 'customer', 'prospect', 'supplier', 'project', 'agenda', ...) * @param int $maxlen Max length of name * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 98b3a24b2faba..92b3f4c38e628 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2934,7 +2934,7 @@ public function getTooltipContentArray($params) $thirdpartystatic->fetch($this->socid); $companyimg = ''; if (empty($params['hidethirdpartylogo'])) { - $companyimg = ' '.$thirdpartystatic->getNomUrl(2, (($option == 'nolink') ? 'nolink' : '')); // picto only of company + $companyimg = ' '.$thirdpartystatic->getNomUrl(2, 'nolink', 0, 1); // picto only of company } $company = ' ('.$langs->trans("Company").': '.($companyimg ? $companyimg : img_picto('', 'company')).' '.dol_string_nohtmltag($thirdpartystatic->name).')'; } @@ -2987,8 +2987,7 @@ public function getTooltipContentArray($params) */ public function getNomUrl($withpictoimg = 0, $option = '', $infologin = 0, $notooltip = 0, $maxlen = 24, $hidethirdpartylogo = 0, $mode = '', $morecss = '', $save_lastsearch_value = -1) { - global $langs, $conf, $db, $hookmanager, $user; - global $dolibarr_main_authentication, $dolibarr_main_demo; + global $langs, $hookmanager, $user; if (!$user->hasRight('user', 'user', 'read') && $user->id != $this->id) { $option = 'nolink'; @@ -3021,7 +3020,7 @@ public function getNomUrl($withpictoimg = 0, $option = '', $infologin = 0, $noto $thirdpartystatic = new Societe($this->db); $thirdpartystatic->fetch($this->socid); if (empty($hidethirdpartylogo)) { - $companylink = ' '.$thirdpartystatic->getNomUrl(2, (($option == 'nolink') ? 'nolink' : '')); // picto only of company + $companylink = ' '.$thirdpartystatic->getNomUrl(2, 'nolink', 0, 1); // picto only of company } } From d24631de7ef08f4f58b7a91c87f7e0bac8917674 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 12:06:59 +0200 Subject: [PATCH 049/127] Debug v20 --- htdocs/comm/action/class/actioncomm.class.php | 13 ++++++++++--- htdocs/core/class/html.form.class.php | 6 +++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index e8b0a9c3fe85f..af988c0dfa65e 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1586,7 +1586,8 @@ public function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') */ public function getTooltipContentArray($params) { - global $langs; + global $langs, $form; + $langs->load('agenda'); $datas = array(); @@ -1646,8 +1647,14 @@ public function getTooltipContentArray($params) // show categories for this record only in ajax to not overload lists if (isModEnabled('category') && !$nofetch) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $form = new Form($this->db); - $datas['categories'] = '
' . $form->showCategories($this->id, Categorie::TYPE_ACTIONCOMM, 1); + if (empty($form)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + $form = new Form($this->db); + } + $tmpcategstring = $form->showCategories($this->id, Categorie::TYPE_ACTIONCOMM, 1); + if ($tmpcategstring) { + $datas['categories'] = '
'.$tmpcategstring; + } } return $datas; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f32c0f4119fd6..3b3816446e927 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9265,7 +9265,11 @@ public function showCategories($id, $type, $rendermode = 0, $nolink = 0) $toprint[] = '
  • color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '
  • '; } } - return '
      ' . implode(' ', $toprint) . '
    '; + if (empty($toprint)) { + return ''; + } else { + return '
      ' . implode(' ', $toprint) . '
    '; + } } if ($rendermode == 0) { From d527b1a797b303fd43fee78a2755a99942857023 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 12:20:30 +0200 Subject: [PATCH 050/127] Debug v20 --- htdocs/adherents/type.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 9e0259d11ab01..93cf6c00a9132 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -331,7 +331,7 @@ $membertype = new AdherentType($db); $i = 0; - $savnbfield = 9; + $savnbfield = 10; /*$savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0;*/ @@ -564,6 +564,7 @@ print yn($object->vote); print ''; + // Duration print ''.$langs->trans("Duration").''.$object->duration_value.' '; if ($object->duration_value > 1) { $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years")); @@ -573,13 +574,15 @@ print(!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." "; print ''; - print ''.$langs->trans("Description").''; + // Description + print ''.$langs->trans("Description").'
    '; print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_public)); - print ""; + print "
    "; - print ''.$langs->trans("WelcomeEMail").''; + // Welcome email content + print ''.$langs->trans("WelcomeEMail").'
    '; print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->mail_valid)); - print ""; + print "
    "; // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; @@ -749,9 +752,6 @@ if (!empty($search_lastname)) { $param .= "&search_lastname=".urlencode($search_lastname); } - if (!empty($search_firstname)) { - $param .= "&search_firstname=".urlencode($search_firstname); - } if (!empty($search_login)) { $param .= "&search_login=".urlencode($search_login); } @@ -769,6 +769,7 @@ print ''; print ''; print ''; + print ''; print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); @@ -847,6 +848,7 @@ $adh->datefin = $datefin; $adh->need_subscription = $objp->subscription; $adh->statut = $objp->status; + $adh->status = $objp->status; $adh->email = $objp->email; $adh->photo = $objp->photo; From 0bc82e4c94cf75287d705a0bdd3a10ce66a54d9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jul 2024 12:25:47 +0200 Subject: [PATCH 051/127] Fix error management --- htdocs/salaries/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 73e0543ecddbe..290b66bab30de 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -222,7 +222,7 @@ } if ($numprlv > 0) { - $error++; + //$error++; // Not an error, a simple warning we can ignore setEventMessages($langs->trans("Salary").' '.$objecttmp->ref.' : '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); } elseif (!empty($objecttmp->type_payment_code) && $objecttmp->type_payment_code != 'VIR') { $langs->load("errors"); @@ -234,6 +234,7 @@ } } + // Now process all record not in error if (!$error && !empty($listofSalries)) { $nbwithdrawrequestok = 0; foreach ($listofSalries as $salary) { From a701f84543f315c0fe311eaf91a6a823ea28b2e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 12:14:39 +0200 Subject: [PATCH 052/127] Fix tooltip on numbering modules --- htdocs/core/modules/asset/mod_asset_advanced.php | 1 + .../core/modules/barcode/mod_barcode_product_standard.php | 1 + .../modules/barcode/mod_barcode_thirdparty_standard.php | 1 + htdocs/core/modules/bom/mod_bom_advanced.php | 1 + htdocs/core/modules/cheque/mod_chequereceipt_thyme.php | 1 + htdocs/core/modules/commande/mod_commande_saphir.php | 1 + htdocs/core/modules/contract/mod_contract_magre.php | 1 + htdocs/core/modules/delivery/mod_delivery_saphir.php | 1 + htdocs/core/modules/expedition/mod_expedition_ribera.php | 1 + .../core/modules/expensereport/mod_expensereport_sand.php | 1 + htdocs/core/modules/facture/mod_facture_mercure.php | 1 + htdocs/core/modules/fichinter/mod_arctic.php | 1 + htdocs/core/modules/holiday/mod_holiday_immaculate.php | 1 + htdocs/core/modules/hrm/mod_evaluation_advanced.php | 1 + htdocs/core/modules/mrp/mod_mo_advanced.php | 1 + htdocs/core/modules/payment/mod_payment_ant.php | 1 + htdocs/core/modules/product/mod_codeproduct_elephant.php | 1 + htdocs/core/modules/product_batch/mod_lot_advanced.php | 1 + htdocs/core/modules/product_batch/mod_sn_advanced.php | 1 + htdocs/core/modules/project/mod_project_universal.php | 1 + htdocs/core/modules/project/task/mod_task_universal.php | 1 + htdocs/core/modules/propale/mod_propale_saphir.php | 1 + htdocs/core/modules/reception/mod_reception_moonstone.php | 1 + htdocs/core/modules/societe/mod_codeclient_elephant.php | 8 ++++++-- .../modules/stocktransfer/mod_stocktransfer_advanced.php | 1 + .../supplier_invoice/mod_facture_fournisseur_tulip.php | 1 + .../supplier_order/mod_commande_fournisseur_orchidee.php | 1 + .../supplier_payment/mod_supplier_payment_brodator.php | 1 + .../supplier_proposal/mod_supplier_proposal_saphir.php | 1 + htdocs/core/modules/takepos/mod_takepos_ref_universal.php | 1 + htdocs/core/modules/ticket/mod_ticket_universal.php | 1 + .../core/modules/workstation/mod_workstation_advanced.php | 1 + .../knowledgemanagement/mod_knowledgerecord_advanced.php | 1 + htdocs/langs/en_US/admin.lang | 4 +++- .../core/modules/mymodule/mod_myobject_advanced.php | 1 + .../core/modules/partnership/mod_partnership_advanced.php | 1 + htdocs/product/card.php | 4 ++++ .../recruitment/mod_recruitmentcandidature_advanced.php | 1 + .../recruitment/mod_recruitmentjobposition_advanced.php | 1 + 39 files changed, 49 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index a1f800d309dce..f63355290169a 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -76,6 +76,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Asset"), $langs->transnoentities("Asset")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index e325ea94fc4c2..49103a4f3c02a 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -90,6 +90,7 @@ public function info($langs) $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; //$tooltip.=$langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Mask parameter //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php index e60472fe463e9..883c6114f7f25 100644 --- a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -103,6 +103,7 @@ public function info($langs) $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; //$tooltip.=$langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Mask parameter //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 2428e79595d36..b678053cb3090 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Bom"), $langs->transnoentities("Bom")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 44eff63035d10..a2067fbb44767 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -71,6 +71,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("CheckReceiptShort"), $langs->transnoentities("CheckReceiptShort")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index aefd2718508eb..300a282eb2c06 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index ebd7957780fe9..7f24fa120cea3 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -70,6 +70,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Contract"), $langs->transnoentities("Contract")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index b6669961cd051..64e25c5439bdd 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -82,6 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Delivery"), $langs->transnoentities("Delivery")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 4d85f30316973..84b075beb062b 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -79,6 +79,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Shipment"), $langs->transnoentities("Shipment")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 5bb216e5f65a3..9b95d2a64b442 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -81,6 +81,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("ExpenseReport"), $langs->transnoentities("ExpenseReport")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 4febb418a1b18..9c38b5ddc1d1b 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -76,6 +76,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 33fce191c0ebf..17b2a50c3a883 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -83,6 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("InterventionCard"), $langs->transnoentities("InterventionCard")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 434b9614985f9..efbf22d4524b9 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -70,6 +70,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Holiday"), $langs->transnoentities("Holiday")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index f5b236d4594a9..6a74713e82d3e 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Evaluation"), $langs->transnoentities("Evaluation")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index fe2948e1ea5ee..9db9ad49e8dad 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -78,6 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Mo"), $langs->transnoentities("Mo")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 4e60a5d8efad0..85395060f6e51 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -80,6 +80,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 03004ad250f16..992d7003bda71 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -94,6 +94,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4c"); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix customers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("ProductCodeModel").'):'; diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 9074500bf2bfa..4f5a8b17726b5 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -82,6 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 20fcb64d38218..03085881f5307 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -82,6 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 6ed05b3e72899..c70e7438c1302 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -87,6 +87,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Project"), $langs->transnoentities("Project")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Prefix settings $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 52b7b9b18d919..fe3efa2e9c6a3 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -82,6 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Task"), $langs->transnoentities("Task")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 91772195411ab..763ac1bc6f456 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -83,6 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Proposal"), $langs->transnoentities("Proposal")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 9acf2cfd161b2..858d3431c9798 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -60,6 +60,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Reception"), $langs->transnoentities("Reception")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index c30145891ed95..14d3a35f00c4a 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -97,13 +97,17 @@ public function info($langs) $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("ThirdParty"), $langs->transnoentities("ThirdParty")); //$tooltip.=$langs->trans("GenericMaskCodes2"); Not required for third party numbering + $tooltip .= $langs->trans("GenericMaskCodes2b").'
    '; + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes4b"); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix customers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipelephantcutomer').''; $texte .= '  '; @@ -111,7 +115,7 @@ public function info($langs) // Parametrage du prefix suppliers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipelephantsupplier').''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index 5860b12034288..29bd57db88cb1 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -78,6 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("StockTransfer"), $langs->transnoentities("StockTransfer")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 7fb38484e213d..9ff6846da7506 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -91,6 +91,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index a53040525481b..8bcebbee4fbb8 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -85,6 +85,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 6790389a32864..c068586dd92ec 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -81,6 +81,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 60b5ec2686c9c..2c0bba621e8fa 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -83,6 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("CommRequest"), $langs->transnoentities("CommRequest")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); $mask = getDolGlobalString('SUPPLIER_PROPOSAL_SAPHIR_MASK'); diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 8eb7c34164355..df4c7662c6b7f 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -78,6 +78,7 @@ public function info($langs) $tooltip .= $langs->trans('GenericMaskCodes3'); $tooltip .= $langs->trans('GenericMaskCodes4a', $langs->transnoentities('CashDesk'), $langs->transnoentities('CashDesk')); $tooltip .= $langs->trans('GenericMaskCodes5'); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); $tooltip .= $langs->trans('CashDeskGenericMaskCodes6'); // Setting up the prefix diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 59f3753785197..5e5c3e1a0af48 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -79,6 +79,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Ticket"), $langs->transnoentities("Ticket")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Prefix settings $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 032083ba64139..11c4feb639797 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -78,6 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Workstation"), $langs->transnoentities("Workstation")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 0c1b043f00637..1df8f57397b02 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -76,6 +76,7 @@ public function info() $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("KnowledgeRecord"), $langs->transnoentities("KnowledgeRecord")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c35990420e466..cff78b4f4a40e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -365,12 +365,14 @@ UpdateServerOffline=Update server offline WithCounter=Manage a counter GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:
    {000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
    {000000+000} same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s.
    {000000@x} same as the previous one but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then the sequence {yy}{mm} or {yyyy}{mm} is also required.
    {dd} day (01 to 31).
    {mm} month (01 to 12).
    {yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
    GenericMaskCodes2={cccc} the client code on n characters
    {cccc000} the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.
    {tttt} The code of third party type on n characters (see menu Home - Setup - Dictionary - Types of third parties). If you add this tag, the counter will be different for each type of third party.
    +GenericMaskCodes2b={uuuu} the n first characters of the lastname of the user that creates the object (n is number of "u"). GenericMaskCodes3=All other characters in the mask will remain intact.
    Spaces are not allowed.
    GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).
    Spaces are not allowed.
    In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.
    GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2023-01-31:
    GenericMaskCodes4b=Example on third party created on 2023-01-31:
    GenericMaskCodes4c=Example on product created on 2023-01-31:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
    IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' +GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
    +GenericMaskCodes5b=IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' GenericNumRefModelDesc=Returns a customizable number according to a defined mask. ServerAvailableOnIPOrPort=Server is available at address %s on port %s ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index 208b4c4a054e3..026d2f7bad69e 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("MyObject"), $langs->transnoentities("MyObject")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index 75596eba9eae4..649225135049d 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Partnership"), $langs->transnoentities("Partnership")); $tooltip .= $langs->trans("GenericMaskCodes5"); + $tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 14bdea789058e..47594425da2b9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1416,6 +1416,8 @@ $tooltip .= '
    '.$langs->trans("GenericMaskCodes3"); $tooltip .= '
    '.$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= '
    '.$langs->trans("GenericMaskCodes5"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); + if ((getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == 'mod_lot_advanced') || (getDolGlobalString('PRODUCTBATCH_SN_ADDON') == 'mod_sn_advanced')) { print ''.$langs->trans("ManageLotMask").''; @@ -2018,6 +2020,8 @@ $tooltip .= '
    '.$langs->trans("GenericMaskCodes3"); $tooltip .= '
    '.$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= '
    '.$langs->trans("GenericMaskCodes5"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); + print ''.$langs->trans("ManageLotMask").''; $mask = ''; if ($object->status_batch == '1' && getDolGlobalString('PRODUCTBATCH_LOT_USE_PRODUCT_MASKS') && getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == 'mod_lot_advanced') { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index c1258703e6cbc..fdc928a2a0f48 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("RecruitmentCandidature"), $langs->transnoentities("RecruitmentCandidature")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index 868b4b284e089..eb5d5454365f0 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -77,6 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition")); $tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= $langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; From 038ce032e03a1b814711ecc4392b090357122d15 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 12:40:24 +0200 Subject: [PATCH 053/127] Fix tooltip on numbering modules --- htdocs/core/modules/asset/mod_asset_advanced.php | 2 +- .../modules/barcode/mod_barcode_product_standard.php | 4 ++-- .../barcode/mod_barcode_thirdparty_standard.php | 4 ++-- htdocs/core/modules/bom/mod_bom_advanced.php | 2 +- .../core/modules/cheque/mod_chequereceipt_thyme.php | 2 +- htdocs/core/modules/commande/mod_commande_saphir.php | 2 +- htdocs/core/modules/contract/mod_contract_magre.php | 2 +- htdocs/core/modules/delivery/mod_delivery_saphir.php | 2 +- .../modules/expedition/mod_expedition_ribera.php | 2 +- .../modules/expensereport/mod_expensereport_sand.php | 2 +- htdocs/core/modules/facture/mod_facture_mercure.php | 12 +++++++----- htdocs/core/modules/fichinter/mod_arctic.php | 2 +- .../core/modules/holiday/mod_holiday_immaculate.php | 2 +- htdocs/core/modules/hrm/mod_evaluation_advanced.php | 2 +- htdocs/core/modules/mrp/mod_mo_advanced.php | 2 +- htdocs/core/modules/payment/mod_payment_ant.php | 2 +- .../modules/product/mod_codeproduct_elephant.php | 2 +- .../core/modules/product_batch/mod_lot_advanced.php | 2 +- .../core/modules/product_batch/mod_sn_advanced.php | 2 +- .../core/modules/project/mod_project_universal.php | 2 +- .../core/modules/project/task/mod_task_universal.php | 2 +- htdocs/core/modules/propale/mod_propale_saphir.php | 2 +- .../modules/reception/mod_reception_moonstone.php | 2 +- .../core/modules/societe/mod_codeclient_elephant.php | 2 +- .../stocktransfer/mod_stocktransfer_advanced.php | 2 +- .../mod_facture_fournisseur_tulip.php | 2 +- .../mod_commande_fournisseur_orchidee.php | 2 +- .../mod_supplier_payment_brodator.php | 2 +- .../mod_supplier_proposal_saphir.php | 2 +- .../modules/takepos/mod_takepos_ref_universal.php | 2 +- htdocs/core/modules/ticket/mod_ticket_universal.php | 2 +- .../modules/workstation/mod_workstation_advanced.php | 2 +- .../mod_knowledgerecord_advanced.php | 2 +- htdocs/langs/en_US/admin.lang | 2 +- .../core/modules/mymodule/mod_myobject_advanced.php | 2 +- .../modules/partnership/mod_partnership_advanced.php | 2 +- .../mod_recruitmentcandidature_advanced.php | 2 +- .../mod_recruitmentjobposition_advanced.php | 2 +- 38 files changed, 46 insertions(+), 44 deletions(-) diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index f63355290169a..140ef0ae31d07 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -76,7 +76,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Asset"), $langs->transnoentities("Asset")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 49103a4f3c02a..92bb510c10783 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -89,8 +89,8 @@ public function info($langs) $tooltip .= '04{0000000000}? (for internal use)
    '; $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; - //$tooltip.=$langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= $langs->trans("GenericMaskCodes5"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Mask parameter //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php index 883c6114f7f25..bcaeeea69a574 100644 --- a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -102,8 +102,8 @@ public function info($langs) $tooltip .= '04{0000000000}? (for internal use)
    '; $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; - //$tooltip.=$langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip . =$langs->trans("GenericMaskCodes5"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Mask parameter //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index b678053cb3090..999c7a1f32ea7 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Bom"), $langs->transnoentities("Bom")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index a2067fbb44767..6cfa49cdf1b89 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -71,7 +71,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("CheckReceiptShort"), $langs->transnoentities("CheckReceiptShort")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 300a282eb2c06..6686e15dcbb8a 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 7f24fa120cea3..17cf0105d8d89 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -70,7 +70,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Contract"), $langs->transnoentities("Contract")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index 64e25c5439bdd..dc1cfa3c86e41 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -82,7 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Delivery"), $langs->transnoentities("Delivery")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 84b075beb062b..37e16543d1fbe 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -79,7 +79,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Shipment"), $langs->transnoentities("Shipment")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 9b95d2a64b442..281b288d55e6c 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -81,7 +81,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("ExpenseReport"), $langs->transnoentities("ExpenseReport")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 9c38b5ddc1d1b..d2c05c882bb24 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -73,14 +73,16 @@ public function info($langs) $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipstandardmercure').''; $texte .= '  '; @@ -88,17 +90,17 @@ public function info($langs) // Prefix setting of replacement invoices $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipreplacementmercure').''; $texte .= ''; // Prefix setting of credit note $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipcreditnotemercure').''; $texte .= ''; // Prefix setting of deposit $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipdownpaymentmercure').''; $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 17b2a50c3a883..138a4af4b96b3 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -83,7 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("InterventionCard"), $langs->transnoentities("InterventionCard")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index efbf22d4524b9..61107701b2c43 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -70,7 +70,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Holiday"), $langs->transnoentities("Holiday")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 6a74713e82d3e..ac0f8241694e9 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Evaluation"), $langs->transnoentities("Evaluation")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 9db9ad49e8dad..0245e393539ba 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -78,7 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Mo"), $langs->transnoentities("Mo")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 85395060f6e51..7f158d53f041a 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -80,7 +80,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 992d7003bda71..308be664dcf01 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -94,7 +94,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4c"); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix customers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("ProductCodeModel").'):'; diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 4f5a8b17726b5..4f06a6b194d54 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -82,7 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 03085881f5307..c3d6f37172004 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -82,7 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index c70e7438c1302..ce2a7f508486a 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -87,7 +87,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Project"), $langs->transnoentities("Project")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Prefix settings $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index fe3efa2e9c6a3..a7d5e720cbeaf 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -82,7 +82,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Task"), $langs->transnoentities("Task")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 763ac1bc6f456..804b7791fc517 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -83,7 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Proposal"), $langs->transnoentities("Proposal")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 858d3431c9798..dd8d629ce2aaa 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -60,7 +60,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Reception"), $langs->transnoentities("Reception")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 14d3a35f00c4a..4ff1391481f06 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -103,7 +103,7 @@ public function info($langs) $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes4b"); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix customers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'; diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index 29bd57db88cb1..cb77d500fdda0 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -78,7 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("StockTransfer"), $langs->transnoentities("StockTransfer")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 9ff6846da7506..f583604cb0bd8 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -91,7 +91,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 8bcebbee4fbb8..f11a9c86bc814 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -85,7 +85,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index c068586dd92ec..2e51d083d6883 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -81,7 +81,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 2c0bba621e8fa..35ae2f71196ff 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -83,7 +83,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("CommRequest"), $langs->transnoentities("CommRequest")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $mask = getDolGlobalString('SUPPLIER_PROPOSAL_SAPHIR_MASK'); diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index df4c7662c6b7f..3f8d538e57395 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -78,7 +78,7 @@ public function info($langs) $tooltip .= $langs->trans('GenericMaskCodes3'); $tooltip .= $langs->trans('GenericMaskCodes4a', $langs->transnoentities('CashDesk'), $langs->transnoentities('CashDesk')); $tooltip .= $langs->trans('GenericMaskCodes5'); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); $tooltip .= $langs->trans('CashDeskGenericMaskCodes6'); // Setting up the prefix diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 5e5c3e1a0af48..3ba3844bb7224 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -79,7 +79,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Ticket"), $langs->transnoentities("Ticket")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Prefix settings $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 11c4feb639797..6c2297648d760 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -78,7 +78,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Workstation"), $langs->transnoentities("Workstation")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 1df8f57397b02..9592773d28e68 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -76,7 +76,7 @@ public function info() $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("KnowledgeRecord"), $langs->transnoentities("KnowledgeRecord")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index cff78b4f4a40e..5dd6b52950e60 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -371,7 +371,7 @@ GenericMaskCodes3EAN=All other characters in the mask will remain intact (except GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2023-01-31:
    GenericMaskCodes4b=Example on third party created on 2023-01-31:
    GenericMaskCodes4c=Example on product created on 2023-01-31:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
    +GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX GenericMaskCodes5b=IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' GenericNumRefModelDesc=Returns a customizable number according to a defined mask. ServerAvailableOnIPOrPort=Server is available at address %s on port %s diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index 026d2f7bad69e..1cef8d13f0485 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("MyObject"), $langs->transnoentities("MyObject")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index 649225135049d..a9bbe5702576f 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Partnership"), $langs->transnoentities("Partnership")); $tooltip .= $langs->trans("GenericMaskCodes5"); - $tooltip .= $langs->trans("GenericMaskCodes5b"); + $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $text .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index fdc928a2a0f48..f479e36509b3b 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("RecruitmentCandidature"), $langs->transnoentities("RecruitmentCandidature")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index eb5d5454365f0..4060d60f5ea7c 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -77,7 +77,7 @@ public function info($langs) $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition")); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= $langs->trans("GenericMaskCodes5b"); + //$tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; From 2f7a252244e3428d74723ea872d1e9ab51fd7eba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 13:09:10 +0200 Subject: [PATCH 054/127] Fix warnings --- .../core/modules/asset/mod_asset_advanced.php | 8 +++--- htdocs/core/modules/bom/mod_bom_advanced.php | 10 +++---- .../cheque/mod_chequereceipt_thyme.php | 6 ++-- .../modules/commande/mod_commande_saphir.php | 10 +++---- .../modules/contract/mod_contract_magre.php | 6 ++-- .../modules/delivery/mod_delivery_saphir.php | 16 +++++------ .../expedition/mod_expedition_ribera.php | 10 +++---- .../expensereport/mod_expensereport_jade.php | 4 +-- .../expensereport/mod_expensereport_sand.php | 14 +++++----- .../modules/facture/mod_facture_mercure.php | 28 ++++++++++--------- htdocs/core/modules/fichinter/mod_arctic.php | 12 ++++---- .../holiday/mod_holiday_immaculate.php | 10 +++---- .../modules/hrm/mod_evaluation_advanced.php | 8 +++--- htdocs/core/modules/mrp/mod_mo_advanced.php | 10 +++---- .../core/modules/payment/mod_payment_ant.php | 6 ++-- .../product_batch/mod_lot_advanced.php | 10 +++---- .../modules/product_batch/mod_sn_advanced.php | 6 ++-- .../modules/project/mod_project_universal.php | 6 ++-- .../project/task/mod_task_universal.php | 2 +- .../modules/propale/mod_propale_saphir.php | 6 ++-- .../reception/mod_reception_moonstone.php | 2 +- .../mod_facture_fournisseur_tulip.php | 20 +++++++------ .../mod_commande_fournisseur_orchidee.php | 6 ++-- .../mod_supplier_payment_brodator.php | 2 +- .../mod_supplier_proposal_saphir.php | 2 +- .../takepos/mod_takepos_ref_universal.php | 8 +++--- .../modules/ticket/mod_ticket_universal.php | 6 ++-- .../workstation/mod_workstation_advanced.php | 4 +-- .../mod_knowledgerecord_advanced.php | 10 +++---- .../mymodule/mod_myobject_advanced.php | 6 ++-- .../mod_recruitmentcandidature_advanced.php | 8 +++--- .../mod_recruitmentjobposition_advanced.php | 10 +++---- .../variants/class/ProductAttribute.class.php | 6 ++-- .../class/ProductCombination.class.php | 6 ++-- .../ProductCombination2ValuePair.class.php | 8 +++--- 35 files changed, 148 insertions(+), 144 deletions(-) diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 140ef0ae31d07..d46c406a56fde 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -99,7 +99,7 @@ public function info($langs) */ public function getExample() { - global $conf, $db, $langs, $mysoc; + global $db, $langs; $object = new Asset($db); $object->initAsSpecimen(); @@ -115,12 +115,12 @@ public function getExample() /** * Return next free value * - * @param Asset $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Asset $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 999c7a1f32ea7..5334f0bd1992e 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -100,7 +100,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -119,13 +119,13 @@ public function getExample() /** * Return next free value * - * @param Product $objprod Object product - * @param Bom $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Product $objprod Object product + * @param Bom $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objprod, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 6cfa49cdf1b89..03470192a5aa7 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -94,7 +94,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; @@ -112,11 +112,11 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param RemiseCheque $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 6686e15dcbb8a..9a4506b3e4361 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -100,7 +100,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -119,13 +119,13 @@ public function getExample() /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Commande $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Commande $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 17cf0105d8d89..f04d0e8397be4 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -105,9 +105,9 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc third party object - * @param Contrat $contract contract object - * @return string|0 Next value if OK, 0 if KO + * @param Societe $objsoc third party object + * @param Contrat $contract contract object + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc, $contract) { diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index dc1cfa3c86e41..53ecd51107980 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -105,7 +105,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; @@ -122,13 +122,13 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party - * @param Delivery $object Object delivery - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Delivery $object Object delivery + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -149,9 +149,9 @@ public function getNextValue($objsoc, $object) /** * Return next free value * - * @param Societe $objsoc Object third party - * @param Delivery $objforref Object for number to search - * @return string|0 Next free value, 0 if KO + * @param Societe $objsoc Object third party + * @param Delivery $objforref Object for number to search + * @return string|int<0> Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref) diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 37e16543d1fbe..366de6cbd4ed7 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -98,7 +98,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -117,13 +117,13 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Third party object - * @param Expedition $shipment Shipment object - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Third party object + * @param Expedition $shipment Shipment object + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $shipment) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 63938b77da209..67da92d8cd56a 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -120,8 +120,8 @@ public function canBeActivated($object) /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Object $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 281b288d55e6c..686e4cc992530 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -63,7 +63,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport */ public function info($langs) { - global $db, $conf, $langs; + global $db, $langs; $langs->load("bills"); @@ -74,7 +74,7 @@ public function info($langs) $texte .= ''; $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= '
    '; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("ExpenseReport"), $langs->transnoentities("ExpenseReport")); //$tooltip.=$langs->trans("GenericMaskCodes2"); @@ -85,7 +85,7 @@ public function info($langs) // Parametrage du prefix $texte .= ''; - $mask = !getDolGlobalString('EXPENSEREPORT_SAND_MASK') ? '' : $conf->global->EXPENSEREPORT_SAND_MASK; + $mask = getDolGlobalString('EXPENSEREPORT_SAND_MASK'); $texte .= ''; $texte .= ''; @@ -105,7 +105,7 @@ public function info($langs) */ public function getExample() { - global $db, $conf, $langs, $user; + global $db, $langs, $user; $exp = new ExpenseReport($db); $exp->initAsSpecimen(); @@ -123,16 +123,16 @@ public function getExample() * Return next free value * * @param ExpenseReport $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = !getDolGlobalString('EXPENSEREPORT_SAND_MASK') ? '' : $conf->global->EXPENSEREPORT_SAND_MASK; + $mask = getDolGlobalString('EXPENSEREPORT_SAND_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index d2c05c882bb24..887fe998a0105 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -88,16 +88,18 @@ public function info($langs) $texte .= ''; - // Prefix setting of replacement invoices - $texte .= ''; - $texte .= ''; - $texte .= ''; - // Prefix setting of credit note $texte .= ''; $texte .= ''; $texte .= ''; + // Prefix setting of replacement invoices + if (!getDolGlobalString('INVOICE_DISABLE_REPLACEMENT')) { + $texte .= ''; + $texte .= ''; + $texte .= ''; + } + // Prefix setting of deposit $texte .= ''; $texte .= ''; @@ -135,10 +137,10 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { @@ -180,10 +182,10 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') /** * Return next free value * - * @param Societe $objsoc Object third party - * @param Facture $objforref Object for number to search - * @param string $mode 'next' for next value or 'last' for last value - * @return string|0 Next free value, 0 if KO + * @param Societe $objsoc Object third party + * @param Facture $objforref Object for number to search + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<0> Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref, $mode = 'next') diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 138a4af4b96b3..6b0f7eaf55fa3 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -106,7 +106,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; @@ -124,11 +124,11 @@ public function getExample() * * @param Societe|string $objsoc Object thirdparty * @param Fichinter|string $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc = '', $object = '') { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -152,9 +152,9 @@ public function getNextValue($objsoc = '', $object = '') /** * Return next free value * - * @param Societe $objsoc Object third party - * @param Fichinter $objforref Object for number to search - * @return string|0 Next free value, 0 if KO + * @param Societe $objsoc Object third party + * @param Fichinter $objforref Object for number to search + * @return string|int<0> Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 61107701b2c43..933235ead4d57 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -89,7 +89,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $user; + global $langs, $user; $old_login = $user->login; $user->login = 'UUUUUUU'; @@ -105,13 +105,13 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc third party object - * @param Holiday $holiday holiday object - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc third party object + * @param Holiday $holiday holiday object + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $holiday) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index ac0f8241694e9..1bed414edeb1e 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -100,7 +100,7 @@ public function info($langs) */ public function getExample() { - global $conf, $db, $langs, $mysoc; + global $db, $langs; $object = new Evaluation($db); $object->initAsSpecimen(); @@ -124,12 +124,12 @@ public function getExample() /** * Return next free value * - * @param Evaluation $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @param Evaluation $object Object we need next value for + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 0245e393539ba..4ebefd326b962 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -101,7 +101,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -120,13 +120,13 @@ public function getExample() /** * Return next free value * - * @param Product $objprod Object product - * @param Mo $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @param Product $objprod Object product + * @param Mo $object Object we need next value for + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objprod, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 7f158d53f041a..da2b8878c48e2 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -119,9 +119,9 @@ public function getExample() /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 4f06a6b194d54..b53a838101ca6 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -115,7 +115,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -134,13 +134,13 @@ public function getExample() /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index c3d6f37172004..dceaa9b82ca67 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -134,9 +134,9 @@ public function getExample() /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index ce2a7f508486a..a6aeffffb6731 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -126,9 +126,9 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party - * @param Project $project Object project - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $project) { diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index a7d5e720cbeaf..1695c7b79b8dc 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -123,7 +123,7 @@ public function getExample() * * @param Societe|string $objsoc Object third party * @param Task|string $object Object task - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc = '', $object = '') { diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 804b7791fc517..57db1f1b9a020 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -126,9 +126,9 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party - * @param Propal $propal Object commercial proposal - * @return string|0 Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Propal $propal Object commercial proposal + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $propal) { diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index dd8d629ce2aaa..ec4c15a94760e 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -100,7 +100,7 @@ public function getExample() * * @param Societe $objsoc Third party object * @param Reception|null $reception Reception object - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $reception) { diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index f583604cb0bd8..b03d4c9883364 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -88,7 +88,9 @@ public function info($langs) $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); @@ -96,7 +98,7 @@ public function info($langs) // Setting the prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -104,19 +106,19 @@ public function info($langs) // Prefix setting of credit note $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; - if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - // Parametrage du prefix des replacement + if (!getDolGlobalString('INVOICE_DISABLE_REPLACEMENT') && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { + // Prefix setting of replacement $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; } // Prefix setting of deposit $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipreplacementmercure').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipcreditnotemercure').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipreplacementmercure').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipdownpaymentmercure').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte .= ':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipstandardtulip').' 
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipcredittuplie').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipreplacementtulip').'
    '.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipdownpaymenttulip').'
    '; @@ -132,7 +134,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; @@ -151,11 +153,11 @@ public function getExample() * @param Societe $objsoc Object third party * @param FactureFournisseur $object Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object, $mode = 'next') { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index f11a9c86bc814..9e07ec2d8f0a3 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -82,14 +82,16 @@ public function info($langs) $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= '
    '; $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Order"), $langs->transnoentities("Order")); $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
    '.$langs->trans("GenericMaskCodes5b"); // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltiporchidee').''; $texte .= '  '; @@ -126,7 +128,7 @@ public function getExample() * * @param Societe|string $objsoc Object third party * @param CommandeFournisseur $object Object - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 2e51d083d6883..1fe4cec27cbe5 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -122,7 +122,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param PaiementFourn $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 35ae2f71196ff..38e151fe66a6f 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -126,7 +126,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param SupplierProposal $supplier_proposal Object commercial proposal - * @return string|0 Value if OK, 0 if KO + * @return string|int<0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $supplier_proposal) { diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 3f8d538e57395..4562061661967 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -118,10 +118,10 @@ public function getExample() /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|0 Next value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 3ba3844bb7224..22d11c820fc95 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -118,9 +118,9 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party - * @param Ticket $ticket Object ticket - * @return string|0 Next value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Ticket $ticket Object ticket + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($objsoc, $ticket) { diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 6c2297648d760..befba9448db30 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -125,8 +125,8 @@ public function getExample() /** * Return next free value * - * @param Workstation $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Workstation $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 9592773d28e68..a284c55fbfe2e 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -58,7 +58,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord */ public function info() { - global $conf, $langs, $db; + global $langs, $db; $langs->load("bills"); @@ -99,7 +99,7 @@ public function info() */ public function getExample() { - global $conf, $db, $langs, $mysoc; + global $db, $langs; $object = new KnowledgeRecord($db); $object->initAsSpecimen(); @@ -123,12 +123,12 @@ public function getExample() /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Object $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index 1cef8d13f0485..c78c5e5052080 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -98,7 +98,7 @@ public function info($langs) */ public function getExample() { - global $conf, $db, $langs, $mysoc; + global $db, $langs; $object = new MyObject($db); $object->initAsSpecimen(); @@ -122,8 +122,8 @@ public function getExample() /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Object $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index f479e36509b3b..b6c275b4b98c1 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -59,7 +59,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida */ public function info($langs) { - global $conf, $db; + global $db; $langs->load("bills"); @@ -100,7 +100,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -120,11 +120,11 @@ public function getExample() * Return next free value * * @param RecruitmentCandidature $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index 4060d60f5ea7c..529fbbee73fa3 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -59,7 +59,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi */ public function info($langs) { - global $conf, $db; + global $db; $langs->load("bills"); @@ -100,7 +100,7 @@ public function info($langs) */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; @@ -119,12 +119,12 @@ public function getExample() /** * Return next free value * - * @param RecruitmentJobPosition $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param RecruitmentJobPosition $object Object we need next value for + * @return string|int<0> Next value if OK, 0 if KO */ public function getNextValue($object) { - global $db, $conf; + global $db; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 4973e72efcf38..9eefa0fd646b6 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -370,8 +370,8 @@ public function fetchAll() * Updates a product attribute * * @param User $user User who updates the attribute - * @param 0|1 $notrigger 1 = Do not execute trigger (0 by default) - * @return int|1 <0 if KO, 1 if OK + * @param int<0|1> $notrigger 1 = Do not execute trigger (0 by default) + * @return int <0 if KO, 1 if OK */ public function update(User $user, $notrigger = 0) { @@ -832,7 +832,7 @@ public function countChildProducts() /** * Test if this attribute is used by a Product * - * @return -1|0|1 Return -1 if KO, 0 if not used, 1 if used + * @return int Return -1 if KO, 0 if not used, 1 if used */ public function isUsed() { diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 868d8ff6566c1..56f30d8f3b2a5 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -129,13 +129,11 @@ public function __construct(DoliDB $db) /** * Retrieves a ProductCombination by its rowid * - * @param int $rowid ID of the ProductCombination - * @return -1|1 -1 if KO, 1 if OK + * @param int $rowid ID of the ProductCombination + * @return int<-1,1> -1 if KO, 1 if OK */ public function fetch($rowid) { - global $conf; - $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight, variation_ref_ext FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE rowid = ".((int) $rowid)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); diff --git a/htdocs/variants/class/ProductCombination2ValuePair.class.php b/htdocs/variants/class/ProductCombination2ValuePair.class.php index 854c8b6ce8096..2d7b7c6731445 100644 --- a/htdocs/variants/class/ProductCombination2ValuePair.class.php +++ b/htdocs/variants/class/ProductCombination2ValuePair.class.php @@ -117,8 +117,8 @@ public function __toString() /** * Create a ProductCombination2ValuePair * - * @param User $user User that creates //not used - * @return -1|1 1 if OK, -1 if KO + * @param User $user User that creates //not used + * @return int<-1,1> 1 if OK, -1 if KO */ public function create($user) { @@ -179,8 +179,8 @@ public function fetchByFkCombination($fk_combination) /** * Delete all ProductCombination2ValuePair linked to a given ProductCombination ID. * - * @param int $fk_combination ID of the ProductCombination - * @return -1|1 -1 if KO, 1 if OK + * @param int $fk_combination ID of the ProductCombination + * @return int<-1|1> -1 if KO, 1 if OK */ public function deleteByFkCombination($fk_combination) { From 04d213e67629f610149aee7d8fd7e76900c2958c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 13:24:23 +0200 Subject: [PATCH 055/127] Doxygen --- htdocs/core/class/evalmath.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index b352d1b3737f1..943f252979ad5 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -1,6 +1,5 @@ @@ -500,7 +499,7 @@ public function push($val) /** * pop * - * @return mixed Stack + * @return mixed|null Stack element */ public function pop() { From e5609f46170094c828b11f190e52306a093b77c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 13:44:48 +0200 Subject: [PATCH 056/127] Fix phpstan --- htdocs/core/class/fileupload.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 686bc3566d0af..77a08bdb1d519 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -20,7 +20,7 @@ * \file htdocs/core/class/fileupload.class.php * \brief File to return the ajax response of core/ajax/fileupload.php for common file upload. * Security is check by the ajax component. - * For large files, see flowjs-server.php + * For large files upload, see flowjs-server.php */ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -156,9 +156,8 @@ public function __construct($options = null, $fk_element = null, $element = null $this->options = array_replace_recursive($this->options, $options); } - // At this point we should have a valid upload_dir in options - //if ($pathname === null && $filename === null) { // OR or AND??? - if ($pathname === null || $filename === null) { + // At this point we should have a valid upload_dir in this->options + if (empty($pathname) || empty($filename)) { if (!array_key_exists("upload_dir", $this->options)) { setEventMessage('If $fk_element = null or $element = null you must specify upload_dir on $options', 'errors'); throw new Exception('If $fk_element = null or $element = null you must specify upload_dir on $options'); From 700edf87681dc6aa161c127452b8a19f53165cec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 14:19:08 +0200 Subject: [PATCH 057/127] Fix warnings --- htdocs/core/class/interfaces.class.php | 2 +- .../connectors/php/connector.lib.php | 16 ++++++++++------ phpstan.neon.dist | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 4bc69ddc7e6ed..c823fde9c2e61 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -65,7 +65,7 @@ public function __construct($db) * This function call all qualified triggers. * * @param string $action Trigger event code - * @param object $object Object concerned. Some context information may also be provided into array property object->context. + * @param Object $object Object concerned. Some context information may also be provided into array property object->context. * @param User $user Object user * @param Translate $langs Object lang * @param Conf $conf Object conf diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php index 4e9f8d009ed4a..ca9e2192f79a1 100644 --- a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php +++ b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php @@ -391,10 +391,14 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') dol_syslog("connector.lib.php IsImageValid is ko"); @unlink($sFilePath); $sErrorNumber = '202'; - } elseif (isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true) { - dol_syslog("connector.lib.php DetectHtml is ko"); - @unlink($sFilePath); - $sErrorNumber = '202'; + } else { + $detectHtml = DetectHtml($sFilePath); + if ($detectHtml === true || $detectHtml == -1) { + // Note that is is a simple test and not reliable. Security does not rely on this. + dol_syslog("connector.lib.php DetectHtml is ko"); + @unlink($sFilePath); + $sErrorNumber = '202'; + } } } } else { @@ -951,8 +955,8 @@ function IsHtmlExtension($ext, $formExtensions) * Detect HTML in the first KB to prevent against potential security issue with * IE/Safari/Opera file type auto detection bug. * - * @param string $filePath absolute path to file - * @return bool|-1 Returns true if the file contains insecure HTML code at the beginning, or -1 if error + * @param string $filePath Absolute path to file + * @return bool|-1 Returns true if the file contains insecure HTML code at the beginning or false, or -1 if error */ function DetectHtml($filePath) { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9398753ea341f..57acb162457cc 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -51,9 +51,12 @@ parameters: - '#Function llxHeaderVierge invoked with#' - '#always exists and is not falsy#' - '#always exists and is not nullable#' + - '#Call to function is_resource() with#' - '#is always fal#' - '#is always true#' + - '#is_object() with mixed will always evaluate to false#' - '#Empty array passed to foreach#' + - '#in empty() is not falsy#' - '#in isset\(\) is not nullable#' - '#(\$force_dolibarr_lib|\$dolibarr_main_db).*in empty\(\) is never defined.#' - '#Sprain\\SwissQrBill\\#' From 32d3424423569a66e4c21986b1fbec0b12c6d82d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 14:29:42 +0200 Subject: [PATCH 058/127] Fix warning --- htdocs/variants/class/ProductAttribute.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 9eefa0fd646b6..eebf1255699d1 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -370,7 +370,7 @@ public function fetchAll() * Updates a product attribute * * @param User $user User who updates the attribute - * @param int<0|1> $notrigger 1 = Do not execute trigger (0 by default) + * @param int $notrigger 1 = Do not execute trigger (0 by default) * @return int <0 if KO, 1 if OK */ public function update(User $user, $notrigger = 0) From 09eaf38bd15ad5f43e620ef44de0be785c47b86c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 14:31:29 +0200 Subject: [PATCH 059/127] Fix phpstan --- htdocs/core/modules/asset/mod_asset_advanced.php | 2 +- htdocs/core/modules/bom/mod_bom_advanced.php | 2 +- htdocs/core/modules/cheque/mod_chequereceipt_thyme.php | 2 +- htdocs/core/modules/commande/mod_commande_saphir.php | 2 +- htdocs/core/modules/contract/mod_contract_magre.php | 2 +- htdocs/core/modules/delivery/mod_delivery_saphir.php | 4 ++-- htdocs/core/modules/expedition/mod_expedition_ribera.php | 2 +- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 2 +- htdocs/core/modules/expensereport/mod_expensereport_sand.php | 2 +- htdocs/core/modules/facture/mod_facture_mercure.php | 4 ++-- htdocs/core/modules/fichinter/mod_arctic.php | 4 ++-- htdocs/core/modules/holiday/mod_holiday_immaculate.php | 2 +- htdocs/core/modules/hrm/mod_evaluation_advanced.php | 2 +- htdocs/core/modules/mrp/mod_mo_advanced.php | 2 +- htdocs/core/modules/payment/mod_payment_ant.php | 2 +- htdocs/core/modules/product_batch/mod_lot_advanced.php | 2 +- htdocs/core/modules/product_batch/mod_sn_advanced.php | 2 +- htdocs/core/modules/project/mod_project_universal.php | 2 +- htdocs/core/modules/project/task/mod_task_universal.php | 2 +- htdocs/core/modules/propale/mod_propale_saphir.php | 2 +- htdocs/core/modules/reception/mod_reception_moonstone.php | 2 +- .../supplier_invoice/mod_facture_fournisseur_tulip.php | 2 +- .../supplier_order/mod_commande_fournisseur_orchidee.php | 2 +- .../supplier_payment/mod_supplier_payment_brodator.php | 2 +- .../supplier_proposal/mod_supplier_proposal_saphir.php | 2 +- htdocs/core/modules/takepos/mod_takepos_ref_universal.php | 2 +- htdocs/core/modules/ticket/mod_ticket_universal.php | 2 +- htdocs/core/modules/workstation/mod_workstation_advanced.php | 2 +- .../knowledgemanagement/mod_knowledgerecord_advanced.php | 2 +- .../template/core/modules/mymodule/mod_myobject_advanced.php | 2 +- .../recruitment/mod_recruitmentcandidature_advanced.php | 2 +- .../recruitment/mod_recruitmentjobposition_advanced.php | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index d46c406a56fde..3ade2990b5adc 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -116,7 +116,7 @@ public function getExample() * Return next free value * * @param Asset $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 5334f0bd1992e..9841954ce104c 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -121,7 +121,7 @@ public function getExample() * * @param Product $objprod Object product * @param Bom $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objprod, $object) { diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 03470192a5aa7..9b97481dcba1e 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -112,7 +112,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param RemiseCheque $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 9a4506b3e4361..21b4731284a82 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -121,7 +121,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param Commande $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index f04d0e8397be4..7e7f50b3d466a 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -107,7 +107,7 @@ public function getExample() * * @param Societe $objsoc third party object * @param Contrat $contract contract object - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc, $contract) { diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index 53ecd51107980..886f0a2ffd5f2 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -124,7 +124,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param Delivery $object Object delivery - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { @@ -151,7 +151,7 @@ public function getNextValue($objsoc, $object) * * @param Societe $objsoc Object third party * @param Delivery $objforref Object for number to search - * @return string|int<0> Next free value, 0 if KO + * @return string|int Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref) diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 366de6cbd4ed7..7874672bb8275 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -119,7 +119,7 @@ public function getExample() * * @param Societe $objsoc Third party object * @param Expedition $shipment Shipment object - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $shipment) { diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 67da92d8cd56a..9d37593fc1adf 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -121,7 +121,7 @@ public function canBeActivated($object) * Return next free value * * @param Object $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 686e4cc992530..dcdb17f776303 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -123,7 +123,7 @@ public function getExample() * Return next free value * * @param ExpenseReport $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 887fe998a0105..a3607cac7a0d3 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -140,7 +140,7 @@ public function getExample() * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { @@ -185,7 +185,7 @@ public function getNextValue($objsoc, $invoice, $mode = 'next') * @param Societe $objsoc Object third party * @param Facture $objforref Object for number to search * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<0> Next free value, 0 if KO + * @return string|int Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref, $mode = 'next') diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 6b0f7eaf55fa3..285a465cc1e8c 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -124,7 +124,7 @@ public function getExample() * * @param Societe|string $objsoc Object thirdparty * @param Fichinter|string $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc = '', $object = '') { @@ -154,7 +154,7 @@ public function getNextValue($objsoc = '', $object = '') * * @param Societe $objsoc Object third party * @param Fichinter $objforref Object for number to search - * @return string|int<0> Next free value, 0 if KO + * @return string|int Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 933235ead4d57..030d0285057f5 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -107,7 +107,7 @@ public function getExample() * * @param Societe $objsoc third party object * @param Holiday $holiday holiday object - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $holiday) { diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 1bed414edeb1e..79bc43b248048 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -125,7 +125,7 @@ public function getExample() * Return next free value * * @param Evaluation $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 4ebefd326b962..aab9fe455d2dd 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -122,7 +122,7 @@ public function getExample() * * @param Product $objprod Object product * @param Mo $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objprod, $object) { diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index da2b8878c48e2..68a544ec8f120 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -121,7 +121,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param Object $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index b53a838101ca6..c910326b2da00 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -136,7 +136,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param Productlot $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index dceaa9b82ca67..4662dd8c0e21a 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -136,7 +136,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param Productlot $object Object we need next value for - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index a6aeffffb6731..4b1194eab16c1 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -128,7 +128,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param Project $project Object project - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $project) { diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 1695c7b79b8dc..33f1ee5ac7dfd 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -123,7 +123,7 @@ public function getExample() * * @param Societe|string $objsoc Object third party * @param Task|string $object Object task - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc = '', $object = '') { diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 57db1f1b9a020..055f3f3d3a251 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -128,7 +128,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param Propal $propal Object commercial proposal - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $propal) { diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index ec4c15a94760e..98ff78d3bf5dd 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -100,7 +100,7 @@ public function getExample() * * @param Societe $objsoc Third party object * @param Reception|null $reception Reception object - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $reception) { diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index b03d4c9883364..7f10f50c0f370 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -153,7 +153,7 @@ public function getExample() * @param Societe $objsoc Object third party * @param FactureFournisseur $object Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object, $mode = 'next') { diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 9e07ec2d8f0a3..8e8c32036b90e 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -128,7 +128,7 @@ public function getExample() * * @param Societe|string $objsoc Object third party * @param CommandeFournisseur $object Object - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 1fe4cec27cbe5..268a87a84bf45 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -122,7 +122,7 @@ public function getExample() * * @param Societe $objsoc Object thirdparty * @param PaiementFourn $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 38e151fe66a6f..3c06e708c5ac8 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -126,7 +126,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param SupplierProposal $supplier_proposal Object commercial proposal - * @return string|int<0> Value if OK, 0 if KO + * @return string|int Value if OK, 0 if KO */ public function getNextValue($objsoc, $supplier_proposal) { diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 4562061661967..e11fa61a3b0ec 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -121,7 +121,7 @@ public function getExample() * @param Societe $objsoc Object thirdparty * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 22d11c820fc95..ed0fa330b0ab6 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -120,7 +120,7 @@ public function getExample() * * @param Societe $objsoc Object third party * @param Ticket $ticket Object ticket - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($objsoc, $ticket) { diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index befba9448db30..dad2c124224c3 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -126,7 +126,7 @@ public function getExample() * Return next free value * * @param Workstation $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index a284c55fbfe2e..69643ad82df58 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -124,7 +124,7 @@ public function getExample() * Return next free value * * @param Object $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index c78c5e5052080..0bb97089a9d88 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -123,7 +123,7 @@ public function getExample() * Return next free value * * @param Object $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index b6c275b4b98c1..ed96d1bfc41db 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -120,7 +120,7 @@ public function getExample() * Return next free value * * @param RecruitmentCandidature $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index 529fbbee73fa3..695ce365088ee 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -120,7 +120,7 @@ public function getExample() * Return next free value * * @param RecruitmentJobPosition $object Object we need next value for - * @return string|int<0> Next value if OK, 0 if KO + * @return string|int Next value if OK, 0 if KO */ public function getNextValue($object) { From 84dff519b6cad5dec487211af92c57da23853cc9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 31 Jul 2024 15:29:02 +0200 Subject: [PATCH 060/127] FIX possibility to add an internal contact (#30498) * FIX possibility to add an internal contact * FIX doc --- .../comm/propal/class/api_proposals.class.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 2749800b0dd3f..6d033f78eeb00 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -579,16 +579,17 @@ public function deleteLine($id, $lineid) * Add a contact type of given commercial proposal * * @param int $id Id of commercial proposal to update - * @param int $contactid Id of contact to add - * @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER) + * @param int $contactid Id of external or internal contact to add + * @param string $type Type of the external contact (BILLING, SHIPPING, CUSTOMER), internal contact (SALESREPFOLL) + * @param string $source Source of the contact (internal, external) * @return array * - * @url POST {id}/contact/{contactid}/{type} + * @url POST {id}/contact/{contactid}/{type}/{source} * * @throws RestException 401 * @throws RestException 404 */ - public function postContact($id, $contactid, $type) + public function postContact($id, $contactid, $type, $source = 'external') { if (!DolibarrApiAccess::$user->hasRight('propal', 'creer')) { throw new RestException(403); @@ -600,15 +601,23 @@ public function postContact($id, $contactid, $type) throw new RestException(404, 'Proposal not found'); } - if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) { - throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER'); + if (!in_array($source, array('internal', 'external'), true)) { + throw new RestException(500, 'Availables sources: internal OR external'); + } + + if ($source == 'external' && !in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) { + throw new RestException(500, 'Availables external types: BILLING, SHIPPING OR CUSTOMER'); + } + + if ($source == 'internal' && !in_array($type, array('SALESREPFOLL'), true)) { + throw new RestException(500, 'Availables internal types: SALESREPFOLL'); } if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->propal->add_contact($contactid, $type, 'external'); + $result = $this->propal->add_contact($contactid, $type, $source); if (!$result) { throw new RestException(500, 'Error when added the contact'); From 2c7dc2f28f08a99e1d06a9f96a50fc0e3949e41e Mon Sep 17 00:00:00 2001 From: Sylvain Legrand Date: Wed, 31 Jul 2024 15:32:07 +0200 Subject: [PATCH 061/127] NEW option: assign default roles to "individual" third-party contacts (#30499) * New option: assign default roles to "individual" third-party contacts When the option to automatically create a contact for third parties of the "Individuals" type is active (THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION). Allow to define the default roles assigned to these contacts. Process: 1 Selection of default roles in the settings (and saving) 2 Creation of a third party of the "Individuals" type and therefore of its associated contact. 3 The contact thus created is automatically assigned the predefined roles. * Update societe.php * Update societe.php --- htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 + htdocs/societe/admin/societe.php | 34 ++++++++++++++++++++++++++ htdocs/societe/class/societe.class.php | 1 + 4 files changed, 37 insertions(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index dc2d0d980ea21..3ad8a4e457371 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2540,3 +2540,4 @@ MainAuthenticationOidcLoginClaimDesc=OpenID Connect claim matching the Dolibarr BlackListWords=Black list of words AddBlackList=Add to black list AnOwnerMustBeSetIfEmailTemplateIsPrivate=An owner must be set if the email template is set as private +ContactsDefaultRoles=For third parties of the "individual" type, a contact can be created simultaneously. Define here the roles that will be systematically assigned to this contact. diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index a1aa4b035c544..6b5b1e28c2888 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2507,3 +2507,4 @@ SendToUrl=Envoyer à l'URL WebsiteTemplateWasCopied=Le(s) modèle(s) de site Web "%s" fournis par ce module ont été enregistrés dans le répertoire des modèles de sites Web (/doctemplates/websites) et est prêt à être importé en tant que nouveau site Web. EnabledByDefaultAtInstall=Activé par défaut lors de l'installation VulnerableToRCEAttack=Vous êtes vulnérable aux attaques de type RCE en utilisant la fonction personnalisée dol_json_decode +ContactsDefaultRoles=Pour les les tiers de type "particulier" un contact peut-être créé simultanément. Définissez ici les rôles qui seront systématiquement attribués à ce contact. diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index bb683c97c9c59..c220073cb886b 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -31,6 +31,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $langs->loadLangs(array("admin", "companies", "other")); @@ -106,6 +107,19 @@ setEventMessages($langs->trans("Error"), null, 'errors'); } } + + if (GETPOST('CONTACTS_DEFAULT_ROLES')) { + $rolessearch = GETPOST('activate_CONTACTS_DEFAULT_ROLES', 'array'); + $res = dolibarr_set_const($db, "CONTACTS_DEFAULT_ROLES", implode(',', $rolessearch), 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + } } // Activate a document generator module @@ -926,6 +940,26 @@ print ''; } +if (getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION')) { + print ''; + print ''.$langs->trans('ContactsDefaultRoles').''; + if (!$conf->use_javascript_ajax) { + print ''; + print $langs->trans("NotAvailableWhenAjaxDisabled"); + print ""; + } else { + print ''; + $contact = new Contact($db); // InfraS add + $contactType = $contact->listeTypeContacts('external', 0, 1); + $selected = explode(',', getDolGlobalString('CONTACTS_DEFAULT_ROLES')); + print $form->multiselectarray('activate_CONTACTS_DEFAULT_ROLES', $contactType, $selected, 0, 0, 'minwidth75imp'); + print ''; + print ''; + print ""; + } + print ''; +} + print ''; print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 900b6ee990a7c..b2ccbb22a9306 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1117,6 +1117,7 @@ public function create_individual(User $user, $no_email = 0, $tags = array(), $n $contact->town = $this->town; $this->setUpperOrLowerCase(); $contact->phone_pro = $this->phone; + $contact->roles = explode(',', getDolGlobalString('CONTACTS_DEFAULT_ROLES')); $contactId = $contact->create($user, $notrigger); if ($contactId < 0) { From 5911a67a3118c19487b76ac916f7ff0c337089d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 15:34:54 +0200 Subject: [PATCH 062/127] Debug v21 --- htdocs/societe/admin/societe.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index c220073cb886b..59380b3b52480 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -69,7 +69,7 @@ } if ($action == 'updateoptions') { - if (GETPOST('COMPANY_USE_SEARCH_TO_SELECT')) { + if (GETPOSTISSET('COMPANY_USE_SEARCH_TO_SELECT')) { $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -82,7 +82,7 @@ } } - if (GETPOST('CONTACT_USE_SEARCH_TO_SELECT')) { + if (GETPOSTISSET('CONTACT_USE_SEARCH_TO_SELECT')) { $contactsearch = GETPOST('activate_CONTACT_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "CONTACT_USE_SEARCH_TO_SELECT", $contactsearch, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -95,7 +95,7 @@ } } - if (GETPOST('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { + if (GETPOSTISSET('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { $customertypedefault = GETPOSTINT('defaultcustomertype'); $res = dolibarr_set_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -108,8 +108,8 @@ } } - if (GETPOST('CONTACTS_DEFAULT_ROLES')) { - $rolessearch = GETPOST('activate_CONTACTS_DEFAULT_ROLES', 'array'); + if (GETPOSTISARRAY('CONTACTS_DEFAULT_ROLES')) { + $rolessearch = GETPOST('activate_CONTACTS_DEFAULT_ROLES', 'array:aZ09'); $res = dolibarr_set_const($db, "CONTACTS_DEFAULT_ROLES", implode(',', $rolessearch), 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++; From dc58a90a486e92818cd37a5f7c1ae0c440ef85d9 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 31 Jul 2024 15:35:15 +0200 Subject: [PATCH 063/127] Fix modulebuilder MAIN_ODT_AS_PDF (#30496) --- .../modules/mymodule/doc/doc_generic_myobject_odt.modules.php | 2 +- .../core/modules/mymodule/doc/pdf_standard_myobject.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 9baea8a2a713a..e35fb604cec1a 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -473,7 +473,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails $reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks // Write new file - if (getDolGlobalInt('MAIN_ODT_AS_PDF')) { + if (getDolGlobalString('MAIN_ODT_AS_PDF')) { try { $odfHandler->exportAsAttachedPDF($file); } catch (Exception $e) { 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 b0e624126510e..4d6d8987f62d6 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 @@ -944,7 +944,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfTitle"); - if (getDolGlobalInt('MAIN_ODT_AS_PDF') && is_object($outputlangsbis)) { + if (getDolGlobalString('MAIN_ODT_AS_PDF') && is_object($outputlangsbis)) { $title .= ' - '; $title .= $outputlangsbis->transnoentities("PdfTitle"); } From 3fda1ce4c0a1a06e2920e329a1896ac57113242b Mon Sep 17 00:00:00 2001 From: IC-Ilies <86972374+IC-Ilies@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:36:07 +0200 Subject: [PATCH 064/127] FIX#30491 token not set to launch cron task manually (#30492) --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 215bfb4e40dde..8a9f80e677d60 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -731,7 +731,7 @@ } if ($user->hasRight('cron', 'execute')) { if (!empty($obj->status)) { - print ' Date: Wed, 31 Jul 2024 15:41:00 +0200 Subject: [PATCH 065/127] FIX sanitize must allow space on attribute (#30490) * sanitize must allow space on attribute otherwhise "on update CURRENT_TIMESTAMP" for tms fields goes wrong * Update mysqli.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/db/mysqli.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index b506bcd67fcd6..6617a6333ad6f 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -5,7 +5,8 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Charlene Benke * * 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 @@ -853,7 +854,7 @@ public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_key $sqlfields[$i] .= "(".$this->sanitize($field_desc['value']).")"; } if (isset($field_desc['attribute']) && $field_desc['attribute'] !== '') { - $sqlfields[$i] .= " ".$this->sanitize($field_desc['attribute']); + $sqlfields[$i] .= " ".$this->sanitize($field_desc['attribute'], 0, 0, 1); // Allow space to accept attributes like "ON UPDATE CURRENT_TIMESTAMP" } if (isset($field_desc['default']) && $field_desc['default'] !== '') { if (in_array($field_desc['type'], array('tinyint', 'smallint', 'int', 'double'))) { From 2cf5b9bc420ed4229da1c397bf11915432ce70a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 31 Jul 2024 15:41:14 +0200 Subject: [PATCH 066/127] Update phpstan.neon.dist (#30489) --- phpstan.neon.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 57acb162457cc..faf63a0b5ad17 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -86,7 +86,6 @@ parameters: - '#\(\) expects int, string#' - '#run_sql expects int, string#' - '#expects int, float#' - - '#expects int, null#' - '#expects int, array\|string given.#' - '#expects int<0, 1>, '''' given.#' - '#expects float\|string#' From 7d996cf59f4c8a0a214c96e06f10cc165827e97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= <109105553+comaiteseb@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:41:59 +0200 Subject: [PATCH 067/127] Update list.php Bad translation Key for demand_reason (#30487) The Right translation for Demand Reason is Origin and not Channel. (see in propale where the translation works fine) --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 0141f9df4f655..9211cddf045e4 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -182,7 +182,7 @@ 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("expedition")), 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67), 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68), - 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69), + 'c.fk_input_reason'=>array('label'=>"Origin", 'checked'=>-1, 'position'=>69), 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), From b96c7f83187f873862c21a98dc54b102511b4a90 Mon Sep 17 00:00:00 2001 From: Christian Humpel <78662388+Humml87@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:43:13 +0200 Subject: [PATCH 068/127] NEW API Document implementation for MRP (MO) (#30488) * Get /documents * PUT /documents/builddoc * POST /documents/upload --- htdocs/api/class/api_documents.class.php | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index fabb73c110b36..a79d2232ff505 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -258,6 +258,22 @@ public function builddoc($modulepart, $original_file = '', $doctemplate = '', $l $templateused = $doctemplate ? $doctemplate : $tmpobject->model_pdf; $result = $tmpobject->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) { + throw new RestException(500, 'Error generating document missing doctemplate parameter'); + } + } elseif ($modulepart == 'mrp') { + require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; + + $tmpobject = new Mo($this->db); + $result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); + + if (!$result) { + throw new RestException(404, 'MO not found'); + } + + $templateused = $doctemplate ? $doctemplate : $tmpobject->model_pdf; + $result = $tmpobject->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) { throw new RestException(500, 'Error generating document missing doctemplate parameter'); } @@ -567,6 +583,17 @@ public function getDocumentsListByElement($modulepart, $id = 0, $ref = '', $sort } $upload_dir = $conf->projet->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'project'); + } elseif ($modulepart == 'mrp') { + $modulepart = 'mrp'; + require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; + + $object = new Mo($this->db); + $result = $object->fetch($id, $ref); + if (!$result) { + throw new RestException(404, 'MO not found'); + } + + $upload_dir = $conf->mrp->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'mrp'); } else { throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); } @@ -749,6 +776,10 @@ public function post($filename, $modulepart, $ref = '', $subdir = '', $fileconte $modulepart = 'contrat'; require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; $object = new Contrat($this->db); + } elseif ($modulepart == 'mrp') { + $modulepart = 'mrp'; + require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; + $object = new Mo($this->db); } else { // TODO Implement additional moduleparts throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); From d8a9ae39618d1018f1d73fedd19aa49fbea33f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= <109105553+comaiteseb@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:43:53 +0200 Subject: [PATCH 069/127] Update card.php Bad translation Key for demand_reason (#30486) The Right translation for Demand Reason is Source as it was defined line 2615 --- htdocs/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 77ba69204bff8..13f90625cd8b0 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1954,7 +1954,7 @@ } // Source / Channel - What trigger creation - print ''.$langs->trans('Channel').''; + print ''.$langs->trans('Source').''; print img_picto('', 'question', 'class="pictofixedwidth"'); $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx'); print ''; From 5da6995a56b0ccff3e0b0b54fbc289a3ef738bf4 Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 31 Jul 2024 18:39:02 +0200 Subject: [PATCH 070/127] Qual: Update Phan baseline - Fix phpstan regex (#30504) * Add missing escapes in regex * Qual: Fix phpstan regex --- dev/tools/phan/baseline.txt | 927 ++++++++++++++++-------------------- phpstan.neon.dist | 6 +- 2 files changed, 403 insertions(+), 530 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 1f83048b7b54e..ae4a72ac072e7 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -4,102 +4,92 @@ * When Phan is invoked with --load-baseline=path/to/baseline.php, * The pre-existing issues listed in this file won't be emitted. * - * This file can be updated by invoking Phan with --save-baseline=path/to/baseline.txt + * This file can be updated by invoking Phan with --save-baseline=path/to/baseline.php * (can be combined with --load-baseline) */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 2240+ occurrences - // PhanTypePossiblyInvalidDimOffset : 1540+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 1440+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 1400+ occurrences - // PhanPluginUnknownObjectMethodCall : 1040+ occurrences - // PhanUndeclaredProperty : 840+ occurrences - // PhanPluginUnknownArrayMethodParamType : 780+ occurrences + // PhanPluginUnknownPropertyType : 2090+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 1350+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 1270+ occurrences + // PhanPluginUnknownObjectMethodCall : 1060+ occurrences + // PhanUndeclaredProperty : 920+ occurrences + // PhanPluginUnknownArrayMethodParamType : 760+ occurrences // PhanUndeclaredGlobalVariable : 730+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 620+ occurrences - // PhanPossiblyUndeclaredVariable : 420+ occurrences - // PhanTypeArraySuspiciousNullable : 340+ occurrences - // PhanTypeMismatchProperty : 300+ occurrences - // PhanPluginDuplicateExpressionAssignmentOperation : 280+ occurrences - // PhanPluginUnknownArrayFunctionReturnType : 230+ occurrences - // PhanTypeObjectUnsetDeclaredProperty : 230+ occurrences - // PhanPluginUnknownArrayFunctionParamType : 180+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 180+ occurrences - // PhanTypeInvalidDimOffset : 170+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 610+ occurrences + // PhanPossiblyUndeclaredVariable : 410+ occurrences + // PhanPluginDuplicateExpressionAssignmentOperation : 290+ occurrences + // PhanTypeMismatchProperty : 290+ occurrences + // PhanPluginUnknownArrayFunctionParamType : 190+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 160+ occurrences // PhanTypeExpectedObjectPropAccess : 150+ occurrences - // PhanPluginUnknownArrayPropertyType : 140+ occurrences - // PhanTypeInvalidLeftOperandOfNumericOp : 140+ occurrences + // PhanTypeInvalidLeftOperandOfNumericOp : 130+ occurrences + // PhanPluginSimplifyExpressionBool : 120+ occurrences // PhanUndeclaredMethod : 120+ occurrences // PhanPluginEmptyStatementIf : 65+ occurrences - // PhanTypeMismatchDimFetch : 60+ occurrences // PhanRedefineFunction : 55+ occurrences + // PhanTypeMismatchDimFetch : 55+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 35+ occurrences // PhanPossiblyNullTypeMismatchProperty : 25+ occurrences // PhanEmptyForeach : 20+ occurrences - // PhanParamSignatureMismatch : 20+ occurrences // PhanRedefinedClassReference : 20+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanTypeExpectedObjectPropAccessButGotNull : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences // PhanPluginBothLiteralsBinaryOp : 10+ occurrences - // PhanPluginConstantVariableBool : 10+ occurrences // PhanPluginConstantVariableNull : 10+ occurrences // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences - // PhanRedefineClass : 3 occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences // PhanEmptyFQSENInClasslike : 5 occurrences // PhanInvalidFQSENInClasslike : 4 occurrences // PhanParamTooMany : 4 occurrences + // PhanRedefineClass : 3 occurrences // PhanTypeConversionFromArray : 3 occurrences - // PhanTypeComparisonToArray : 2 occurrences // PhanAccessMethodProtected : 1 occurrence // PhanAccessPropertyStaticAsNonStatic : 1 occurrence - // PhanNoopStringLiteral : 1 occurrence + // PhanParamSignatureMismatch : 1 occurrence + // PhanPluginRedundantReturnComment : 1 occurrence // PhanPluginWhitespaceTrailing : 1 occurrence // PhanTypeArraySuspiciousNull : 1 occurrence // PhanTypeMismatchReturn : 1 occurrence + // PhanUndeclaredVariableAssignOp : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ 'htdocs/accountancy/admin/productaccount.php' => ['PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/accountancy/bookkeeping/balance.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/bookkeeping/card.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/accountancy/bookkeeping/export.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/accountancy/bookkeeping/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/bookkeeping/listbyaccount.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/bookkeeping/export.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/bookkeeping/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/accountancy/bookkeeping/listbyaccount.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/accountancy/class/accountancyimport.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/accountancy/class/accountingaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/class/api_accountancy.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/accountancy/class/bookkeeping.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeComparisonFromArray', 'PhanTypeComparisonToArray', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/class/accountingaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/class/bookkeeping.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/class/lettering.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/accountancy/closure/index.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/accountancy/customer/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/accountancy/journal/bankjournal.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/accountancy/journal/expensereportsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/journal/bankjournal.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/journal/expensereportsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/variousjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/supplier/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/accountancy/tpl/export_journal.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/accountancy/tpl/export_journal.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/adherents/admin/member.php' => ['PhanParamTooMany', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], 'htdocs/adherents/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/adherents/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/adherents/class/adherent_type.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/adherents/class/adherent_type.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/class/adherentstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], - 'htdocs/adherents/class/api_members.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/adherents/class/api_members.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/class/api_subscriptions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/adherents/class/subscription.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/adherents/list.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/adherents/list.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/adherents/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/adherents/stats/byproperties.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/adherents/stats/geo.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/adherents/stats/geo.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/adherents/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/adherents/subscription.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/subscription/list.php' => ['PhanEmptyForeach'], @@ -114,20 +104,20 @@ return [ 'htdocs/admin/barcode.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/admin/bom.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/contract.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/admin/delais.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/admin/delivery.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/admin/dict.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/dict.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/admin/dolistore/class/dolistore.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/admin/ecm.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/emailcollector_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], - 'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/eventorganization.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/expedition.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], 'htdocs/admin/expensereport.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/admin/expensereport_rules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/expensereport_rules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/external_rss.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/fichinter.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], @@ -144,14 +134,13 @@ return [ 'htdocs/admin/mailman.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mails.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mails_emailing.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/mails_senderprofile_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/admin/mails_senderprofile_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mails_templates.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mails_ticket.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/menus.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/menus/edit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], - 'htdocs/admin/menus/index.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/admin/modulehelp.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/admin/modulehelp.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/admin/mrp.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/admin/mrp_extrafields.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/multicurrency.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -175,11 +164,10 @@ return [ 'htdocs/admin/syslog.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/system/constall.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/system/database-tables.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/system/dbtable.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable'], + 'htdocs/admin/system/dbtable.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/system/dolibarr.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/admin/system/filecheck.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/admin/system/modules.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/admin/system/phpinfo.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/admin/system/modules.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/admin/system/phpinfo.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/admin/system/security.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/taxes.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], @@ -191,139 +179,123 @@ return [ 'htdocs/admin/webhook.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/website.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/ai/ajax/generate_content.php' => ['PhanTypeArraySuspiciousNullable'], - 'htdocs/ai/class/ai.class.php' => ['PhanTypeArraySuspiciousNullable'], - 'htdocs/ai/lib/ai.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/api/class/api.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/api/class/api_setup.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/api/class/api_setup.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/asset/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/class/asset.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/asset/class/assetmodel.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/asset/class/asset.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], + 'htdocs/asset/class/assetmodel.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/asset/depreciation.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/asset/disposal.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/asset/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/asset/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/asset/model/card.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/asset/model/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/asset/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/asset/model/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/tpl/accountancy_codes_view.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/asset/tpl/depreciation_options_view.tpl.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/asset/tpl/depreciation_view.tpl.php' => ['PhanTypePossiblyInvalidDimOffset'], + 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'], 'htdocs/barcode/codeinit.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/blockedlog/admin/blockedlog_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable'], + 'htdocs/blockedlog/admin/blockedlog_list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/ajax/check_signature.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], - 'htdocs/blockedlog/lib/blockedlog.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bom/bom_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/bom/bom_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bom/class/api_boms.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/bom/class/bom.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/bom/lib/bom.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/bom/class/bom.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/bom/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/bom/tpl/objectline_create.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/availabilities_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/availabilities_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/bookcal/availabilities_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/bookcal/availabilities_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/calendar_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/bookcal/calendar_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/bookcal/calendar_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/bookmarks/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/categories/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeConversionFromArray', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeConversionFromArray', 'PhanTypeMismatchProperty'], 'htdocs/categories/edit.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], 'htdocs/categories/index.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/categories/photos.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], 'htdocs/categories/traduction.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], - 'htdocs/categories/viewcat.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/categories/viewcat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/collab/index.php' => ['PhanParamTooMany', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], - 'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/class/actioncommreminder.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'], - 'htdocs/comm/action/class/cactioncomm.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanTypeArraySuspiciousNullable'], - 'htdocs/comm/action/class/ical.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchProperty'], + 'htdocs/comm/action/class/ical.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/comm/action/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/info.php' => ['PhanUndeclaredProperty'], - 'htdocs/comm/action/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], - 'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/action/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], + 'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/comm/mailing/advtargetemailing.php' => ['PhanTypeArraySuspiciousNullable'], 'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/comm/mailing/cibles.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/comm/propal/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], - 'htdocs/comm/propal/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/propal/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/comm/propal/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/comm/remx.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/commande/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/commande/customer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/class/api_bankaccounts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/bank/class/bankcateg.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/compta/bank/graph.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/line.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/bank/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/bank/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/releve.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/bank/transfer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/bank/transfer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/treso.php' => ['PhanTypeMismatchProperty'], - 'htdocs/compta/bank/various_payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/compta/bank/various_payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/compta/cashcontrol/report.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/compta/charges/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/deplacement/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -333,44 +305,43 @@ return [ 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/facture/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/compta/facture/class/facture.class.php' => ['PhanEmptyForeach', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/compta/facture/class/facture.class.php' => ['PhanEmptyForeach', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/compta/facture/class/facturestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/compta/facture/class/paymentterm.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/facture/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/prelevement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/compta/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/compta/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/compta/localtax/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/localtax/class/localtax.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/localtax/clients.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/localtax/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanRedefineFunction'], 'htdocs/compta/localtax/list.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/quadri_detail.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], 'htdocs/compta/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], - 'htdocs/compta/paiement/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanUndeclaredProperty'], + 'htdocs/compta/paiement/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/paiement/cheque/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/cheque/class/remisecheque.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredMethod'], - 'htdocs/compta/paiement/cheque/list.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/paiement/cheque/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/rapport.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/payment_sc/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/compta/payment_vat/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanParamTooMany', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/compta/prelevement/class/rejetprelevement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], + 'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanParamTooMany', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/compta/prelevement/class/rejetprelevement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/compta/prelevement/create.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/demandes.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/factures.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -379,50 +350,48 @@ return [ 'htdocs/compta/prelevement/stats.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/clientfourn.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], + 'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/sociales/class/chargesociales.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/sociales/list.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/compta/sociales/payments.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/compta/stats/cabyprodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/stats/cabyuser.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/stats/casoc.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/tva/class/tva.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/tva/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/tva/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/tva/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/tva/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/tva/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/tva/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/tva/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/compta/tva/list.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/compta/tva/payments.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/tva/quadri_detail.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/contact/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/contact/class/contact.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/contact/class/contact.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/contact/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contact/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'], 'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/contrat/class/contrat.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/contrat/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/ticket.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/contrat/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchDimFetch', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/core/actions_builddoc.inc.php' => ['PhanUndeclaredProperty'], 'htdocs/core/actions_comments.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_dellink.inc.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -432,11 +401,10 @@ return [ 'htdocs/core/actions_massactions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/actions_sendmails.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxtooltip.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/ajax/contacts.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/ajax/extraparams.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/ajax/fileupload.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/ajax/loadinplace.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -450,9 +418,9 @@ return [ 'htdocs/core/boxes/box_accountancy_suspense_account.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_actions.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/boxes/box_actions_future.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_activity.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/boxes/box_birthdays.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/boxes/box_birthdays_members.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/boxes/box_activity.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/boxes/box_birthdays.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/boxes/box_birthdays_members.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_boms.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_bookmarks.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_clients.php' => ['PhanPluginUnknownArrayMethodParamType'], @@ -472,7 +440,7 @@ return [ 'htdocs/core/boxes/box_funnel_of_prospection.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_goodcustomers.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_invoices_peryear.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_invoices_peryear.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_graph_nb_tickets_type.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], @@ -487,8 +455,8 @@ return [ 'htdocs/core/boxes/box_last_modified_ticket.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_last_ticket.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_lastlogin.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_by_tags.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/boxes/box_members_by_type.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/boxes/box_members_by_tags.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/core/boxes/box_members_by_type.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/core/boxes/box_members_last_modified.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_members_last_subscriptions.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_members_subscriptions_by_year.php' => ['PhanPluginUnknownArrayMethodParamType'], @@ -507,172 +475,137 @@ return [ 'htdocs/core/boxes/box_supplier_orders_awaiting_reception.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/class/CMailFile.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], + 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/class/CMailFile.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], 'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cgenericdic.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/commonincoterm.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commoninvoice.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commoninvoice.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonobjectline.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonpeople.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset'], + 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/conf.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], - 'htdocs/core/class/cproductnature.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/ctypent.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/ctyperesource.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cunits.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/class/defaultvalues.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/core/class/defaultvalues.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/discount.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/class/doleditor.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/doleditor.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/dolgeoip.class.php' => ['PhanTypeMismatchProperty'], - 'htdocs/core/class/dolgraph.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], - 'htdocs/core/class/emailsenderprofile.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/class/dolgeophp.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/class/dolgraph.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/class/emailsenderprofile.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/events.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], - 'htdocs/core/class/extralanguages.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], + 'htdocs/core/class/extralanguages.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/class/fileupload.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/fiscalyear.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/google.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/class/hookmanager.class.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/class/html.form.class.php' => ['PhanTypeArraySuspiciousNullable'], + 'htdocs/core/class/hookmanager.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/html.formaccounting.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/html.formadmin.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formcategory.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formcompany.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formldap.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/class/html.formmail.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/core/class/html.formmail.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/class/html.formmailing.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/core/class/html.formmargin.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], - 'htdocs/core/class/html.formother.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable'], + 'htdocs/core/class/html.formother.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/html.formprojet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formsms.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], - 'htdocs/core/class/html.formticket.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formwebsite.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/infobox.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset'], - 'htdocs/core/class/ldap.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/ldap.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/core/class/link.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/menubase.class.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/core/class/notify.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/class/rssparser.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeInvalidDimOffset'], - 'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/class/stats.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredMethod'], - 'htdocs/core/class/timespent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess'], + 'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], + 'htdocs/core/class/stats.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], + 'htdocs/core/class/timespent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/validate.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], + 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/commonfieldsinexport.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/commonfieldsinimport.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/core/customreports.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/customreports.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/db/Database.interface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/db/mysqli.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeComparisonFromArray', 'PhanTypeInvalidDimOffset'], - 'htdocs/core/db/pgsql.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/db/sqlite3.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeComparisonFromArray', 'PhanTypeInvalidDimOffset', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/core/db/mysqli.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray'], + 'htdocs/core/db/pgsql.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/db/sqlite3.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeComparisonFromArray', 'PhanUndeclaredProperty'], 'htdocs/core/extrafieldsinexport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/extrafieldsinimport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/get_menudiv.php' => ['PhanRedefinedClassReference'], - 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/barcode.lib.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/lib/categories.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'], - 'htdocs/core/lib/contact.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/date.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/date.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/doc.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/donation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/ecm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/emailing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/eventorganization.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/expedition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/expensereport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/fiscalyear.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/fourn.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/functions2.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/fourn.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], + 'htdocs/core/lib/ftp.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/functions2.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/functions_ch.lib.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/core/lib/functionsnumtoword.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/lib/holiday.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/images.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/import.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/invoice.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/images.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/invoice2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/loan.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/core/lib/mailmanspip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/modulebuilder.lib.php' => ['PhanTypeMismatchDimFetch', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/oauth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/order.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/payments.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/prelevement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/lib/product.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/profid.lib.php' => ['PhanTypeInvalidDimOffset'], - 'htdocs/core/lib/project.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/propal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/receiptprinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/reception.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/core/lib/loan.lib.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/core/lib/memory.lib.php' => ['PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/modulebuilder.lib.php' => ['PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/product.lib.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/project.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/propal.lib.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/lib/report.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/resource.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/salaries.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/security.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/core/lib/security.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/core/lib/security2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/signature.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/stock.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/supplier_proposal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/takepos.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/tax.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/supplier_proposal.lib.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/tax.lib.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/trip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/usergroups.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/vat.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/website.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/usergroups.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/website.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/ws.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/login/functions_ldap.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/menus/standard/auguria_menu.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass', 'PhanTypeInvalidDimOffset', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/menus/standard/eldy.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset'], - 'htdocs/core/menus/standard/eldy_menu.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/menus/standard/empty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass', 'PhanTypeInvalidDimOffset', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], + 'htdocs/core/menus/standard/auguria_menu.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass'], + 'htdocs/core/menus/standard/eldy.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/menus/standard/eldy_menu.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/menus/standard/empty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass'], + 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/asset/modules_asset.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/bank/doc/pdf_ban.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredMethod'], 'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], @@ -683,57 +616,53 @@ return [ 'htdocs/core/modules/barcode/modules_barcode.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/bom/modules_bom.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/cheque/mod_chequereceipt_thyme.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/commande/mod_commande_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/commande/modules_commande.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/contract/mod_contract_magre.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/contract/modules_contract.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/delivery/modules_delivery.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/dons/html_cerfafr.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/core/modules/dons/modules_don.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/mod_expedition_ribera.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expedition/modules_expedition.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expensereport/mod_expensereport_sand.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/expensereport/modules_expensereport.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/export/export_csviso.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/export/export_csvutf8.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/export_tsv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/exportcsv.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/modules_export.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/mod_facture_mercure.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/fichinter/modules_fichinter.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/modules/holiday/mod_holiday_immaculate.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/holiday/modules_holiday.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/modules_evaluation.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/import/modules_import.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], 'htdocs/core/modules/mailings/advthirdparties.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/contacts1.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/mailings/eventorganization.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/partnership.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/mailings/thirdparties_services_expired.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], @@ -744,24 +673,24 @@ return [ 'htdocs/core/modules/member/modules_cards.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/modules/member/modules_member.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/modFacture.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], - 'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], 'htdocs/core/modules/movement/modules_movement.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/mrp/modules_mo.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/oauth/generic_oauthcallback.php' => ['PhanUndeclaredMethod'], 'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/google_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeArraySuspiciousNullable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/microsoft_oauthcallback.php' => ['PhanUndeclaredMethod'], + 'htdocs/core/modules/oauth/google_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], 'htdocs/core/modules/oauth/microsoft2_oauthcallback.php' => ['PhanUndeclaredMethod'], + 'htdocs/core/modules/oauth/microsoft_oauthcallback.php' => ['PhanUndeclaredMethod'], 'htdocs/core/modules/oauth/stripelive_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/oauth/stripetest_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/payment/mod_payment_ant.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeArraySuspiciousNullable', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], 'htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/modules_labels.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], 'htdocs/core/modules/product/modules_product.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/product_batch/mod_lot_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/product_batch/mod_lot_free.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -784,11 +713,10 @@ return [ 'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/reception/modules_reception.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/security/generate/modGeneratePassPerso.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/societe/doc/doc_generic_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/modules/societe/modules_societe.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], 'htdocs/core/modules/stock/modules_stock.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod'], @@ -802,17 +730,15 @@ return [ 'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/supplier_order/modules_commandefournisseur.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/supplier_payment/modules_supplier_payment.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/syslog/logHandler.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/syslog/logHandlerInterface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/modules/syslog/logHandler.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/takepos/mod_takepos_ref_universal.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -825,20 +751,19 @@ return [ 'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/workstation/modules_workstation.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/search_page.php' => ['PhanEmptyForeach', 'PhanPluginBothLiteralsBinaryOp'], - 'htdocs/core/tpl/advtarget.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeArraySuspiciousNullable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/advtarget.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/bloc_comment.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/tpl/commonfields_add.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/core/tpl/commonfields_edit.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/tpl/commonfields_add.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/tpl/commonfields_edit.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], + 'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/tpl/contacts.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/extrafields_list_print_fields.tpl.php' => ['PhanTypeArraySuspiciousNullable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/extrafields_list_print_fields.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredVariableAssignOp', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/list_print_total.tpl.php' => ['PhanTypePossiblyInvalidDimOffset'], + 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredVariableAssignOp'], 'htdocs/core/tpl/login.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/notes.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -852,7 +777,6 @@ return [ 'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/resource_add.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/resource_view.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/triggers/dolibarrtriggers.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -862,138 +786,130 @@ return [ 'htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess'], 'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php' => ['PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/core/website.inc.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/cron/class/cronjob.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/datapolicy/admin/setup.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/datapolicy/class/datapolicy.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/datapolicy/lib/datapolicy.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/dav/dav.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/dav/dav.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/dav/fileserver.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/debugbar/class/DataCollector/DolConfigCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolLogsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanRedefinedClassReference'], 'htdocs/debugbar/class/DataCollector/DolMemoryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolQueryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolibarrCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/debugbar/class/TraceableDB.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/debugbar/class/TraceableDB.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/delivery/class/delivery.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/delivery/class/delivery.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/document.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/admin/donation.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/don/class/donstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/don/class/paymentdonation.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/info.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/list.php' => ['PhanTypeMismatchProperty'], 'htdocs/don/note.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/don/paiement/list.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/don/paiement/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/don/payment/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/don/stats/index.php' => ['PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/ecm/ajax/ecmdatabase.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/ecm/class/ecmfiles.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/ecm/class/htmlecm.form.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/ecm/dir_card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_auto.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_medias.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/eventorganization/class/conferenceorbooth.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/conferenceorbooth_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/eventorganization/conferenceorbooth_contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/eventorganization/conferenceorboothattendee_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/expedition/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/expedition/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/class/api_shipments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/expedition/class/expedition.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/expedition/class/expedition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/expedition/class/expeditionlinebatch.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/expedition/class/expeditionstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expedition/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/expedition/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/expedition/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/expedition/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/expedition/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/stats/index.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/expensereport/class/expensereport_ik.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/expensereport_rule.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/expensereport/list.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/expensereport/list.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/expensereport/payment/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/expensereport/payment/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/expensereport/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/expensereport/tpl/expensereport_addfile.tpl.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/exports/class/export.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/exports/class/export.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/exports/export.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fichinter/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/fichinter/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], - 'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], - 'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/filefunc.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/filefunc.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/fournisseur.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.facture-rec.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.facture.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.product.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchProperty'], - 'htdocs/fourn/class/paiementfourn.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fourn/class/paiementfourn.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/commande/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/fourn/commande/contact.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/document.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/info.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/fourn/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fourn/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/commande/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/fourn/contact.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/fourn/facture/list-rec.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchProperty'], + 'htdocs/fourn/facture/list-rec.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], 'htdocs/fourn/paiement/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/fourn/paiement/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/fourn/paiement/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/fourn/paiement/list.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/fourn/product/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/recap-fourn.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/ftp/admin/ftpclient.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -1002,42 +918,35 @@ return [ 'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/holiday/month_report.php' => ['PhanTypeArraySuspiciousNullable'], 'htdocs/hrm/admin/admin_hrm.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/hrm/class/evaluation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/evaluationdet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/job.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/position.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/skill.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/skilldet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/hrm/class/skillrank.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/class/evaluation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/evaluationdet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/job.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/position.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/skill.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/skilldet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/hrm/class/skillrank.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/hrm/core/tpl/skilldet.fiche.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/evaluation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/evaluation_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/hrm/evaluation_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/hrm/evaluation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/job_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/hrm/job_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/hrm/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/lib/hrm_job.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/lib/hrm_position.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/lib/hrm_skill.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/lib/hrm_skilldet.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/lib/hrm_skillrank.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/position.php' => ['PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/hrm/job_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/hrm/position.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/hrm/position_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/position_card.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/hrm/skill_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/hrm/skill_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/hrm/skill_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/skill_tab.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/install/fileconf.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], @@ -1047,82 +956,66 @@ return [ 'htdocs/install/repair.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/step2.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/install/upgrade2.php' => ['PhanPluginConstantVariableBool', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/install/upgrade2.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/intracommreport/admin/intracommreport.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset'], + 'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/knowledgemanagement/knowledgerecord_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/loan/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/loan/class/loan.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/loan/class/loan.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/loan/class/loanschedule.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/loan/class/paymentloan.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/loan/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/loan/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/loan/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/loan/note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/loan/payment/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredGlobalVariable'], + 'htdocs/loan/payment/card.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/loan/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/loan/schedule.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredGlobalVariable'], - 'htdocs/mailmanspip/class/mailmanspip.class.php' => ['PhanPluginUnknownArrayPropertyType'], - 'htdocs/main.inc.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanPossiblyUndeclaredVariable', 'PhanRedefineFunction', 'PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/margin/agentMargins.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/margin/customerMargins.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/margin/lib/margins.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/margin/productMargins.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/margin/tabs/thirdpartyMargins.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/loan/schedule.php' => ['PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredGlobalVariable'], + 'htdocs/main.inc.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanPossiblyUndeclaredVariable', 'PhanRedefineFunction', 'PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/margin/customerMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/modulebuilder/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/mrp/ajax/ajax_bom.php' => ['PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/modulebuilder/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/mrp/class/api_mos.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/mrp/lib/mrp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/mrp/lib/mrp_mo.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], 'htdocs/mrp/mo_agenda.php' => ['PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/mrp/mo_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/mrp/mo_production.php' => ['PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/tpl/originproductline.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/multicurrency/multicurrency_rate.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], 'htdocs/opcachepreload.php' => ['PhanEmptyForeach'], 'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], - 'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/opensurvey/wizard/choix_autre.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/opensurvey/wizard/choix_autre.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], + 'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/partnership/class/api_partnerships.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/partnership/class/partnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/partnership/class/partnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/partnership/class/partnership_type.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/partnership/core/modules/partnership/modules_partnership.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/partnership/lib/partnership.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/partnership/partnership_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/partnership/partnership_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/printing/admin/printing.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/printing/index.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/printing/lib/printing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/admin/dynamic_prices.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/product/admin/price_rules.php' => ['PhanTypePossiblyInvalidDimOffset'], 'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/product/admin/product_lot.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/product/admin/product_tools.php' => ['PhanNoopStringLiteral', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/ajax/product_lot.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -1131,27 +1024,25 @@ return [ 'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], 'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/product/class/product.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchReturn', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredMethod'], + 'htdocs/product/class/product.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchReturn', 'PhanUndeclaredMethod'], 'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], - 'htdocs/product/class/productcustomerprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredProperty'], - 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/product/class/productcustomerprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/class/propalmergepdfproduct.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/product/composition/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/dynamic_price/class/price_global_variable.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], - 'htdocs/product/dynamic_price/class/price_global_variable_updater.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable'], - 'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeArraySuspiciousNullable'], - 'htdocs/product/fournisseurs.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/product/dynamic_price/class/price_global_variable_updater.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], + 'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/inventory/lib/inventory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/product/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/popuprop.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/price_suppliers.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/reassortlot.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/product/reassortlot.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stats/card.php' => ['PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stats/commande.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stats/commande_fournisseur.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1160,74 +1051,70 @@ return [ 'htdocs/product/stats/facturerec.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stats/mo.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stats/propal.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stats/supplier_proposal.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/product/stock/class/api_stockmovements.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/product/stock/class/api_warehouses.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/product/stock/class/entrepot.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/class/entrepot.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/class/productlot.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/product/stock/class/productstockentrepot.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/product/stock/fiche-valo.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/massstockmove.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/movement_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/product.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/stock/productlot_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/productlot_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/replenish.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stats/expedition.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stats/mo.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stats/reception.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stockatdate.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stock/stocktransfer/class/stocktransfer.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/product/stock/stocktransfer/class/stocktransfer.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], + 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stocktransfer/stocktransfer_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/valo.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/projet/activity/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'], - 'htdocs/projet/activity/perday.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/projet/activity/permonth.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/projet/activity/perday.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/activity/permonth.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/admin/project.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/card.php' => ['PhanEmptyFQSENInClasslike', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/projet/card.php' => ['PhanEmptyFQSENInClasslike', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/api_tasks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/projet/class/project.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanPluginSuspiciousParamPosition'], + 'htdocs/projet/class/project.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/taskstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/projet/contact.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/document.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/projet/element.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/projet/element.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/projet/ganttchart.inc.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/ganttview.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/graph_opportunities.inc.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/index.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/projet/list.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/projet/list.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/projet/tasks.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/tasks.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/comment.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/tasks/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/projet/tasks/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/task.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'], - 'htdocs/public/bookcal/bookcalAjax.php' => ['PhanTypePossiblyInvalidDimOffset'], - 'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchProperty'], + 'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], 'htdocs/public/company/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/public/demo/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction'], @@ -1239,18 +1126,18 @@ return [ 'htdocs/public/members/public_card.php' => ['PhanRedefineFunction'], 'htdocs/public/members/public_list.php' => ['PhanRedefineFunction'], 'htdocs/public/onlinesign/newonlinesign.php' => ['PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/partnership/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], - 'htdocs/public/payment/newpayment.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/public/payment/newpayment.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/new.php' => ['PhanEmptyFQSENInClasslike', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestbooth.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], 'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -1267,50 +1154,47 @@ return [ 'htdocs/public/website/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/website/javascript.js.php' => ['PhanRedefineFunction'], 'htdocs/public/website/styles.css.php' => ['PhanRedefineFunction'], - 'htdocs/reception/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/reception/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/reception/class/api_receptions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/reception/class/reception.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/reception/class/reception.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/reception/class/receptionlinebatch.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/reception/class/receptionstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/reception/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/reception/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/reception/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/reception/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/reception/stats/index.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/reception/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/recruitment/lib/recruitment.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/recruitment/recruitmentcandidature_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentcandidature_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentcandidature_document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/recruitment/recruitmentcandidature_list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/recruitmentcandidature_list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentcandidature_note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentjobposition_agenda.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/recruitment/recruitmentjobposition_applications.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/resource/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], + 'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/resource/class/html.formresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeExpectedObjectPropAccess'], 'htdocs/resource/element_resource.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/resource/list.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/salaries/admin/salaries.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp'], 'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/salaries/class/salary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/salaries/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1322,7 +1206,7 @@ return [ 'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/societe/admin/societe.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/societe/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/societe/canvas/company/actions_card_company.class.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -1331,45 +1215,40 @@ return [ 'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], - 'htdocs/societe/class/client.class.php' => ['PhanPluginUnknownArrayPropertyType'], - 'htdocs/societe/class/companybankaccount.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownPropertyType'], - 'htdocs/societe/class/companypaymentmode.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/societe/class/societe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/societe/class/societeaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], + 'htdocs/societe/class/companybankaccount.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/societe/class/companypaymentmode.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/societe/class/societe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/societe/class/societeaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/societe/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/document.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], - 'htdocs/societe/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/societe/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/societe/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/project.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/stripe/admin/stripe.php' => ['PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/stripe/ajax/ajax.php' => ['PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/stripe/admin/stripe.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/stripe/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/charge.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/stripe/lib/stripe.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/stripe/payout.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/transaction.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/supplier_proposal/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], - 'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/supplier_proposal/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/supplier_proposal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/support/inc.php' => ['PhanRedefineFunction'], - 'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'], + 'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/takepos/admin/setup.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/takepos/index.php' => ['PhanTypeInvalidDimOffset', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/takepos/invoice.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/takepos/pay.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/takepos/phone.php' => ['PhanTypeInvalidDimOffset'], - 'htdocs/takepos/public/menu.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/takepos/invoice.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/takepos/pay.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/takepos/public/menu.php' => ['PhanUndeclaredProperty'], 'htdocs/takepos/receipt.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/takepos/split.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], @@ -1377,6 +1256,7 @@ return [ 'htdocs/theme/eldy/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/global.inc.php' => ['PhanTypeInvalidLeftOperandOfNumericOp'], + 'htdocs/theme/eldy/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/main_menu_fa_icons.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/style.css.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -1384,91 +1264,84 @@ return [ 'htdocs/theme/md/btn.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/style.css.php' => ['PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/ticket/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/ticket/card.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginConstantVariableBool', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/ticket/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/ticket/class/cticketcategory.class.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/ticket/class/ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/ticket/class/ticket.class.php' => ['PhanPluginRedundantReturnComment', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/ticketstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/ticket/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'], 'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/user/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/user/class/api_users.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanRedefinedClassReference', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], + 'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/user/class/usergroup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/user/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/user/group/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/group/perms.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/user/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/user/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/perms.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefinedClassReference'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], 'htdocs/variants/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/variants/class/ProductAttributeValue.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], - 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/variants/lib/variants.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/variants/list.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], + 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], + 'htdocs/variants/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/viewimage.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefineFunction'], - 'htdocs/webhook/class/target.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty', 'PhanTypeObjectUnsetDeclaredProperty'], - 'htdocs/webhook/lib/webhook.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/webhook/lib/webhook_target.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/webhook/ajax/webhook.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/webhook/class/target.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty'], 'htdocs/webhook/target_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/webhook/target_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/webhook/target_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'], + 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/webportal/class/webportalorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalpartnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/webportal/class/webportalpropal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/webportal/lib/webportal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_category.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_payment.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_supplier_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset'], + 'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_payment.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_supplier_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/class/websitepage.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/samples/wrapper.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'], - 'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], + 'htdocs/workstation/class/api_workstations.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], 'htdocs/workstation/class/workstationresource.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/workstation/class/workstationusergroup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/workstation/lib/workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/workstation/lib/workstation_workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/workstation/workstation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/workstation/workstation_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/workstation/workstation_list.php' => ['PhanTypeArraySuspiciousNullable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypePossiblyInvalidDimOffset'], - 'htdocs/zapier/admin/setup.php' => ['PhanEmptyForeach'], + 'htdocs/workstation/workstation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/zapier/class/api_zapier.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/zapier/class/hook.class.php' => ['PhanTypeObjectUnsetDeclaredProperty', 'PhanUndeclaredProperty'], - 'htdocs/zapier/lib/zapier.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/zapier/class/hook.class.php' => ['PhanUndeclaredProperty'], 'internal' => ['PhanUndeclaredConstant'], ], // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. diff --git a/phpstan.neon.dist b/phpstan.neon.dist index faf63a0b5ad17..cf170c6ca1c0b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -51,12 +51,12 @@ parameters: - '#Function llxHeaderVierge invoked with#' - '#always exists and is not falsy#' - '#always exists and is not nullable#' - - '#Call to function is_resource() with#' + - '#Call to function is_resource\(\) with#' - '#is always fal#' - '#is always true#' - - '#is_object() with mixed will always evaluate to false#' + - '#is_object\(\) with mixed will always evaluate to false#' - '#Empty array passed to foreach#' - - '#in empty() is not falsy#' + - '#in empty\(\) is not falsy#' - '#in isset\(\) is not nullable#' - '#(\$force_dolibarr_lib|\$dolibarr_main_db).*in empty\(\) is never defined.#' - '#Sprain\\SwissQrBill\\#' From ee0412dd27f1a62653c74c1365d399fbae1b2143 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 18:54:52 +0200 Subject: [PATCH 071/127] Fix phan warning --- htdocs/accountancy/bookkeeping/card.php | 10 ++++--- htdocs/accountancy/bookkeeping/export.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 2 +- .../accountancy/class/bookkeeping.class.php | 26 +++++++++---------- htdocs/accountancy/class/lettering.class.php | 2 +- htdocs/adherents/class/api_members.class.php | 10 +++---- htdocs/api/class/api_access.class.php | 2 +- htdocs/api/class/api_documents.class.php | 4 +-- htdocs/asset/admin/setup.php | 2 +- .../asset/tpl/accountancy_codes_view.tpl.php | 2 +- htdocs/comm/card.php | 2 +- htdocs/compta/bank/card.php | 2 +- .../bank/class/paymentvarious.class.php | 2 +- htdocs/compta/bank/list.php | 2 +- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/bank/various_payment/list.php | 4 +-- .../compta/paiement/class/paiement.class.php | 2 +- htdocs/core/class/commonobject.class.php | 4 +-- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/class/html.formticket.class.php | 2 +- htdocs/core/lib/files.lib.php | 8 +++--- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/login/functions_ldap.php | 4 +-- htdocs/core/tpl/passwordreset.tpl.php | 2 +- htdocs/cron/class/cronjob.class.php | 4 +-- htdocs/dav/fileserver.php | 2 +- .../class/emailcollector.class.php | 2 +- 27 files changed, 57 insertions(+), 53 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index e79e116d546b8..7b0ab27775fd2 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -180,6 +180,8 @@ } if (!$error) { + $datedoc = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); + $object = new BookKeeping($db); $object->numero_compte = $accountingaccount_number; @@ -189,7 +191,7 @@ $object->label_operation = $label_operation; $object->debit = $debit; $object->credit = $credit; - $object->doc_date = (string) GETPOST('doc_date', 'alpha'); + $object->doc_date = $datedoc; $object->doc_type = (string) GETPOST('doc_type', 'alpha'); $object->piece_num = $piece_num; $object->doc_ref = (string) GETPOST('doc_ref', 'alpha'); @@ -258,10 +260,12 @@ } if (!$error) { + $date_start = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); + $object->label_compte = ''; $object->debit = 0; $object->credit = 0; - $object->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); + $object->doc_date = $date_start; $object->doc_type = GETPOST('doc_type', 'alpha'); $object->piece_num = GETPOSTINT('next_num_mvt'); $object->doc_ref = GETPOST('doc_ref', 'alpha'); @@ -482,7 +486,7 @@ print ''; print ''; print ''; - print $form->selectDate($object->doc_date ? $object->doc_date : - 1, 'doc_date', 0, 0, 0, "setdate"); + print $form->selectDate($object->doc_date ? $object->doc_date : -1, 'doc_date', 0, 0, 0, "setdate"); print ''; print ''; } else { diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index cc060a041753b..4294363e75191 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -1243,7 +1243,7 @@ // Journal code if (!empty($arrayfields['t.code_journal']['checked'])) { $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('', $line->code_journal); + $result = $accountingjournal->fetch(0, $line->code_journal); $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); print ''.$journaltoshow.''; if (!$i) { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b3b42d9312530..4e2b285669a74 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -601,7 +601,7 @@ } elseif ($action == 'unletteringmanual' && $confirm == "yes") { $lettering = new Lettering($db); $nb_lettering = $lettering->deleteLettering($toselect); - if ($result < 0) { + if ($nb_lettering < 0) { setEventMessages('', $lettering->errors, 'errors'); } else { setEventMessages($langs->trans('AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index ab678599c6e93..4bc9933e844d4 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -38,17 +38,17 @@ class BookKeeping extends CommonObject { /** - * @var string Id to identify managed objects + * @var string Id to identify managed objects */ public $element = 'accountingbookkeeping'; /** - * @var string Name of table without prefix where object is stored + * @var string Name of table without prefix where object is stored */ public $table_element = 'accounting_bookkeeping'; /** - * @var int Entity + * @var int Entity */ public $entity; @@ -58,52 +58,52 @@ class BookKeeping extends CommonObject public $lines = array(); /** - * @var int ID + * @var int ID */ public $id; /** - * @var int Date of source document, in db date NOT NULL + * @var int Date of source document, in db date NOT NULL */ public $doc_date; /** - * @var int Deadline for payment + * @var int Deadline for payment */ public $date_lim_reglement; /** - * @var string doc_type + * @var string Doc type */ public $doc_type; /** - * @var string doc_ref + * @var string Doc ref */ public $doc_ref; /** - * @var int ID + * @var int ID */ public $fk_doc; /** - * @var int ID + * @var int ID */ public $fk_docdet; /** - * @var string thirdparty code + * @var string Thirdparty code */ public $thirdparty_code; /** - * @var string subledger account + * @var string|null Subledger account */ public $subledger_account; /** - * @var string subledger label + * @var string|null Subledger label */ public $subledger_label; diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 59710b1ab312d..5f47641fa5c18 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -429,7 +429,7 @@ public function updateLettering($ids = array(), $notrigger = 0, $partial = false * * @param array $ids ids array * @param int $notrigger no trigger - * @return int + * @return int Nb of affectd rows or <0 if error */ public function deleteLettering($ids, $notrigger = 0) { diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index d98fdb59a07f8..f51729536e0cc 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -108,7 +108,7 @@ public function getByThirdparty($thirdparty) } $member = new Adherent($this->db); - $result = $member->fetch('', '', $thirdparty); + $result = $member->fetch(0, '', $thirdparty); if (!$result) { throw new RestException(404, 'member not found'); } @@ -141,13 +141,13 @@ public function getByThirdpartyEmail($email) } $thirdparty = new Societe($this->db); - $result = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $email); + $result = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', $email); if (!$result) { throw new RestException(404, 'thirdparty not found'); } $member = new Adherent($this->db); - $result = $member->fetch('', '', $thirdparty->id); + $result = $member->fetch(0, '', $thirdparty->id); if (!$result) { throw new RestException(404, 'member not found'); } @@ -180,13 +180,13 @@ public function getByThirdpartyBarcode($barcode) } $thirdparty = new Societe($this->db); - $result = $thirdparty->fetch('', '', '', $barcode); + $result = $thirdparty->fetch(0, '', '', $barcode); if (!$result) { throw new RestException(404, 'thirdparty not found'); } $member = new Adherent($this->db); - $result = $member->fetch('', '', $thirdparty->id); + $result = $member->fetch(0, '', $thirdparty->id); if (!$result) { throw new RestException(404, 'member not found'); } diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 61f664d856257..fb074a8b32d42 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -168,7 +168,7 @@ public function __isAllowed() } $fuser = new User($this->db); - $result = $fuser->fetch('', $login, '', 0, (empty($userentity) ? -1 : $conf->entity)); // If user is not entity 0, we search in working entity $conf->entity (that may have been forced to a different value than user entity) + $result = $fuser->fetch(0, $login, '', 0, (empty($userentity) ? -1 : $conf->entity)); // If user is not entity 0, we search in working entity $conf->entity (that may have been forced to a different value than user entity) if ($result <= 0) { dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': Failed to fetch on entity", LOG_NOTICE); sleep(1); // Anti brute force protection. Must be same delay when user and password are not valid. diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index fabb73c110b36..6616b127d3839 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -707,7 +707,7 @@ public function post($filename, $modulepart, $ref = '', $subdir = '', $fileconte require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $object = new Task($this->db); - $task_result = $object->fetch('', $ref); + $task_result = $object->fetch(0, $ref); // Fetching the tasks project is required because its out_dir might be a sub-directory of the project if ($task_result > 0) { @@ -759,7 +759,7 @@ public function post($filename, $modulepart, $ref = '', $subdir = '', $fileconte // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $result = $object->fetch($ref); } else { - $result = $object->fetch('', $ref); + $result = $object->fetch(0, $ref); } if ($result == 0) { diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index d1287cbdd4ef7..b9e96e1a3e960 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -640,7 +640,7 @@ if (isModEnabled('accounting')) { require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', getDolGlobalString($constname), 1); + $accountingaccount->fetch(0, getDolGlobalString($constname), 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); } else { diff --git a/htdocs/asset/tpl/accountancy_codes_view.tpl.php b/htdocs/asset/tpl/accountancy_codes_view.tpl.php index cb429c79399fd..e6f86782e3292 100644 --- a/htdocs/asset/tpl/accountancy_codes_view.tpl.php +++ b/htdocs/asset/tpl/accountancy_codes_view.tpl.php @@ -69,7 +69,7 @@ $accountancy_code = $assetaccountancycodes->accountancy_codes[$mode_key][$field_key]; if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $accountancy_code, 1); + $accountingaccount->fetch(0, $accountancy_code, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); } else { diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index ff2d9fd5aa669..7d3d2fce5143d 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -632,7 +632,7 @@ print ''.$langs->trans("LinkedToDolibarrMember").''; print ''; $adh = new Adherent($db); - $result = $adh->fetch('', '', $object->id); + $result = $adh->fetch(0, '', $object->id); if ($result > 0) { $adh->ref = $adh->getFullName($langs); print $adh->getNomUrl(-1); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 309217f0d70b4..21187bc7e2703 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -733,7 +733,7 @@ print ''; if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $object->account_number, 1); + $accountingaccount->fetch(0, $object->account_number, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); } else { diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 94ee4f52bc9ac..177b64dcccd38 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -875,7 +875,7 @@ public function lengthAccountg($account) /* if (isModEnabled('accounting')) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $valuetoshow, 1); + $accountingaccount->fetch(0, $valuetoshow, 1); }*/ return length_accountg($account); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 7580a8227b72b..fe8057fb3ceee 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -708,7 +708,7 @@ print ''; if (isModEnabled('accounting') && !empty($objecttmp->account_number)) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $objecttmp->account_number, 1); + $accountingaccount->fetch(0, $objecttmp->account_number, 1); print ''; print $accountingaccount->getNomUrl(0, 1, 1, '', 0); print ''; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 20f9198c74f05..3cd1e1f3477b0 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -658,7 +658,7 @@ function setPaymentType() print $formaccounting->formAccountingAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->accountancy_code, 'accountancy_code', 0, 1, '', 1); } else { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $object->accountancy_code, 1); + $accountingaccount->fetch(0, $object->accountancy_code, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index fa38a3ce382e1..607434b33cdc5 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -701,7 +701,7 @@ $variousstatic->fk_bank = $bankline->getNomUrl(1); $variousstatic->amount = $obj->amount; - $accountingaccount->fetch('', $obj->accountancy_code, 1); + $accountingaccount->fetch(0, $obj->accountancy_code, 1); $variousstatic->accountancy_code = $accountingaccount->getNomUrl(0, 0, 1, $obj->accountingaccount, 1); if ($mode == 'kanban') { @@ -829,7 +829,7 @@ // Accounting account if (!empty($arrayfields['account']['checked'])) { require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; - $result = $accountingaccount->fetch('', $obj->accountancy_code, 1); + $result = $accountingaccount->fetch(0, $obj->accountancy_code, 1); if ($result > 0) { print ''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).''; } else { diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 2be4b94997c2f..5b60317e5db51 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -467,7 +467,7 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) // Insert one discount by VAT rate category $discount = new DiscountAbsolute($this->db); - $discount->fetch('', $invoice->id); + $discount->fetch(0, $invoice->id); if (empty($discount->id)) { // If the invoice was not yet converted into a discount (this may have been done manually before we come here) $discount->description = '(DEPOSIT)'; $discount->fk_soc = $invoice->socid; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c7127f6e49233..06a5b21afbc8b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6688,7 +6688,7 @@ public function insertExtraFields($trigger = '', $userused = null) if (is_numeric($value)) { $res = $object->fetch($value); // Common case } else { - $res = $object->fetch('', $value); // For compatibility + $res = $object->fetch(0, $value); // For compatibility } if ($res > 0) { @@ -7154,7 +7154,7 @@ public function updateExtraField($key, $trigger = null, $userused = null) } elseif ($value) { $object = new $InfoFieldList[0]($this->db); if (is_numeric($value)) $res = $object->fetch($value); // Common case - else $res = $object->fetch('', $value); // For compatibility + else $res = $object->fetch(0, $value); // For compatibility if ($res > 0) $new_array_options[$key] = $object->id; else { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 4ecf61ffd1842..cbb60582b1510 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1923,7 +1923,7 @@ public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $para if ($id) { $result = $object_instance->fetch($id); } else { - if (!($result = $object_instance->fetch('', $ref))) { + if (!($result = $object_instance->fetch(0, $ref))) { //fetchOneLike looks for objects with wildcards in its reference. //It is useful for those masks who get underscores instead of their actual symbols (because the _ had replaced all forbidden chars into filename) // TODO Example when this is needed ? diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 720ec31aa8191..bbc3fec613c14 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -1512,7 +1512,7 @@ public function showMessageForm($width = '40%') // External users can't send message email if ($user->hasRight("ticket", "write") && !$user->socid) { $ticketstat = new Ticket($this->db); - $res = $ticketstat->fetch('', '', $this->track_id); + $res = $ticketstat->fetch(0, '', $this->track_id); print ''; $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : (getDolGlobalInt('TICKETS_MESSAGE_FORCE_MAIL') ? 'checked' : '')); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 8b8f5816c66ee..3534278382122 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2922,7 +2922,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($refname && !$fuser->hasRight('holiday', 'readall') && !preg_match('/^specimen/i', $original_file)) { include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $tmpholiday = new Holiday($db); - $tmpholiday->fetch('', $refname); + $tmpholiday->fetch(0, $refname); $accessallowed = checkUserAccessToObject($user, array('holiday'), $tmpholiday, 'holiday', '', '', 'rowid', ''); } } @@ -2934,7 +2934,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($refname && !$fuser->hasRight('expensereport', 'readall') && !preg_match('/^specimen/i', $original_file)) { include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $tmpexpensereport = new ExpenseReport($db); - $tmpexpensereport->fetch('', $refname); + $tmpexpensereport->fetch(0, $refname); $accessallowed = checkUserAccessToObject($user, array('expensereport'), $tmpexpensereport, 'expensereport', '', '', 'rowid', ''); } } @@ -3193,7 +3193,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($refname && !preg_match('/^specimen/i', $original_file)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $tmpproject = new Project($db); - $tmpproject->fetch('', $refname); + $tmpproject->fetch(0, $refname); $accessallowed = checkUserAccessToObject($user, array('projet'), $tmpproject->id, 'projet&project', '', '', 'rowid', ''); } } @@ -3206,7 +3206,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($refname && !preg_match('/^specimen/i', $original_file)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $tmptask = new Task($db); - $tmptask->fetch('', $refname); + $tmptask->fetch(0, $refname); $accessallowed = checkUserAccessToObject($user, array('projet_task'), $tmptask->id, 'projet_task&project', '', '', 'rowid', ''); } } diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 34d1c8059ab7b..f2f39b2eddf4b 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -53,7 +53,7 @@ function check_authentication($authentication, &$error, &$errorcode, &$errorlabe } if (!$error) { - $result = $fuser->fetch('', $authentication['login'], '', 0); + $result = $fuser->fetch(0, $authentication['login'], '', 0); if ($result < 0) { $error++; $errorcode = 'ERROR_FETCH_USER'; diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 89c910b8cf2d7..ed042b0a21891 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -195,7 +195,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) } $usertmp = new User($db); - $resultFetchUser = $usertmp->fetch('', $login, $sid, 1, ($entitytotest > 0 ? $entitytotest : -1)); + $resultFetchUser = $usertmp->fetch(0, $login, $sid, 1, ($entitytotest > 0 ? $entitytotest : -1)); if ($resultFetchUser > 0) { dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id); // Verify if the login changed and update the Dolibarr attributes @@ -216,7 +216,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) global $mc; $usertmp = new User($db); - $usertmp->fetch('', $login); + $usertmp->fetch(0, $login); if (is_object($mc)) { $ret = $mc->checkRight($usertmp->id, $entitytotest); if ($ret < 0) { diff --git a/htdocs/core/tpl/passwordreset.tpl.php b/htdocs/core/tpl/passwordreset.tpl.php index 9df594cd88982..93e1f1d062fd3 100644 --- a/htdocs/core/tpl/passwordreset.tpl.php +++ b/htdocs/core/tpl/passwordreset.tpl.php @@ -93,7 +93,7 @@ // Validate parameters if ($setnewpassword && $username && $passworduidhash) { - $result = $edituser->fetch('', $username); + $result = $edituser->fetch(0, $username); if ($result < 0) { $message = '
    '.dol_escape_htmltag($langs->trans("ErrorTechnicalError")).'
    '; } else { diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 9281fb7dd606b..c3b7804454408 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1188,7 +1188,7 @@ public function run_jobs(string $userlogin) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($this->db); - $result = $user->fetch('', $userlogin); + $result = $user->fetch(0, $userlogin); if ($result < 0) { $this->error = "User Error:".$user->error; dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); @@ -1455,7 +1455,7 @@ public function reprogram_jobs(string $userlogin, int $now) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($this->db); - $result = $user->fetch('', $userlogin); + $result = $user->fetch(0, $userlogin); if ($result < 0) { $this->error = "User Error : ".$user->error; dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR); diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index 4ccc451035519..6911838834e2d 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -57,7 +57,7 @@ $user = new User($db); if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '') { - $user->fetch('', $_SERVER['PHP_AUTH_USER']); + $user->fetch(0, $_SERVER['PHP_AUTH_USER']); $user->getrights(); } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index fb7e1cf1e9787..0a5fb74b2fb5f 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2565,7 +2565,7 @@ public function doCollectOneCollector($mode = 0) dol_syslog("Third party with id=".$idtouseforthirdparty." email=".$emailtouseforthirdparty." name=".$nametouseforthirdparty." name_alias=".$namealiastouseforthirdparty." was not found"); //search into contacts of thirdparty - $resultContact = $contactstatic->fetch('', '', '', $emailtouseforthirdparty); + $resultContact = $contactstatic->fetch(0, '', '', $emailtouseforthirdparty); if ($resultContact > 0) { $idtouseforthirdparty = $contactstatic->socid; $result = $thirdpartystatic->fetch($idtouseforthirdparty); From 31a560422d53adbe51518ea05feda3ba122887c9 Mon Sep 17 00:00:00 2001 From: lamrani abdelwadoud Date: Wed, 31 Jul 2024 19:12:40 +0200 Subject: [PATCH 072/127] New Preview mai topic value on Ckeditor (#30195) * New update for templateMail by creating files * New updating for get php content * Update html.formmail.class.php * Fix updating content news * Fix CTI Errors * edit html file for news * Add automaticaly subject value to editor * Update html.formmail.class.php * FIX name and path of file * Fix path for files * Fix errors variables * replace file in ajax folder * rename path * update the news file * fix phan errors --------- Co-authored-by: Laurent Destailleur --- htdocs/comm/mailing/card.php | 2 +- htdocs/core/ajax/mailtemplate.php | 58 +++++++++++++++++++ htdocs/core/class/html.formmail.class.php | 41 +++++++++---- htdocs/core/lib/emaillayout.lib.php | 1 + .../doctemplates/maillayout/basic.html | 4 ++ .../doctemplates/maillayout/commerce.html | 21 ++++++- .../install/doctemplates/maillayout/news.html | 28 ++------- htdocs/langs/en_US/mails.lang | 1 + 8 files changed, 120 insertions(+), 36 deletions(-) create mode 100644 htdocs/core/ajax/mailtemplate.php diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index d1c654b91ba7d..8971aaa6ec8f7 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -845,7 +845,7 @@ print '

    '; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/core/ajax/mailtemplate.php b/htdocs/core/ajax/mailtemplate.php new file mode 100644 index 0000000000000..07a43b2064beb --- /dev/null +++ b/htdocs/core/ajax/mailtemplate.php @@ -0,0 +1,58 @@ + +
    +

    ' . htmlentities($post['title']) . '

    +

    ' . htmlentities($post['description']) . '

    + Created By: ' . htmlentities($post['user_fullname']) . ' +
    + ' . dol_print_date($post['date_creation'], 'daytext', 'tzserver', $langs) . ' +
    +
    + ' . ($post['image'] ? 'Image' : 'Gray rectangle') . ' +
    + '; + } + + $content = str_replace('__NEWS_LIST__', $newsList, $content); + } else { + $content = str_replace('__NEWS_LIST__', 'No articles selected', $content); + } + + + print $content; +} else { + print 'No content provided or invalid token'; +} diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 2461ee3691992..cad32189d0bcb 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1542,24 +1542,43 @@ public function getModelEmailTemplate($htmlContent = 'message') $out .= ''; $out .= ''; return $out; diff --git a/htdocs/core/lib/emaillayout.lib.php b/htdocs/core/lib/emaillayout.lib.php index 2d60a8bbbfb43..d5afc4b1fee69 100644 --- a/htdocs/core/lib/emaillayout.lib.php +++ b/htdocs/core/lib/emaillayout.lib.php @@ -40,6 +40,7 @@ function getHtmlOfLayout($name) '__CONTENOFMAILHOLDER__' => $langs->trans('ContentOfMailHolder'), '__USERSIGNATURE__' => !empty($user->signature) ? dol_htmlentities($user->signature) : '', '__GRAY_RECTANGLE__' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAIAAABM5OhcAAABGklEQVR4nO3SwQ3AIBDAsNLJb3SWIEJC9gR5ZM3MB6f9twN4k7FIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIvEBtxYAkgpLmAeAAAAAElFTkSuQmCC', + '__LAST_NEWS__' => $langs->trans('LastNews'), ); $substitutionarray = array_merge($commonSubstitutionArray, $specificSubstitutionArray); diff --git a/htdocs/install/doctemplates/maillayout/basic.html b/htdocs/install/doctemplates/maillayout/basic.html index a40bcb83ebd89..8ebeb8093070a 100644 --- a/htdocs/install/doctemplates/maillayout/basic.html +++ b/htdocs/install/doctemplates/maillayout/basic.html @@ -2,9 +2,13 @@
    +
    +

    Subject : __SUBJECT__

    +

    __TITLEOFMAILHOLDER__

    __USERSIGNATURE__

    + diff --git a/htdocs/install/doctemplates/maillayout/commerce.html b/htdocs/install/doctemplates/maillayout/commerce.html index 956417c26d25d..a54286c2243cf 100644 --- a/htdocs/install/doctemplates/maillayout/commerce.html +++ b/htdocs/install/doctemplates/maillayout/commerce.html @@ -23,4 +23,23 @@

    Lorem, ipsum dolor sit amet consectetur adipisici
    -
    +
    + Gray rectangle +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit
    Lorem ipsum dolor sit amet, consectetur adipiscing elit... +
    +
    + +
    +
    + Gray rectangle +
    +
    + Lorem ipsum dolor sit amet, consectetur adipiscing elit
    Lorem ipsum dolor sit amet, consectetur adipiscing elit... +
    +
    +
    + \ No newline at end of file diff --git a/htdocs/install/doctemplates/maillayout/news.html b/htdocs/install/doctemplates/maillayout/news.html index fd02abeec49a3..37399d4895692 100644 --- a/htdocs/install/doctemplates/maillayout/news.html +++ b/htdocs/install/doctemplates/maillayout/news.html @@ -1,24 +1,6 @@ -

    Lorem, ipsum dolor sit amet consectetur adipisicing elit sit amet consectetur

    -

    Lorem, ipsum dolor sit amet consectetur adipisicing elitsit amet consectetur adipisicing

    +

    __LAST_NEWS__

    +

    __CONTENOFMAILHOLDER__

    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur Lorem ipsum dolor sit amet, consectetur

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod temxwshslkdsdsslpor incididunt ut labore et dolore magna aliqua. Lorem, ipsum dolor sit amet consectetur adipisicing elit. Totam sit autem nihil omnis! Odit ipsum repellat, voluptas accusantium dolores adipisci ut voluptates eius cumque dicta obcaecati -
    created by : __USER_FULLNAME__ -
    -
    - Gray rectangle -
    -
    - -
    -
    -

    Lorem ipsum dolor sit amet, consectetur Lorem ipsum dolor sit amet, consectetur

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod temxwshslkdsdsslpor incididunt ut labore et dolore magna aliqua. Lorem, ipsum dolor sit amet consectetur adipisicing elit. Totam sit autem nihil omnis! Odit ipsum repellat, voluptas accusantium dolores adipisci ut voluptates eius cumque dicta obcaecati -
    created by : __USER_FULLNAME__ -
    -
    - Gray rectangle -
    -
    + +__NEWS_LIST__ + diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 3570e6a36c41d..7bee7f74343b1 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -196,3 +196,4 @@ ModelTemplate=Email template YouCanChooseAModelForYouMailContent= You can choose one of template models or generate one with AI TitleOfMailHolder=Title of the e-mail goes here ContentOfMailHolder=Content of email goes here... +LastNews=Last News \ No newline at end of file From 75158556c9963cfa81a6aee42b400aa9c1cdc885 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 19:36:57 +0200 Subject: [PATCH 073/127] Debug --- htdocs/core/ajax/locationincoterms.php | 5 ++-- htdocs/core/ajax/mailtemplate.php | 35 ++++++++++++++++++++++- htdocs/core/class/html.formmail.class.php | 4 +-- htdocs/core/lib/functions.lib.php | 20 ++++++++++--- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/htdocs/core/ajax/locationincoterms.php b/htdocs/core/ajax/locationincoterms.php index 6be6645c1b424..c15307bf51cda 100644 --- a/htdocs/core/ajax/locationincoterms.php +++ b/htdocs/core/ajax/locationincoterms.php @@ -47,7 +47,8 @@ if (!isModEnabled('incoterm')) { httponly_accessforbidden("Module incoterm not enabled"); // This includes the exit. } -// There is no other permission on this component. Everybody connected can read content of the incoterm table + +// There is no other permission on this component. Everybody connected can read content of the incoterm dictionary table /* @@ -77,7 +78,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."c_location_incoterms as z"; $sql .= " WHERE z.active = 1 AND z.location LIKE '%".$db->escape($db->escapeforlike($location_incoterms))."%'"; $sql .= " ORDER BY z.location"; - $sql .= $db->plimit(100); // Avoid pb with bad criteria + $sql .= $db->plimit(1000); // Avoid pb with bad criteria } else { // Use table of sale orders $sql = "SELECT DISTINCT s.location_incoterms FROM ".MAIN_DB_PREFIX.'commande as s'; $sql .= " WHERE s.location_incoterms LIKE '%".$db->escape($db->escapeforlike($location_incoterms))."%'"; diff --git a/htdocs/core/ajax/mailtemplate.php b/htdocs/core/ajax/mailtemplate.php index 07a43b2064beb..58257ad0d2fb7 100644 --- a/htdocs/core/ajax/mailtemplate.php +++ b/htdocs/core/ajax/mailtemplate.php @@ -1,4 +1,25 @@ + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/ajax/mailtemplate.php + * \ingroup core + * \brief File to return Ajax response on location_incoterms request + */ // Just for display errors in editor ini_set('display_errors', 1); @@ -23,9 +44,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +// There is no permission test on this component for the moment. Test will be added when knowing which data it read. + +// TODO $selectedPosts is not initialised, i set it to '' but this is surely a bug and not the expected behaviour. +// Should be set to list of last news... +$selectedPosts = ''; + + +/* + * View + */ + top_httphead(); -if ($_SERVER['REQUEST_METHOD'] == 'POST' && GETPOSTISSET('content')) { +// TODO Replace with ID of template +if (GETPOSTISSET('content')) { $content = GETPOST('content'); if (!empty($selectedPosts)) { diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index cad32189d0bcb..17fc98dc074b2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1567,8 +1567,8 @@ public function getModelEmailTemplate($htmlContent = 'message') url: "/core/ajax/mailtemplate.php", data: { content: contentHtml, token: csrfToken }, success: function(response) { - jQuery("#'.$htmlContent.'").val(response); - var editorInstance = CKEDITOR.instances["'.$htmlContent.'"]; + jQuery("#'.dol_sanitizeKeyCode($htmlContent).'").val(response); + var editorInstance = CKEDITOR.instances["'.dol_sanitizeKeyCode($htmlContent).'"]; if (editorInstance) { editorInstance.setData(response); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 557eb2041b0c2..b7e9d92486fec 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1574,7 +1574,7 @@ function dol_size($size, $type = '') * @param string $str String to clean * @param string $newstr String to replace bad chars with. * @param int $unaccent 1=Remove also accent (default), 0 do not remove them - * @return string String cleaned (a-zA-Z_) + * @return string String cleaned * * @see dol_string_nospecial(), dol_string_unaccent(), dol_sanitizePathName() */ @@ -1601,7 +1601,7 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1) * @param string $str String to clean * @param string $newstr String to replace bad chars with * @param int $unaccent 1=Remove also accent (default), 0 do not remove them - * @return string String cleaned (a-zA-Z_) + * @return string String cleaned * * @see dol_string_nospecial(), dol_string_unaccent(), dol_sanitizeFileName() */ @@ -1672,6 +1672,20 @@ function dol_sanitizeEmail($stringtoclean) return $stringtoclean; } +/** + * Clean a string to use it as a key or code. So only char a-Z, A-Z, _ and 0-9 is kept. + * + * @param string $str String to clean + * @return string String cleaned (a-zA-Z_) + * + * @see dol_string_nospecial(), dol_string_unaccent(), dol_sanitize...() + */ +function dol_sanitizeKeyCode($str) +{ + return preg_replace('/[^\w]+/', '', $str); +} + + /** * Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName * @@ -1682,8 +1696,6 @@ function dol_sanitizeEmail($stringtoclean) */ function dol_string_unaccent($str) { - global $conf; - if (is_null($str)) { return ''; } From 87c7a7a7d7008cfecdcb87b426c0d8a0a4b3491f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 22:26:54 +0200 Subject: [PATCH 074/127] WIP Page to setup email for reset password --- htdocs/admin/mails.php | 121 ++-- htdocs/admin/mails_emailing.php | 67 ++- htdocs/admin/mails_passwordreset.php | 804 +++++++++++++++++++++++++++ htdocs/admin/mails_ticket.php | 82 ++- htdocs/core/lib/admin.lib.php | 9 +- htdocs/core/tpl/formlayoutai.tpl.php | 4 + htdocs/langs/en_US/mails.lang | 5 +- 7 files changed, 992 insertions(+), 100 deletions(-) create mode 100644 htdocs/admin/mails_passwordreset.php diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 8f797ea25e5d1..44fffd6a7ccc7 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -156,6 +156,7 @@ $form = new Form($db); +// Set default variables $linuxlike = 1; if (preg_match('/^win/i', PHP_OS)) { $linuxlike = 0; @@ -167,11 +168,12 @@ if (!getDolGlobalString('MAIN_MAIL_SENDMODE')) { $conf->global->MAIN_MAIL_SENDMODE = 'mail'; } -$port = getDolGlobalString('MAIN_MAIL_SMTP_PORT') ? $conf->global->MAIN_MAIL_SMTP_PORT : ini_get('smtp_port'); + +$port = getDolGlobalInt('MAIN_MAIL_SMTP_PORT', ini_get('smtp_port')); if (!$port) { $port = 25; } -$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER') ? $conf->global->MAIN_MAIL_SMTP_SERVER : ini_get('SMTP'); +$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER', ini_get('SMTP')); if (!$server) { $server = '127.0.0.1'; } @@ -310,15 +312,22 @@ function initfields() } function change_smtp_auth_method() { console.log("Call smtp auth method"); - if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if(jQuery("#MAIN_MAIL_SENDMODE").val()==\'mail\'){ - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").hide(); + if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'smtps\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } + } else if (jQuery("#MAIN_MAIL_SENDMODE").val()==\'swiftmailer\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } } else { jQuery(".smtp_pw").show(); jQuery(".smtp_oauth_service").hide(); @@ -599,34 +608,20 @@ function change_smtp_auth_method() { print '
    '.$langs->trans("MailTopic").'
    '.$langs->trans("MailTopic").'
    '.$langs->trans("BackgroundColorByDefault").''; print $htmlother->selectColor(GETPOST('bgcolor'), 'bgcolor', '', 0); print '
    '; - print ''; - - // Disable - print ''; + print ''; // Force e-mail recipient print ''; - print '
    '.$langs->trans("ParametersForTestEnvironment").'
    '.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; - print $form->selectyesno('MAIN_DISABLE_ALL_MAILS', getDolGlobalString('MAIN_DISABLE_ALL_MAILS'), 1); - print '
    '.$langs->trans("OtherOptions").'
    '.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''; - print ''; + print ''; print '
    '; - - - print '
    '; - - - print ''; - print ''; - // From $help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM")); print ''; - print ''; // Default from type @@ -668,7 +663,21 @@ function change_smtp_auth_method() { print dol_get_fiche_head($head, 'common', '', -1); print ''.$langs->trans("EMailsDesc")."
    \n"; - print "

    \n"; + print "
    \n"; + + print $langs->trans("MAIN_DISABLE_ALL_MAILS"); + if (!empty($conf->use_javascript_ajax)) { + print ajax_constantonoff('MAIN_DISABLE_ALL_MAILS', array(), null, 0, 0, 1, 2, 0, 0, '_red').''; + } else { + print yn(getDolGlobalString('MAIN_DISABLE_ALL_MAILS')); + if (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { + print img_warning($langs->trans("Disabled")); + } + } + + print "
    \n"; + print "
    \n"; + print "
    \n"; if (!getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { @@ -837,24 +846,12 @@ function change_smtp_auth_method() { print '
    '; } - - print '
    '; // You can use div-table-responsive-no-min if you don't need reserved height for your table - print '
    '.$langs->trans("OtherOptions").'
    '; print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined")); print ' '.$help; print '
    '; - print ''; - - // Disable - print ''; - + /* if (!getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { + print '
    '; // You can use div-table-responsive-no-min if you don't need reserved height for your table + print '
    '.$langs->trans("ParametersForTestEnvironment").'
    '.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; - if (!empty($conf->use_javascript_ajax)) { - print ajax_constantonoff('MAIN_DISABLE_ALL_MAILS', array(), null, 0, 0, 1, 2, 0, 0, '_red').''; - } else { - print yn(getDolGlobalString('MAIN_DISABLE_ALL_MAILS')); - if (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { - print img_warning($langs->trans("Disabled")); - } - } - print '
    '; + print ''; + // Force e-mail recipient print ''; - } - - print '
    '.$langs->trans("ParametersForTestEnvironment").'
    '.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'); if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) { @@ -865,19 +862,32 @@ function change_smtp_auth_method() { } } print '
    '; - print ''; + print ''; + print ''; - print '
    '; + print '
    '; + } + */ print '
    '; // You can use div-table-responsive-no-min if you don't need reserved height for your table print ''; print ''; + // Force e-mail recipient + if (!getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { + print ''; + } + // From $help = $form->textwithpicto('', $langs->trans("EMailHelpMsgSPFDKIM")); print ''; + print ''; } // TLS diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php new file mode 100644 index 0000000000000..3316f2789443e --- /dev/null +++ b/htdocs/admin/mails_passwordreset.php @@ -0,0 +1,804 @@ + + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2016 Jonathan TISSEAU + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/mails_passwordreset.php + * \brief Page to setup mails for password reset + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); + +$usersignature = $user->signature; +// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. +if ($action == 'test' || $action == 'send') { + $usersignature = dol_string_nohtmltag($usersignature, 2); +} + +$substitutionarrayfortest = array( + '__ID__' => 'TESTIdRecord', + '__USER_LOGIN__' => $user->login, + '__USER_EMAIL__' => $user->email, + '__USER_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails + '__SENDEREMAIL_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails + '__LASTNAME__' => 'RecipientLastname', + '__FIRSTNAME__' => 'RecipientFirstname', + '__ADDRESS__'=> 'RecipientAddress', + '__ZIP__'=> 'RecipientZip', + '__TOWN_'=> 'RecipientTown', + '__COUNTRY__'=> 'RecipientCountry', + '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, +); +complete_substitutions_array($substitutionarrayfortest, $langs); + +// List of sending methods +$listofmethods = array(); +$listofmethods['default'] = $langs->trans('DefaultOutgoingEmailSetup'); +$listofmethods['mail'] = 'PHP mail function'; +//$listofmethods['simplemail']='Simplemail class'; +$listofmethods['smtps'] = 'SMTP/SMTPS socket library'; +if (version_compare(phpversion(), '7.0', '>=')) { + $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; +} + +// Security check +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +if ($action == 'update' && !$cancel) { + // Send mode parameters + dolibarr_set_const($db, "MAIN_MAIL_SENDMODE_PASSWORDRESET", GETPOST("MAIN_MAIL_SENDMODE_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTP_PORT_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTP_SERVER_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_ID_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_PASSWORDRESET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_PW_PASSWORDRESET", 'none'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET("MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET")) { + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_TLS_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + +// Actions to send emails +$id = 0; +$actiontypecode = ''; // Not an event for agenda +$triggersendname = ''; // Disable triggers +$paramname = 'id'; +$mode = 'emailfortest'; +$trackid = (($action == 'testhtml') ? "testhtml" : "test"); +$sendcontext = 'ticket'; // Force to use dedicated context of setup for ticket +include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; + +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') { + $action = 'test'; +} +if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') { + $action = 'testhtml'; +} + + + + +/* + * View + */ + +$form = new Form($db); + +$linuxlike = 1; +if (preg_match('/^win/i', PHP_OS)) { + $linuxlike = 0; +} +if (preg_match('/^mac/i', PHP_OS)) { + $linuxlike = 0; +} + +if (!getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')) { + $conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET = 'default'; +} +$port = getDolGlobalInt('MAIN_MAIL_SMTP_PORT_PASSWORDRESET', ini_get('smtp_port')); +if (!$port) { + $port = 25; +} +$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET', ini_get('SMTP')); +if (!$server) { + $server = '127.0.0.1'; +} + + +$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails'; +llxHeader('', $langs->trans("Setup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-mails_passwordreset'); + +print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup'); + +$head = email_admin_prepare_head(); + +// List of oauth services +$oauthservices = array(); + +foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $key = preg_replace('/^OAUTH_/', '', $key); + $key = preg_replace('/_ID$/', '', $key); + if (preg_match('/^.*-/', $key)) { + $name = preg_replace('/^.*-/', '', $key); + } else { + $name = $langs->trans("NoName"); + } + $provider = preg_replace('/-.*$/', '', $key); + $provider = ucfirst(strtolower($provider)); + + $oauthservices[$key] = $name." (".$provider.")"; + } +} + + +if ($action == 'edit') { + if ($conf->use_javascript_ajax) { + print "\n".''."\n"; + } + + print '
    '; + print ''; + print ''; + + print dol_get_fiche_head($head, 'common_passwordreset', '', -1); + + print ''.$langs->trans("EMailsDesc")."
    \n"; + print "

    \n"; + + + clearstatcache(); + + print '
    '.$langs->trans("OtherOptions").'
    '.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'); + if (getDolGlobalString('MAIN_MAIL_FORCE_SENDTO')) { + if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) { + print img_warning($langs->trans("ErrorBadEMail")); + } else { + print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue")); + } + } + print '
    '; @@ -997,7 +1007,6 @@ function change_smtp_auth_method() { print ''; - if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && !getDolGlobalString('MAIN_FIX_FOR_BUGGED_MTA')) { /* // Warning 1 @@ -1013,7 +1022,7 @@ function change_smtp_auth_method() { print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA")); } - if (!in_array($action, array('testconnect', 'test', 'testhtml'))) { + if (!in_array($action, array('testconnect', 'test', 'testhtml')) && !getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { $text = ''; if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') { //$text .= $langs->trans("WarningPHPMail"); // To encourage to use SMTPS @@ -1132,8 +1141,10 @@ function change_smtp_auth_method() { $formmail->withtopic = (GETPOSTISSET('subject') ? GETPOST('subject') : $langs->trans("Test")); $formmail->withtopicreadonly = 0; $formmail->withfile = 2; - $formmail->withlayout = 1; // Not MAIN_EMAIL_USE_LAYOUT must be set - $formmail->withaiprompt = ($action == 'testhtml' ? 'html' : 'text'); + + $formmail->withlayout = 1; // Note: MAIN_EMAIL_USE_LAYOUT must be set + $formmail->withaiprompt = ($action == 'testhtml' ? 'html' : 'text'); // Note: Module AI must be enabled + $formmail->withbody = (GETPOSTISSET('message') ? GETPOST('message', 'restricthtml') : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"))); $formmail->withbodyreadonly = 0; $formmail->withcancel = 1; diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index e25dc10f2100a..024d07537aaff 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -41,20 +41,20 @@ } $substitutionarrayfortest = array( - '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, - '__CHECK_READ__' => '', + '__ID__' => 'RecipientIdRecord', '__USER_LOGIN__' => $user->login, '__USER_EMAIL__' => $user->email, '__USER_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails '__SENDEREMAIL_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails - '__ID__' => 'RecipientIdRecord', //'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails '__LASTNAME__' => 'RecipientLastname', '__FIRSTNAME__' => 'RecipientFirstname', '__ADDRESS__'=> 'RecipientAddress', '__ZIP__'=> 'RecipientZip', '__TOWN_'=> 'RecipientTown', - '__COUNTRY__'=> 'RecipientCountry' + '__COUNTRY__'=> 'RecipientCountry', + '__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, + '__CHECK_READ__' => '' ); complete_substitutions_array($substitutionarrayfortest, $langs); @@ -139,11 +139,11 @@ if (!getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')) { $conf->global->MAIN_MAIL_SENDMODE_EMAILING = 'default'; } -$port = getDolGlobalString('MAIN_MAIL_SMTP_PORT_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : ini_get('smtp_port'); +$port = getDolGlobalInt('MAIN_MAIL_SMTP_PORT_EMAILING', ini_get('smtp_port')); if (!$port) { $port = 25; } -$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : ini_get('SMTP'); +$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING', ini_get('SMTP')); if (!$server) { $server = '127.0.0.1'; } @@ -200,7 +200,13 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").prop("disabled", true); - jQuery(".smtp_method").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_EMAILING").prop("disabled", true); + jQuery(".smtp_method").hide(); + jQuery(".dkim").hide(); jQuery(".smtp_auth_method").hide(); '; if ($linuxlike) { @@ -230,6 +236,14 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING').'); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_EMAILING").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_EMAILING").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_EMAILING").hide(); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").show(); @@ -237,6 +251,7 @@ function initfields() jQuery("#smtp_port_mess").hide(); jQuery("#smtp_server_mess").hide(); jQuery(".smtp_method").show(); + jQuery(".dkim").hide(); jQuery(".smtp_auth_method").show(); } if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'swiftmailer\') @@ -249,6 +264,14 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING').'); jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_EMAILING").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_EMAILING").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_EMAILING").hide(); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").show(); @@ -256,22 +279,30 @@ function initfields() jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); jQuery(".smtp_method").show(); + jQuery(".dkim").show(); jQuery(".smtp_auth_method").show(); } } function change_smtp_auth_method() { console.log("Call smtp auth method"); - if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if(jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'mail\'){ - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").hide(); + if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'smtps\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } + } else if (jQuery("#MAIN_MAIL_SENDMODE_EMAILING").val()==\'swiftmailer\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } } else { - jQuery(".smtp_pw").show(); + jQuery(".smtp_pw").hide(); jQuery(".smtp_oauth_service").hide(); } } @@ -593,7 +624,7 @@ function change_smtp_auth_method() { if (empty($text)) { $text = $langs->trans("Undefined").img_warning(); } - print '
    '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING").''.$text.'
    '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''.$text.'
    '; + print ''; + + // Method + + print ''; + + // Host server + + print ''; + if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail') { + print ''; + } else { + print ''; + } + print ''; + + // Port + + print ''; + + // AUTH method + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + print ''; + } + + // ID + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET : ''); + print ''; + } + + // PW + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + $mainsmtppw = (getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTPS_PW_PASSWORDRESET : ''); + print ''; + } + + // OAUTH service provider + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + print ''; + } + + // TLS + + print ''; + + // STARTTLS + + print ''; + + // SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET + print ''; + + print '
    '.$langs->trans("Parameters").'
    '.$langs->trans("MAIN_MAIL_SENDMODE").''; + + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print $form->selectarray('MAIN_MAIL_SENDMODE_PASSWORDRESET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET); + } else { + $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')]; + if (empty($text)) { + $text = $langs->trans("Undefined"); + } + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '; + print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ''; + $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : ''); + $smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined"); + if ($linuxlike) { + print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + } else { + print $langs->trans("MAIN_MAIL_SMTP_SERVER", $smtpserver); + } + print ''; + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + print ' ' . $langs->trans("SeeLinkToOnlineDocumentation") . ''; + } else { + $text = !empty($mainserver) ? $mainserver : $smtpserver; + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '; + if (!$conf->use_javascript_ajax && $linuxlike && getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail') { + print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : ''); + $smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined"); + if ($linuxlike) { + print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + } else { + print $langs->trans("MAIN_MAIL_SMTP_PORT", $smtpport); + } + print ''; + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $text = (!empty($mainport) ? $mainport : $smtpport); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + } + print '
    '.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; + $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET'; + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) + print ' '; + print ''; + print '
    '; + print ' '; + print ''; + print '
    '; + print ' '; + print ''; + if (!isModEnabled('oauth')) { + print '   '.$langs->trans("EnableModuleX", "OAuth").''; + } else { + print '   '.$langs->trans("SetupModuleX", " OAuth").''; + } + } else { + $value = getDolGlobalString($vartosmtpstype, 'LOGIN'); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '.$langs->trans("MAIN_MAIL_SMTPS_ID").''; + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_PASSWORDRESET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; + // SuperAdministrator access only + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET); + } else { + $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET')]; + if (empty($text)) { + $text = $langs->trans("Undefined"); + } + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
    '.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (function_exists('openssl_open')) { + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_TLS_PASSWORDRESET : 0), 1); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (function_exists('openssl_open')) { + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET : 0), 1); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (function_exists('openssl_open')) { + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET : 0), 1); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '; + + print dol_get_fiche_end(); + + print $form->buttonsSaveCancel(); + + print ''; +} else { + print dol_get_fiche_head($head, 'common_passwordreset', '', -1); + + print ''.$langs->trans("EMailsDesc")."
    \n"; + print "

    \n"; + + print '
    '; // You can use div-table-responsive-no-min if you don't need reserved height for your table + print ''; + print ''; + + // Method + print ''; + + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') && getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') != 'default') { + // Host server + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) { + //print ''; + } else { + print ''; + } + + // Port + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) { + //print ''; + } else { + print ''; + } + + // AUTH method + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { + $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET', 'LOGIN'); + $text = ''; + if ($authtype === "LOGIN") { + $text = $langs->trans("UseAUTHLOGIN"); + } elseif ($authtype === "PLAIN") { + $text = $langs->trans("UseAUTHPLAIN"); + } elseif ($authtype === "XOAUTH2") { + $text = $langs->trans("UseOauth"); + } + print ''; + } + + // SMTPS ID + if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + print ''; + } + + // SMTPS PW + if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') != "XOAUTH2") { + print ''; + } + + // SMTPS oauth service + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') === "XOAUTH2") { + $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET')]; + if (empty($text)) { + $text = $langs->trans("Undefined").img_warning(); + } + print ''; + } + + // TLS + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { + // Nothing + } else { + print ''; + } + + // STARTTLS + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { + // Nothing + } else { + print ''; + } + + // SMTP_ALLOW_SELF_SIGNED_EMAILING + if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { + // Nothing + } else { + print ''; + } + } + + print '
    '.$langs->trans("Parameters").'
    '.$langs->trans("MAIN_MAIL_SENDMODE").''; + $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')]; + if (empty($text)) { + $text = $langs->trans("Undefined").img_warning(); + } + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'default') { + print ''.$text.''; + } else { + print $text; + } + print '
    '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
    '.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : '').'
    '.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
    '.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : '').'
    '.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''.$text.'
    '.$langs->trans("MAIN_MAIL_SMTPS_ID").'' . getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET').'
    '.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET')).'
    '.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''.$text.'
    '.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (function_exists('openssl_open')) { + print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET')); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (function_exists('openssl_open')) { + print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET')); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (function_exists('openssl_open')) { + print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET')); + } else { + print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + } else { + print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + } + print '
    '; + print '
    '; + + print dol_get_fiche_end(); + + + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail' && !getDolGlobalString('MAIN_FIX_FOR_BUGGED_MTA')) { + print '
    '; + /* + // Warning 1 + if ($linuxlike) + { + $sendmailoption=ini_get('mail.force_extra_parameters'); + if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption)) + { + print info_admin($langs->trans("SendmailOptionNotComplete")); + } + }*/ + // Warning 2 + print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA")); + } + + + // Buttons for actions + + print '
    '; + + print ''.$langs->trans("Modify").''; + + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') && getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') != 'default') { + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') != 'mail' || !$linuxlike) { + if (function_exists('fsockopen') && $port && $server) { + print ''.$langs->trans("DoTestServerAvailability").''; + } + } else { + print ''.$langs->trans("DoTestServerAvailability").''; + } + + print ''.$langs->trans("DoTestSend").''; + + if (isModEnabled('fckeditor')) { + print ''.$langs->trans("DoTestSendHTML").''; + } + } + + print '
    '; + + + if (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) { + $text = $langs->trans("WarningPHPMail"); + print info_admin($text); + } + + // Run the test to connect + if ($action == 'testconnect') { + print '
    '; + print load_fiche_titre($langs->trans("DoTestServerAvailability")); + + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + + $result = $mail->check_server_port($server, $port); + if ($result) { + print '
    '.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
    '; + } else { + $errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port); + + if ($mail->error) { + $errormsg .= ' - '.$mail->error; + } + + setEventMessages($errormsg, null, 'errors'); + } + print '
    '; + } + + // Show email send test form + if ($action == 'test' || $action == 'testhtml') { + print '
    '; + print load_fiche_titre($action == 'testhtml' ? $langs->trans("DoTestSendHTML") : $langs->trans("DoTestSend")); + + print dol_get_fiche_head(array(), '', '', -1); + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); + $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); + $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); + $formmail->fromid = $user->id; + $formmail->fromalsorobot = 1; + $formmail->withfromreadonly = 0; + $formmail->withsubstit = 0; + $formmail->withfrom = 1; + $formmail->witherrorsto = 1; + $formmail->withto = (GETPOSTISSET('sendto') ? GETPOST('sendto', 'restricthtml') : ($user->email ? $user->email : 1)); + $formmail->withtocc = (GETPOSTISSET('sendtocc') ? GETPOST('sendtocc', 'restricthtml') : 1); + $formmail->withtoccc = (GETPOSTISSET('sendtoccc') ? GETPOST('sendtoccc', 'restricthtml') : 1); + $formmail->withtopic = (GETPOSTISSET('subject') ? GETPOST('subject') : $langs->trans("Test")); + $formmail->withtopicreadonly = 0; + $formmail->withfile = 2; + $formmail->withbody = (GETPOSTISSET('message') ? GETPOST('message', 'restricthtml') : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"))); + $formmail->withbodyreadonly = 0; + $formmail->withcancel = 1; + $formmail->withdeliveryreceipt = 1; + $formmail->withfckeditor = ($action == 'testhtml' ? 1 : 0); + $formmail->ckeditortoolbar = 'dolibarr_mailings'; + // Tableau des substitutions + $formmail->substit = $substitutionarrayfortest; + // Tableau des parameters complementaires du post + $formmail->param["action"] = "send"; + $formmail->param["models"] = "body"; + $formmail->param["mailid"] = 0; + $formmail->param["returnurl"] = $_SERVER["PHP_SELF"]; + + // Init list of files + if (GETPOST("mode", "aZ09") == 'init') { + $formmail->clear_attached_files(); + } + + print $formmail->get_form('addfile', 'removefile'); + + print dol_get_fiche_end(); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index 99f7c1f6b8200..7bdb3a6af6d6d 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -137,11 +137,11 @@ if (!getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')) { $conf->global->MAIN_MAIL_SENDMODE_TICKET = 'default'; } -$port = getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET') ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ini_get('smtp_port'); +$port = getDolGlobalInt('MAIN_MAIL_SMTP_PORT_TICKET', ini_get('smtp_port')); if (!$port) { $port = 25; } -$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ini_get('SMTP'); +$server = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET', ini_get('SMTP')); if (!$server) { $server = '127.0.0.1'; } @@ -197,7 +197,15 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_TLS_TICKET").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val(0); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").prop("disabled", true); - jQuery(".smtp_method").hide(); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").val(0); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_TICKET").prop("disabled", true); + jQuery(".smtp_method").hide(); + jQuery(".dkim").hide(); jQuery(".smtp_auth_method").hide(); '; if ($linuxlike) { @@ -225,13 +233,24 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_TLS_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET').'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET').'); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_TICKET").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_TICKET").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_TICKET").hide(); jQuery("#MAIN_MAIL_SMTP_SERVER_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_TICKET").show(); jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").show(); jQuery("#smtp_server_mess").hide(); - jQuery("#smtp_port_mess").hide(); - jQuery(".smtp_method").show(); + jQuery("#smtp_port_mess").hide(); + jQuery(".smtp_method").show(); + jQuery(".dkim").hide(); jQuery(".smtp_auth_method").show(); } if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'swiftmailer\') @@ -242,29 +261,47 @@ function initfields() jQuery("#MAIN_MAIL_EMAIL_TLS_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET').'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_TICKET").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").val(' . getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET').'); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").val(0); + jQuery("#MAIN_MAIL_EMAIL_DKIM_ENABLED_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_TICKET").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_DKIM_DOMAIN_TICKET").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_SELECTOR_TICKET").hide(); + jQuery("#MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY_TICKET").hide(); jQuery("#MAIN_MAIL_SMTP_SERVER_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_TICKET").show(); jQuery("#MAIN_MAIL_SMTP_PORT_TICKET").show(); jQuery("#smtp_server_mess").hide(); jQuery("#smtp_port_mess").hide(); - jQuery(".smtp_method").show(); - jQuery(".smtp_auth_method").show(); + jQuery(".smtp_method").show(); + jQuery(".dkim").show(); + jQuery(".smtp_auth_method").show(); } } function change_smtp_auth_method() { - console.log("Call smtp auth method"); - if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'smtps\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'swiftmailer\' && jQuery("#radio_oauth").prop("checked")) { - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").show(); - } else if(jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'mail\'){ - jQuery(".smtp_pw").hide(); - jQuery(".smtp_oauth_service").hide(); + console.log("Call smtp auth method "+jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()); + if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'smtps\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } + } else if (jQuery("#MAIN_MAIL_SENDMODE_TICKET").val()==\'swiftmailer\') { + if (jQuery("#radio_oauth").prop("checked")) { + jQuery(".smtp_pw").hide(); + jQuery(".smtp_oauth_service").show(); + } else { + jQuery(".smtp_pw").show(); + jQuery(".smtp_oauth_service").hide(); + } } else { - jQuery(".smtp_pw").show(); + jQuery(".smtp_pw").hide(); jQuery(".smtp_oauth_service").hide(); } } @@ -391,7 +428,7 @@ function change_smtp_auth_method() { // AUTH method if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { - print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; + print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET'; if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) @@ -466,7 +503,6 @@ function change_smtp_auth_method() { } // TLS - print ''.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { @@ -480,7 +516,6 @@ function change_smtp_auth_method() { print ''; // STARTTLS - print ''.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { @@ -581,7 +616,7 @@ function change_smtp_auth_method() { if (empty($text)) { $text = $langs->trans("Undefined").img_warning(); } - print ''.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET").''.$text.''; + print ''.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''.$text.''; } // TLS @@ -646,8 +681,7 @@ function change_smtp_auth_method() { print '
    '; /* // Warning 1 - if ($linuxlike) - { + if ($linuxlike) { $sendmailoption=ini_get('mail.force_extra_parameters'); if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption)) { diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index e3dbad0487ef5..5b5d443b87295 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -2092,9 +2092,16 @@ function email_admin_prepare_head() $head[$h][2] = 'common_ticket'; $h++; } + + if (getDolGlobalString('MAIN_MAIL_ALLOW_CUSTOM_SENDING_METHOD_FOR_PASSWORD_RESET')) { + $head[$h][0] = DOL_URL_ROOT."/admin/mails_passwordreset.php"; + $head[$h][1] = $langs->trans("OutGoingEmailSetupForEmailing", $langs->transnoentitiesnoconv("PasswordReset")); + $head[$h][2] = 'common_passwordreset'; + $h++; + } } - // admin and non admin can view this menu entry, but it is not shown yet when we on user menu "Email templates" + // Admin and non admin can view this menu entry, but it is not shown yet when we on user menu "Email templates" if (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates') { $head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php"; $head[$h][1] = $langs->trans("EmailSenderProfiles"); diff --git a/htdocs/core/tpl/formlayoutai.tpl.php b/htdocs/core/tpl/formlayoutai.tpl.php index 4bf63094bfa75..8cf9f934d32ca 100644 --- a/htdocs/core/tpl/formlayoutai.tpl.php +++ b/htdocs/core/tpl/formlayoutai.tpl.php @@ -92,9 +92,13 @@ } else { $out .= $formmail->getModelEmailTemplate($htmlname); } +} else { + $out .= ''; } if ($showlinktoai) { $out .= $formmail->getSectionForAIPrompt($showlinktoai, $formmail->withaiprompt, $htmlname); +} else { + $out .= ''; } ?> diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 7bee7f74343b1..1e82b31a5d19d 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -174,7 +174,7 @@ NoContactWithCategoryFound=No category found linked to some contacts/addresses NoContactLinkedToThirdpartieWithCategoryFound=No category found linked to some thirdparties OutGoingEmailSetup=Outgoing emails InGoingEmailSetup=Incoming emails -OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +OutGoingEmailSetupForEmailing=Outgoing emails (%s) DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter @@ -196,4 +196,5 @@ ModelTemplate=Email template YouCanChooseAModelForYouMailContent= You can choose one of template models or generate one with AI TitleOfMailHolder=Title of the e-mail goes here ContentOfMailHolder=Content of email goes here... -LastNews=Last News \ No newline at end of file +LastNews=Last News +PasswordReset=Password reset From f82eabbab7601de8de17c37f7f3c2ead9617c92d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 10:48:17 +0200 Subject: [PATCH 075/127] FIX #30513 FIX #30515 --- .../install/mysql/migration/19.0.0-20.0.0.sql | 22 +++++++++---------- htdocs/install/mysql/tables/llx_menu.key.sql | 6 ++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql index ff150c92c7ca5..f0696fba61d16 100644 --- a/htdocs/install/mysql/migration/19.0.0-20.0.0.sql +++ b/htdocs/install/mysql/migration/19.0.0-20.0.0.sql @@ -370,15 +370,15 @@ UPDATE llx_mrp_production SET disable_stock_change = 0 WHERE disable_stock_chang ALTER TABLE llx_socpeople ADD COLUMN url varchar(255); --- knowledgemanagement module -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_CREATE','Knowledgerecord created','Executed when a knowledgerecord is created','knowledgemanagement',57001); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_MODIFY','Knowledgerecord modified','Executed when a knowledgerecord is modified','knowledgemanagement',57002); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_VALIDATE','Knowledgerecord Evaluation validated','Executed when an evaluation is validated','knowledgemanagement',57004); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_REOPEN','Knowledgerecord reopen','Executed when an evaluation is back to draft','knowledgemanagement',57004); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_UNVALIDATE','Knowledgerecord unvalidated','Executed when an evaluation is back to draft','knowledgemanagement',57004); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_CANCEL','Knowledgerecord cancel','Executed when an evaluation to cancel','knowledgemanagement',57004); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_SENTBYMAIL','Mails sent from knowledgerecord file','knowledgerecord when you send email from knowledgerecord file','knowledgemanagement',57004); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_DELETE','Knowledgerecord deleted','Executed when a knowledgerecord is deleted','knowledgemanagement',57006); +-- knowledge management module +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_CREATE','Knowledge article created','Executed when a article is created','knowledgemanagement',57001); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_MODIFY','Knowledge article modified','Executed when a article is modified','knowledgemanagement',57002); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_VALIDATE','Knowledge article Evaluation validated','Executed when an evaluation is validated','knowledgemanagement',57004); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_REOPEN','Knowledge article reopen','Executed when an evaluation is back to draft','knowledgemanagement',57004); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_UNVALIDATE','Knowledge article invalidated','Executed when an evaluation is back to draft','knowledgemanagement',57004); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_CANCEL','Knowledge article cancel','Executed when an evaluation to cancel','knowledgemanagement',57004); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_SENTBYMAIL','Mails sent from article file','article when you send email from article file','knowledgemanagement',57004); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('KNOWLEDGERECORD_DELETE','Knowledge article deleted','Executed when a article is deleted','knowledgemanagement',57006); -- table chargesociales indexes ALTER TABLE llx_chargesociales ADD INDEX idx_chargesociales_fk_type (fk_type); @@ -404,10 +404,10 @@ INSERT INTO llx_c_revenuestamp(rowid,fk_pays,taux,revenuestamp_type,note,active) ALTER TABLE llx_hrm_evaluation ADD COLUMN entity INTEGER DEFAULT 1 NOT NULL; --- Erreur SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length +-- Error SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length, so we remove completely the unique key ALTER TABLE llx_menu DROP INDEX idx_menu_uk_menu; ALTER TABLE llx_menu MODIFY COLUMN url TEXT NOT NULL; -ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity); +--ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity, url); UPDATE llx_c_units SET short_label = 'mn' WHERE short_label = 'i' AND code = 'MI'; diff --git a/htdocs/install/mysql/tables/llx_menu.key.sql b/htdocs/install/mysql/tables/llx_menu.key.sql index 6380a947737bb..4de7b3217e7dc 100644 --- a/htdocs/install/mysql/tables/llx_menu.key.sql +++ b/htdocs/install/mysql/tables/llx_menu.key.sql @@ -21,7 +21,5 @@ ALTER TABLE llx_menu ADD INDEX idx_menu_menuhandler_type (menu_handler, type); --- Erreur SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length - --- ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, url, entity); -ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity); +-- Error SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length, so we removed completely the unique key +-- ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity, url); From 6210c2429a229e8a314a8d022940e0c80d061087 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 10:50:52 +0200 Subject: [PATCH 076/127] Fix phan --- htdocs/variants/class/ProductAttribute.class.php | 2 +- .../variants/class/ProductCombination2ValuePair.class.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index eebf1255699d1..821b3e2da3edb 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -371,7 +371,7 @@ public function fetchAll() * * @param User $user User who updates the attribute * @param int $notrigger 1 = Do not execute trigger (0 by default) - * @return int <0 if KO, 1 if OK + * @return int Return <0 if KO, 1 if OK */ public function update(User $user, $notrigger = 0) { diff --git a/htdocs/variants/class/ProductCombination2ValuePair.class.php b/htdocs/variants/class/ProductCombination2ValuePair.class.php index 2d7b7c6731445..c140dfc3a934f 100644 --- a/htdocs/variants/class/ProductCombination2ValuePair.class.php +++ b/htdocs/variants/class/ProductCombination2ValuePair.class.php @@ -118,7 +118,7 @@ public function __toString() * Create a ProductCombination2ValuePair * * @param User $user User that creates //not used - * @return int<-1,1> 1 if OK, -1 if KO + * @return int Return 1 if OK, -1 if KO */ public function create($user) { @@ -141,7 +141,7 @@ public function create($user) * Retrieve all ProductCombination2ValuePair linked to a given ProductCombination ID. * * @param int $fk_combination ID of the ProductCombination - * @return -1|ProductCombination2ValuePair[] -1 if KO, array of ProductCombination2ValuePair if OK + * @return -1|ProductCombination2ValuePair[] Return <0 if KO, array of ProductCombination2ValuePair if OK */ public function fetchByFkCombination($fk_combination) { @@ -180,7 +180,7 @@ public function fetchByFkCombination($fk_combination) * Delete all ProductCombination2ValuePair linked to a given ProductCombination ID. * * @param int $fk_combination ID of the ProductCombination - * @return int<-1|1> -1 if KO, 1 if OK + * @return int Return <0 if KO, 1 if OK */ public function deleteByFkCombination($fk_combination) { From 173dc1a70ebeae0f6846138304a1601c5359af5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 1 Aug 2024 10:52:53 +0200 Subject: [PATCH 077/127] fix constructor expects int (#30512) * constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int * fix constructor expects int --------- Co-authored-by: Laurent Destailleur --- htdocs/admin/mails.php | 2 +- htdocs/admin/mails_emailing.php | 3 +- htdocs/admin/mails_passwordreset.php | 3 +- htdocs/admin/mails_ticket.php | 3 +- htdocs/contrat/card.php | 6 ++-- htdocs/core/class/CMailFile.class.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- .../modules/commande/mod_commande_saphir.php | 2 +- .../expedition/mod_expedition_ribera.php | 2 +- .../holiday/mod_holiday_immaculate.php | 2 +- htdocs/core/modules/mrp/mod_mo_advanced.php | 2 +- htdocs/modulebuilder/index.php | 36 +++++++++---------- htdocs/resource/card.php | 3 +- .../variants/class/ProductAttribute.class.php | 4 +-- .../ProductCombination2ValuePair.class.php | 5 +-- htdocs/website/index.php | 18 +++++----- phpstan.neon.dist | 2 +- 17 files changed, 51 insertions(+), 46 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 44fffd6a7ccc7..4700f8a6b0570 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -1099,7 +1099,7 @@ function change_smtp_auth_method() { print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, 0, '', '', '', $trackid, $sendcontext); $result = $mail->check_server_port($server, $port); if ($result) { print '
    '.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
    '; diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 024d07537aaff..dd06c7312fb16 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -3,6 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU + * 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 @@ -736,7 +737,7 @@ function change_smtp_auth_method() { print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, 0, '', '', '', $trackid, $sendcontext); $result = $mail->check_server_port($server, $port); if ($result) { diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 3316f2789443e..3d2a03a0ce3eb 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -3,6 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU + * 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 @@ -732,7 +733,7 @@ function change_smtp_auth_method() { print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, 0, '', '', '', $trackid, $sendcontext); $result = $mail->check_server_port($server, $port); if ($result) { diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index 7bdb3a6af6d6d..ada31abd8859c 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -3,6 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU + * 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 @@ -729,7 +730,7 @@ function change_smtp_auth_method() { print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, 0, '', '', '', $trackid, $sendcontext); $result = $mail->check_server_port($server, $port); if ($result) { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 60cb2472b0b2b..1ee62de8a8639 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -9,7 +9,7 @@ * Copyright (C) 2014-2020 Ferran Marcet * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018-2021 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2023 Charlene Benke * Copyright (C) 2023 Nick Fragoulis * Copyright (C) 2024 MDW @@ -1265,13 +1265,13 @@ } print ''.$langs->trans("NotePublic").''; - $doleditor = new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 100, 'dolibarr_notes', 'In', 1, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ''; if (empty($user->socid)) { print ''.$langs->trans("NotePrivate").''; - $doleditor = new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 100, 'dolibarr_notes', 'In', 1, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ''; } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index fe7a55540ebd7..2e784dca7f9d1 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1206,7 +1206,7 @@ public function sendfile() $secure = 'tls'; } - $this->transport = new Swift_SmtpTransport($server, getDolGlobalString($keyforsmtpport), $secure); + $this->transport = new Swift_SmtpTransport($server, getDolGlobalInt($keyforsmtpport), $secure); if (getDolGlobalString($keyforsmtpid)) { $this->transport->setUsername($conf->global->$keyforsmtpid); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b0350efa5c850..20d566a20cd90 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -317,7 +317,7 @@ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofda } elseif (preg_match('/^ckeditor/', $typeofdata)) { $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($htmlname, ($editvalue ? $editvalue : $value), (empty($tmp[2]) ? '' : $tmp[2]), (empty($tmp[3]) ? '100' : $tmp[3]), (empty($tmp[1]) ? 'dolibarr_notes' : $tmp[1]), 'In', (empty($tmp[5]) ? 0 : $tmp[5]), (isset($tmp[8]) ? ($tmp[8] ? true : false) : true), true, (empty($tmp[6]) ? '20' : $tmp[6]), (empty($tmp[7]) ? '100' : $tmp[7])); + $doleditor = new DolEditor($htmlname, ($editvalue ? $editvalue : $value), (empty($tmp[2]) ? '' : $tmp[2]), (empty($tmp[3]) ? 100 : (int) $tmp[3]), (empty($tmp[1]) ? 'dolibarr_notes' : $tmp[1]), 'In', (empty($tmp[5]) ? 0 : $tmp[5]), (isset($tmp[8]) ? ($tmp[8] ? true : false) : true), true, (empty($tmp[6]) ? 20 : (int) $tmp[6]), (empty($tmp[7]) ? '100' : $tmp[7])); $ret .= $doleditor->Create(1); } elseif ($typeofdata == 'asis') { $ret .= ($editvalue ? $editvalue : $value); diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 9195c56688067..ca1b476eb2458 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -96,7 +96,7 @@ public function info($langs) /** * Return an example of numbering * - * @return string|int<0> Example + * @return string|int<0,0> Example */ public function getExample() { diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 63dcbc3d35b57..192d1a0c0c5a9 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -94,7 +94,7 @@ public function info($langs) /** * Return numbering example * - * @return string|int<0> Example + * @return string|int<0,0> Example */ public function getExample() { diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 8c21fe9376009..5645dfc1e4d7d 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -85,7 +85,7 @@ public function info($langs) /** * Return numbering example * - * @return string|int<0> Example + * @return string|int<0,0> Example */ public function getExample() { diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 4153be8a2e77f..eb147ff2f2abd 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -97,7 +97,7 @@ public function info($langs) /** * Return an example of numbering * - * @return string|int<0> Example + * @return string|int<0,0> Example */ public function getExample() { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 599c9f5b6363f..8ac8cd4c2c89b 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -3708,7 +3708,7 @@ print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print dol_get_fiche_end(); @@ -3788,7 +3788,7 @@ print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'text')); print '
    '; print '
    '; @@ -4658,7 +4658,7 @@ function cleanString( stringtoclean ) print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -4700,7 +4700,7 @@ function cleanString( stringtoclean ) print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5052,7 +5052,7 @@ function cleanString( stringtoclean ) print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5487,7 +5487,7 @@ function cleanString( stringtoclean ) print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5738,7 +5738,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5794,7 +5794,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5861,7 +5861,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5907,7 +5907,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -5953,7 +5953,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6005,7 +6005,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6057,7 +6057,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6101,7 +6101,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6181,7 +6181,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6304,7 +6304,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6363,7 +6363,7 @@ function updateInputField() { print ''; print ''; - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%'); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; @@ -6608,7 +6608,7 @@ function updateInputField() { print ''; $posCursor = (empty($find)) ? array() : array('find'=>$find); - $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); + $doleditor = new DolEditor('editfilecontent', $content, '', 300, 'Full', 'In', true, false, 'ace', 0, '99%', 0, $posCursor); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ? GETPOST('format', 'aZ09') : 'html')); print '
    '; print '
    '; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 56c5706bc0911..eb69290711456 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2014 Jean-François Ferry * Copyright (C) 2023-2024 William Mead * 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 @@ -304,7 +305,7 @@ print ''.$langs->trans("Description").''; print ''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('description', ($description ?: $object->description), '', '200', 'dolibarr_notes', false); + $doleditor = new DolEditor('description', ($description ?: $object->description), '', 200, 'dolibarr_notes', false); $doleditor->Create(); print ''; diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 821b3e2da3edb..146db8149e7f2 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2022 Open-Dsi +/* Copyright (C) 2016 Marcos García + * Copyright (C) 2022 Open-Dsi * Copyright (C) 2023-2024 Frédéric France * Copyright (C) 2024 MDW * diff --git a/htdocs/variants/class/ProductCombination2ValuePair.class.php b/htdocs/variants/class/ProductCombination2ValuePair.class.php index c140dfc3a934f..5684fcff9a2cc 100644 --- a/htdocs/variants/class/ProductCombination2ValuePair.class.php +++ b/htdocs/variants/class/ProductCombination2ValuePair.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2022 Open-Dsi +/* Copyright (C) 2016 Marcos García + * Copyright (C) 2022 Open-Dsi + * 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 diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 5c9fc327241c0..932e6c80cab4a 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3973,7 +3973,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_CSS_INLINE_x'), 'y' => GETPOST('WEBSITE_CSS_INLINE_y')); - $doleditor = new DolEditor('WEBSITE_CSS_INLINE', $csscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_CSS_INLINE', $csscontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, 'CSS', 'css'); print ''; @@ -3987,7 +3987,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_JS_INLINE_x'), 'y' => GETPOST('WEBSITE_JS_INLINE_y')); - $doleditor = new DolEditor('WEBSITE_JS_INLINE', $jscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_JS_INLINE', $jscontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, 'JS', 'javascript'); print ''; @@ -4003,7 +4003,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_HTML_HEADER_x'), 'y' => GETPOST('WEBSITE_HTML_HEADER_y')); - $doleditor = new DolEditor('WEBSITE_HTML_HEADER', $htmlheadercontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_HTML_HEADER', $htmlheadercontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, 'HTML Header', 'html'); print ''; @@ -4014,7 +4014,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_ROBOT_x'), 'y' => GETPOST('WEBSITE_ROBOT_y')); - $doleditor = new DolEditor('WEBSITE_ROBOT', $robotcontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_ROBOT', $robotcontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, 'Robot file', 'text'); print ''; @@ -4025,7 +4025,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_HTACCESS_x'), 'y' => GETPOST('WEBSITE_HTACCESS_y')); - $doleditor = new DolEditor('WEBSITE_HTACCESS', $htaccesscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_HTACCESS', $htaccesscontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, $langs->trans("File").' .htaccess', 'text'); print ''; @@ -4039,7 +4039,7 @@ function switchEditorOnline(forceenable) print $langs->trans("UseManifest").': '.$form->selectyesno('use_manifest', $website->use_manifest, 1).'
    '; $poscursor = array('x' => GETPOST('WEBSITE_MANIFEST_JSON_x'), 'y' => GETPOST('WEBSITE_MANIFEST_JSON_y')); - $doleditor = new DolEditor('WEBSITE_MANIFEST_JSON', $manifestjsoncontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_MANIFEST_JSON', $manifestjsoncontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, $langs->trans("File").' manifest.json', 'text'); print ''; @@ -4050,7 +4050,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_README_x'), 'y' => GETPOST('WEBSITE_README_y')); - $doleditor = new DolEditor('WEBSITE_README', $readmecontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_README', $readmecontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, $langs->trans("File").' README.md', 'text'); print ''; @@ -4062,7 +4062,7 @@ function switchEditorOnline(forceenable) print ''; $poscursor = array('x' => GETPOST('WEBSITE_LICENSE_x'), 'y' => GETPOST('WEBSITE_LICENSE_y')); - $doleditor = new DolEditor('WEBSITE_LICENSE', $licensecontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '', $poscursor); + $doleditor = new DolEditor('WEBSITE_LICENSE', $licensecontent, '', 220, 'ace', 'In', true, false, 'ace', 0, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, $langs->trans("File").' LICENSE', 'text'); print ''; @@ -4732,7 +4732,7 @@ function switchEditorOnline(forceenable) print $form->textwithpicto($langs->trans('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); print ''; $poscursor = array('x' => GETPOST('htmlheader_x'), 'y' => GETPOST('htmlheader_y')); - $doleditor = new DolEditor('htmlheader', $pagehtmlheader, '', '120', 'ace', 'In', true, false, 'ace', ROWS_3, '100%', '', $poscursor); + $doleditor = new DolEditor('htmlheader', $pagehtmlheader, '', 120, 'ace', 'In', true, false, 'ace', ROWS_3, '100%', 0, $poscursor); print $doleditor->Create(1, '', true, 'HTML Header', 'html'); print ''; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cf170c6ca1c0b..07524a8b99a4a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -82,7 +82,7 @@ parameters: - '#get.* expects int, string#' - '#send.* expects int, string#' - '#convert.* expects int, string#' - - '#constructor expects int, string#' + #- '#constructor expects int, string#' - '#\(\) expects int, string#' - '#run_sql expects int, string#' - '#expects int, float#' From 63aab818e6d0404145706e7423afdca6af140319 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 1 Aug 2024 11:09:26 +0200 Subject: [PATCH 078/127] Qual: Fixes related to CMailFile for phan notices (#30510) * Qual: Fix CMailFile related phan notices # Qual: Fix CMailFile related phan notices Fix several phan notices by typing and typing checks. * Fix initialisation of CMailFile instantiation * Update phan baseline * Update mails_emailing.php * Update mails_emailing.php --------- Co-authored-by: Laurent Destailleur --- dev/tools/phan/baseline.txt | 38 +++----- htdocs/admin/mails.php | 2 +- htdocs/admin/mails_emailing.php | 8 +- htdocs/admin/mails_passwordreset.php | 10 +-- htdocs/admin/mails_ticket.php | 10 +-- htdocs/core/class/CMailFile.class.php | 125 ++++++++++++++++++-------- 6 files changed, 116 insertions(+), 77 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index ae4a72ac072e7..44143cc402d20 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,12 +9,12 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 2090+ occurrences + // PhanPluginUnknownPropertyType : 2060+ occurrences // PhanPossiblyUndeclaredGlobalVariable : 1350+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 1270+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 1230+ occurrences // PhanPluginUnknownObjectMethodCall : 1060+ occurrences // PhanUndeclaredProperty : 920+ occurrences - // PhanPluginUnknownArrayMethodParamType : 760+ occurrences + // PhanPluginUnknownArrayMethodParamType : 750+ occurrences // PhanUndeclaredGlobalVariable : 730+ occurrences // PhanPluginUnknownArrayMethodReturnType : 610+ occurrences // PhanPossiblyUndeclaredVariable : 410+ occurrences @@ -24,11 +24,10 @@ return [ // PhanTypeMismatchArgumentNullableInternal : 160+ occurrences // PhanTypeExpectedObjectPropAccess : 150+ occurrences // PhanTypeInvalidLeftOperandOfNumericOp : 130+ occurrences - // PhanPluginSimplifyExpressionBool : 120+ occurrences // PhanUndeclaredMethod : 120+ occurrences // PhanPluginEmptyStatementIf : 65+ occurrences // PhanRedefineFunction : 55+ occurrences - // PhanTypeMismatchDimFetch : 55+ occurrences + // PhanTypeMismatchDimFetch : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 35+ occurrences // PhanPossiblyNullTypeMismatchProperty : 25+ occurrences // PhanEmptyForeach : 20+ occurrences @@ -58,8 +57,7 @@ return [ // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ 'htdocs/accountancy/admin/productaccount.php' => ['PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/accountancy/bookkeeping/card.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/accountancy/bookkeeping/export.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/bookkeeping/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/bookkeeping/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/bookkeeping/listbyaccount.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], @@ -72,7 +70,7 @@ return [ 'htdocs/accountancy/customer/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/journal/bankjournal.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/expensereportsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/variousjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/supplier/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -84,7 +82,7 @@ return [ 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/class/adherent_type.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/class/adherentstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], - 'htdocs/adherents/class/api_members.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/adherents/class/api_members.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/adherents/class/api_subscriptions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/adherents/class/subscription.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], 'htdocs/adherents/list.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -132,11 +130,9 @@ return [ 'htdocs/admin/ldap_users.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/loan.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mailman.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/mails.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/mails_emailing.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/mails.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/admin/mails_senderprofile_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/mails_templates.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/mails_ticket.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/menus.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/menus/edit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], 'htdocs/admin/modulehelp.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], @@ -180,8 +176,8 @@ return [ 'htdocs/admin/website.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/api/class/api.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], + 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_setup.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], @@ -198,7 +194,6 @@ return [ 'htdocs/asset/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/model/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/tpl/accountancy_codes_view.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'], @@ -249,7 +244,7 @@ return [ 'htdocs/comm/action/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], 'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/comm/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -286,14 +281,13 @@ return [ 'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/compta/bank/graph.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/line.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/bank/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/releve.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/bank/transfer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/treso.php' => ['PhanTypeMismatchProperty'], 'htdocs/compta/bank/various_payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/charges/index.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanTypeMismatchArgumentNullableInternal'], @@ -476,7 +470,6 @@ return [ 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/class/CMailFile.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], 'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -593,9 +586,7 @@ return [ 'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/usergroups.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/website.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/ws.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/login/functions_ldap.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], 'htdocs/core/menus/standard/auguria_menu.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanRedefineClass'], 'htdocs/core/menus/standard/eldy.lib.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable'], @@ -787,11 +778,10 @@ return [ 'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/cron/class/cronjob.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/cron/class/cronjob.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/datapolicy/class/datapolicy.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/dav/fileserver.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/debugbar/class/DataCollector/DolConfigCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolLogsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanRedefinedClassReference'], @@ -1126,7 +1116,7 @@ return [ 'htdocs/public/members/public_card.php' => ['PhanRedefineFunction'], 'htdocs/public/members/public_list.php' => ['PhanRedefineFunction'], 'htdocs/public/onlinesign/newonlinesign.php' => ['PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/public/partnership/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], 'htdocs/public/payment/newpayment.php' => ['PhanPluginDuplicateExpressionAssignmentOperation', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidLeftOperandOfNumericOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 4700f8a6b0570..a35c1a53cac73 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -63,7 +63,7 @@ //'__ZIP__'=> $langs->trans("Zip").' ('.$langs->trans("Recipient").')', //'__TOWN_'=> $langs->trans("Town").' ('.$langs->trans("Recipient").')', //'__COUNTRY__'=> $langs->trans("Country").' ('.$langs->trans("Recipient").')', - '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, + '__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, '__CHECK_READ__' => '', ); complete_substitutions_array($substitutionarrayfortest, $langs); diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index dd06c7312fb16..6cd69e2c9f1fd 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -50,10 +50,10 @@ //'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails '__LASTNAME__' => 'RecipientLastname', '__FIRSTNAME__' => 'RecipientFirstname', - '__ADDRESS__'=> 'RecipientAddress', - '__ZIP__'=> 'RecipientZip', - '__TOWN_'=> 'RecipientTown', - '__COUNTRY__'=> 'RecipientCountry', + '__ADDRESS__' => 'RecipientAddress', + '__ZIP__' => 'RecipientZip', + '__TOWN_' => 'RecipientTown', + '__COUNTRY__' => 'RecipientCountry', '__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, '__CHECK_READ__' => '' ); diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 3d2a03a0ce3eb..27754f5845b1e 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -49,11 +49,11 @@ '__SENDEREMAIL_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails '__LASTNAME__' => 'RecipientLastname', '__FIRSTNAME__' => 'RecipientFirstname', - '__ADDRESS__'=> 'RecipientAddress', - '__ZIP__'=> 'RecipientZip', - '__TOWN_'=> 'RecipientTown', - '__COUNTRY__'=> 'RecipientCountry', - '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, + '__ADDRESS__' => 'RecipientAddress', + '__ZIP__' => 'RecipientZip', + '__TOWN_' => 'RecipientTown', + '__COUNTRY__' => 'RecipientCountry', + '__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, ); complete_substitutions_array($substitutionarrayfortest, $langs); diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index ada31abd8859c..e06f12a9589ec 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -49,11 +49,11 @@ '__SENDEREMAIL_SIGNATURE__' => (($user->signature && !getDolGlobalString('MAIN_MAIL_DO_NOT_USE_SIGN')) ? $usersignature : ''), // Done into actions_sendmails '__LASTNAME__' => 'RecipientLastname', '__FIRSTNAME__' => 'RecipientFirstname', - '__ADDRESS__'=> 'RecipientAddress', - '__ZIP__'=> 'RecipientZip', - '__TOWN_'=> 'RecipientTown', - '__COUNTRY__'=> 'RecipientCountry', - '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, + '__ADDRESS__' => 'RecipientAddress', + '__ZIP__' => 'RecipientZip', + '__TOWN_' => 'RecipientTown', + '__COUNTRY__' => 'RecipientCountry', + '__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, ); complete_substitutions_array($substitutionarrayfortest, $langs); diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 2e784dca7f9d1..81253c5a78f1e 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -34,7 +34,6 @@ use OAuth\Common\Storage\DoliStorage; use OAuth\Common\Consumer\Credentials; - /** * Class to send emails (with attachments or not) * Usage: $mailfile = new CMailFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to,$css,$trackid,$moreinheader,$sendcontext,$replyto); @@ -42,34 +41,60 @@ */ class CMailFile { + /** @var string Context of mail ('standard', 'emailing', 'ticket', 'password') */ public $sendcontext; + /** @var string Send mode of mail ('mail', 'smtps', 'swiftmailer', ...) */ public $sendmode; + /** + * @var mixed + * @deprecated Seems unused, update if used + */ public $sendsetup; /** * @var string Subject of email */ public $subject; - public $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or ''). Note that with gmail smtps, value here is forced by google to account (but not the reply-to). - // Sender: Who send the email ("Sender" has sent emails on behalf of "From"). - // Use it when the "From" is an email of a domain that is a SPF protected domain, and the sending smtp server is not this domain. In such case, add Sender field with an email of the protected domain. + /** @var string From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or ''). Note that with gmail smtps, value here is forced by google to account (but not the reply-to). */ + /** + * @var string Sender email + * Sender: Who sends the email ("Sender" has sent emails on behalf of "From"). + * Use it when the "From" is an email of a domain that is a SPF protected domain, and the sending smtp server is not this domain. In such case, add Sender field with an email of the protected domain. + */ + public $addr_from; + // Return-Path: Email where to send bounds. - public $reply_to; // Reply-To: Email where to send replies from mailer software (mailer use From if reply-to not defined, Gmail use gmail account if reply-to not defined) - public $errors_to; // Errors-To: Email where to send errors. + + /** @var string Reply-To: Email where to send replies from mailer software (mailer use From if reply-to not defined, Gmail use gmail account if reply-to not defined) */ + public $reply_to; + /** @var string Errors-To: Email where to send errors. */ + public $errors_to; + /** @var string Comma separates list of destination emails */ public $addr_to; + /** @var string Comma separates list of cc emails */ public $addr_cc; + /** @var string Comma separates list of bcc emails */ public $addr_bcc; + /** @var string Tracking code */ public $trackid; + /** @var string Mixed Boundary */ public $mixed_boundary; + /** @var string Related Boundary */ public $related_boundary; + /** @var string Alternative Boundary */ public $alternative_boundary; + /** @var int<0,1> When 1, request delivery receipt */ public $deliveryreceipt; + /** @var ?int<1,1> When 1, there is at least one file */ public $atleastonefile; + /** @var string $msg Message to send */ public $msg; + /** @var string $msg End of line sequence */ public $eol; + /** @var string $msg End of line sequence (header ?) */ public $eol2; /** @@ -102,12 +127,12 @@ class CMailFile public $logger; /** - * @var string CSS + * @var string|array CSS */ public $css; - //! Defined css style for body background + /** @var ?string Defined css style for body background */ public $styleCSS; - //! Defined background directly in body tag + /** @var ?string Defined background directly in body tag */ public $bodyCSS; /** @@ -125,33 +150,44 @@ class CMailFile */ public $references; + /** + * @var string Headers + */ public $headers; + /** + * @var string Message + */ public $message; /** - * @var array fullfilenames list (full path of filename on file system) + * @var ?string[] fullfilenames list (full path of filename on file system) */ public $filename_list = array(); /** - * @var array mimetypes of files list (List of MIME type of attached files) + * @var ?string[] mimetypes of files list (List of MIME type of attached files) */ public $mimetype_list = array(); /** - * @var array filenames list (List of attached file name in message) + * @var ?string[] filenames list (List of attached file name in message) */ public $mimefilename_list = array(); /** - * @var array filenames cid + * @var ?string[] filenames cid */ public $cid_list = array(); - // Image + /** @var string HTML content */ public $html; + /** @var int<0,1> */ public $msgishtml; + /** @var string */ public $image_boundary; + /** @var int<0,1> */ public $atleastoneimage = 0; // at least one image file with file=xxx.ext into content (TODO Debug this. How can this case be tested. Remove if not used). + /** @var array */ public $html_images = array(); + /** @var array */ public $images_encoded = array(); public $image_types = array( 'gif' => 'image/gif', @@ -172,15 +208,15 @@ class CMailFile * @param string $to Recipients emails (RFC 2822: "Name firstname [, ...]" or "email[, ...]" or "[, ...]"). Note: the keyword '__SUPERVISOREMAIL__' is not allowed here and must be replaced by caller. * @param string $from Sender email (RFC 2822: "Name firstname [, ...]" or "email[, ...]" or "[, ...]") * @param string $msg Message - * @param array $filename_list List of files to attach (full path of filename on file system) - * @param array $mimetype_list List of MIME type of attached files - * @param array $mimefilename_list List of attached file name in message + * @param ?string[] $filename_list List of files to attach (full path of filename on file system) + * @param ?string[] $mimetype_list List of MIME type of attached files + * @param ?string[] $mimefilename_list List of attached file name in message * @param string $addr_cc Email cc (Example: 'abc@def.com, ghk@lmn.com') * @param string $addr_bcc Email bcc (Note: This is autocompleted with MAIN_MAIL_AUTOCOPY_TO if defined) - * @param int $deliveryreceipt Ask a delivery receipt - * @param int $msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown make autodetection (with fast mode, not reliable) + * @param int<0,1> $deliveryreceipt Ask a delivery receipt + * @param int<-1,1> $msgishtml 1=String IS already html, 0=String IS NOT html, -1=Unknown make autodetection (with fast mode, not reliable) * @param string $errors_to Email for errors-to - * @param string $css Css option + * @param string|array $css Css option (should be array, legacy: empty string if none) * @param string $trackid Tracking string (contains type and id of related element) * @param string $moreinheader More in header. $moreinheader must contains the "\r\n" at end of each line * @param string $sendcontext 'standard', 'emailing', 'ticket', 'password', ... (used to define which sending mode and parameters to use) @@ -617,7 +653,9 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() $this->msgid = time().'.swiftmailer-dolibarr-'.$this->trackid.'@'.$host; $headerID = $this->msgid; $msgid = $headers->get('Message-ID'); - $msgid->setId($headerID); + if ($msgid instanceof Swift_Mime_Headers_IdentificationHeader) { + $msgid->setId($headerID); + } // Add 'In-Reply-To:' header if (!empty($this->in_reply_to)) { @@ -1102,9 +1140,14 @@ public function sendfile() $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); // We have to save the token because Google give it only once $refreshtoken = $tokenobj->getRefreshToken(); - $tokenobj = $apiService->refreshAccessToken($tokenobj); - $tokenobj->setRefreshToken($refreshtoken); - $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + if ($apiService instanceof OAuth\OAuth2\Service\AbstractService + || $apiService instanceof OAuth\OAuth1\Service\AbstractService + ) { + // ServiceInterface does not provide refreshAccessToekn, AbstractService does + $tokenobj = $apiService->refreshAccessToken($tokenobj); + $tokenobj->setRefreshToken($refreshtoken); + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + } } $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); @@ -1257,11 +1300,16 @@ public function sendfile() $oauthname = explode('-', $OAUTH_SERVICENAME); // ex service is Google-Emails we need only the first part Google $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); - // We have to save the token because Google give it only once $refreshtoken = $tokenobj->getRefreshToken(); - $tokenobj = $apiService->refreshAccessToken($tokenobj); - $tokenobj->setRefreshToken($refreshtoken); - $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + if ($apiService instanceof OAuth\OAuth2\Service\AbstractService + || $apiService instanceof OAuth\OAuth1\Service\AbstractService + ) { + // ServiceInterface does not provide refreshAccessToekn, AbstractService does + // We must save the token because Google provides it only once + $tokenobj = $apiService->refreshAccessToken($tokenobj); + $tokenobj->setRefreshToken($refreshtoken); + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + } } if (is_object($tokenobj)) { $this->transport->setAuthMode('XOAUTH2'); @@ -1340,11 +1388,13 @@ public function sendfile() } // Now we delete image files that were created dynamically to manage data inline files + /* Note: dol_delete call was disabled, so code commented to not trigger empty if body foreach ($this->html_images as $val) { if (!empty($val['type']) && $val['type'] == 'cidfromdata') { //dol_delete($val['fullpath']); } } + */ $parameters = array('sent' => $res); $action = ''; @@ -1619,8 +1669,8 @@ public function write_smtpheaders() /** * Create header MIME (mode = 'mail') * - * @param array $filename_list Array of filenames - * @param array $mimefilename_list Array of mime types + * @param string[] $filename_list Array of filenames + * @param string[] $mimefilename_list Array of mime types * @return string mime headers */ public function write_mimeheaders($filename_list, $mimefilename_list) @@ -1742,10 +1792,10 @@ public function write_body($msgtext) /** * Attach file to email (mode = 'mail') * - * @param array $filename_list Tableau - * @param array $mimetype_list Tableau - * @param array $mimefilename_list Tableau - * @param array $cidlist Array of CID if file must be completed with CID code + * @param string[] $filename_list Tableau + * @param string[] $mimetype_list Tableau + * @param string[] $mimefilename_list Tableau + * @param string[] $cidlist Array of CID if file must be completed with CID code * @return string|int String with files encoded */ private function write_files($filename_list, $mimetype_list, $mimefilename_list, $cidlist) @@ -1793,7 +1843,7 @@ private function write_files($filename_list, $mimetype_list, $mimefilename_list, /** * Attach an image to email (mode = 'mail') * - * @param array $images_list Array of array image + * @param array $images_list Array of array image * @return string Chaine images encodees */ public function write_images($images_list) @@ -1994,7 +2044,6 @@ private function findHtmlImages($images_dir) $regs = array(); preg_match('/([A-Za-z0-9_-]+[\.]?[A-Za-z0-9]+)?$/i', $img["name"], $regs); $imgName = $regs[1]; - $this->images_encoded[$i]['name'] = $imgName; $this->images_encoded[$i]['fullpath'] = $fullpath; $this->images_encoded[$i]['content_type'] = $img["content_type"]; @@ -2188,8 +2237,8 @@ public static function getValidAddress($address, $format, $encode = 0, $maxnumbe /** * Return a formatted array of address string for SMTP protocol * - * @param string $address Example: 'John Doe , Alan Smith ' or 'john@doe.com, alan@smith.com' - * @return array array(email => name) + * @param string $address Example: 'John Doe , Alan Smith ' or 'john@doe.com, alan@smith.com' + * @return array array(email => name) * @see getValidAddress() */ public static function getArrayAddress($address) From 2efb14c7670f7fd91d67c2570f3a2b4bd2cac6ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 11:35:42 +0200 Subject: [PATCH 079/127] Debug v20 - Fix use of oauth for alternative send email setup --- htdocs/core/class/CMailFile.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index fe7a55540ebd7..412801837a488 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -208,7 +208,7 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() $this->sendcontext = $sendcontext; - // Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'password') + // Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'passwordreset') $this->sendmode = ''; if (!empty($this->sendcontext)) { $smtpContextKey = strtoupper($this->sendcontext); @@ -1092,9 +1092,9 @@ public function sendfile() // Token expired so we refresh it if (is_object($tokenobj) && $expire) { $credentials = new Credentials( - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE') + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE') ); $serviceFactory = new \OAuth\ServiceFactory(); $oauthname = explode('-', $OAUTH_SERVICENAME); @@ -1249,9 +1249,9 @@ public function sendfile() // Token expired so we refresh it if (is_object($tokenobj) && $expire) { $credentials = new Credentials( - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE') + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE') ); $serviceFactory = new \OAuth\ServiceFactory(); $oauthname = explode('-', $OAUTH_SERVICENAME); From 46cde6431ac8eb72b8ccf3b1592a787edca26fbf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 11:36:21 +0200 Subject: [PATCH 080/127] NEW Can use a specific profile to send email for password forgotten --- htdocs/admin/mails.php | 2 +- htdocs/user/class/user.class.php | 2 +- htdocs/user/passwordforgotten.php | 2 +- test/phpunit/CodingPhpTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 44fffd6a7ccc7..5137b6f5487b2 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -138,7 +138,7 @@ $paramname = 'id'; $mode = 'emailfortest'; $trackid = ($action == 'send' ? GETPOST('trackid', 'aZ09') : $action); -$sendcontext = ''; +$sendcontext = 'standard'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 689c49ac76a3c..1f2374dffdf60 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2601,7 +2601,7 @@ public function send_password($user, $password = '', $changelater = 0) } $trackid = 'use'.$this->id; - $sendcontext = 'password'; + $sendcontext = 'passwordreset'; $mailfile = new CMailFile( $subject, diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 58458fae5c66e..bb99ba49e3360 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -157,7 +157,7 @@ // Technical failure $message = '
    '.$langs->trans("ErrorFailedToChangePassword").'
    '; } else { - // Success + // Success to set temporary password, send email if ($edituser->send_password($user, $newpassword, 1) > 0) { $message .= $messagewarning; $username = ''; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index fe3a476000359..1dfa38ca92f35 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -506,7 +506,7 @@ public function testPHP($file) "'content'", "'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'", "'WEBSITE_LICENSE'", '"mysqldump"', '"postgresqldump"', "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", - '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"'))) { + '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"', '"MAIN_MAIL_SMTPS_PW_PASSWORDRESET"'))) { $ok = false; break; } From 66da3d7f9bc15adfc47cf364258303362131cc21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 11:35:42 +0200 Subject: [PATCH 081/127] Debug v20 - Fix use of oauth for alternative send email setup --- htdocs/core/class/CMailFile.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index f444f5fc46f57..a0846a381969a 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -208,7 +208,7 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() $this->sendcontext = $sendcontext; - // Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'password') + // Define this->sendmode ('mail', 'smtps', 'swiftmailer', ...) according to $sendcontext ('standard', 'emailing', 'ticket', 'passwordreset') $this->sendmode = ''; if (!empty($this->sendcontext)) { $smtpContextKey = strtoupper($this->sendcontext); @@ -1092,9 +1092,9 @@ public function sendfile() // Token expired so we refresh it if (is_object($tokenobj) && $expire) { $credentials = new Credentials( - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE') + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE') ); $serviceFactory = new \OAuth\ServiceFactory(); $oauthname = explode('-', $OAUTH_SERVICENAME); @@ -1249,9 +1249,9 @@ public function sendfile() // Token expired so we refresh it if (is_object($tokenobj) && $expire) { $credentials = new Credentials( - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_ID'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_SECRET'), - getDolGlobalString('OAUTH_'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'_URLAUTHORIZE') + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_ID'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_SECRET'), + getDolGlobalString('OAUTH_'.getDolGlobalString($keyforsmtpoauthservice).'_URLAUTHORIZE') ); $serviceFactory = new \OAuth\ServiceFactory(); $oauthname = explode('-', $OAUTH_SERVICENAME); From 483a30078dccfd118f6a1fb91f0974ff186b96f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 11:55:49 +0200 Subject: [PATCH 082/127] Try to avoid to reload token when not necessary. --- htdocs/core/class/CMailFile.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index a0846a381969a..47eb0cd3ece9d 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1084,6 +1084,7 @@ public function sendfile() $storage = new DoliStorage($db, $conf, $keyforprovider); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + $expire = false; // Is token expired or will token expire in the next 30 seconds if (is_object($tokenobj)) { @@ -1105,9 +1106,10 @@ public function sendfile() $tokenobj = $apiService->refreshAccessToken($tokenobj); $tokenobj->setRefreshToken($refreshtoken); $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); } - $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); if (is_object($tokenobj)) { $this->smtps->setToken($tokenobj->getAccessToken()); } else { @@ -1241,6 +1243,7 @@ public function sendfile() try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + $expire = false; // Is token expired or will token expire in the next 30 seconds if (is_object($tokenobj)) { @@ -1262,7 +1265,10 @@ public function sendfile() $tokenobj = $apiService->refreshAccessToken($tokenobj); $tokenobj->setRefreshToken($refreshtoken); $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); } + if (is_object($tokenobj)) { $this->transport->setAuthMode('XOAUTH2'); $this->transport->setPassword($tokenobj->getAccessToken()); From bc0b5a876ff03c25394c0ae9680e1d9ec111bfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 1 Aug 2024 12:41:44 +0200 Subject: [PATCH 083/127] fix travis test (#30517) --- htdocs/admin/mails_passwordreset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 27754f5845b1e..21b37366b0aed 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -84,7 +84,7 @@ dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTP_SERVER_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_ID_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_PASSWORDRESET")) { - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_PW_PASSWORDRESET", 'none'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_PW_PASSWORDRESET", 'password'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity); From 34fefcaeb2aa1b0dd6c8b6146f9ef50699d78292 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 12:46:30 +0200 Subject: [PATCH 084/127] Clean code --- htdocs/admin/mails.php | 6 +++--- htdocs/admin/mails_emailing.php | 6 +++--- htdocs/admin/mails_passwordreset.php | 6 +++--- htdocs/admin/mails_ticket.php | 6 +++--- test/phpunit/CodingPhpTest.php | 3 +-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index e476f69596600..208cb94d83e6e 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -97,7 +97,7 @@ dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID", 'alphanohtml'), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW")) { - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW", 'none'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW", 'password'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -500,7 +500,7 @@ function change_smtp_auth_method() { // PW if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { - $mainsmtppw = (getDolGlobalString('MAIN_MAIL_SMTPS_PW') ? $conf->global->MAIN_MAIL_SMTPS_PW : ''); + $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW'); print ''; print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_PW"), $langs->trans("WithGMailYouCanCreateADedicatedPassword")); print ''; @@ -509,7 +509,7 @@ function change_smtp_auth_method() { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_PW'), $htmltext, 1, 'superadmin'); print ''; } print ''; diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 6cd69e2c9f1fd..183c3b9341c40 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -86,7 +86,7 @@ dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_EMAILING", GETPOST("MAIN_MAIL_SMTP_SERVER_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_EMAILING", GETPOST("MAIN_MAIL_SMTPS_ID_EMAILING"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_EMAILING")) { - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING", 'none'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING", 'password'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -477,14 +477,14 @@ function change_smtp_auth_method() { // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { - $mainsmtppw = (getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING') ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : ''); + $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING'); print '' . $langs->trans("MAIN_MAIL_SMTPS_PW") . ''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING'), $htmltext, 1, 'superadmin'); print ''; } print ''; diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 27754f5845b1e..adcb1ea1fc691 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -84,7 +84,7 @@ dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTP_SERVER_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_ID_PASSWORDRESET"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_PASSWORDRESET")) { - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_PW_PASSWORDRESET", 'none'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_PW_PASSWORDRESET", 'password'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -472,14 +472,14 @@ function change_smtp_auth_method() { // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { - $mainsmtppw = (getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTPS_PW_PASSWORDRESET : ''); + $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET'); print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_PASSWORDRESET, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET'), $htmltext, 1, 'superadmin'); print ''; } print ''; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index e06f12a9589ec..2715f032ed834 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -84,7 +84,7 @@ dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_TICKET", GETPOST("MAIN_MAIL_SMTP_SERVER_TICKET"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_TICKET", GETPOST("MAIN_MAIL_SMTPS_ID_TICKET"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET("MAIN_MAIL_SMTPS_PW_TICKET")) { - dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_TICKET", GETPOST("MAIN_MAIL_SMTPS_PW_TICKET", 'none'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_TICKET", GETPOST("MAIN_MAIL_SMTPS_PW_TICKET", 'password'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET("MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET")) { dolibarr_set_const($db, "MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET", GETPOST("MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -472,14 +472,14 @@ function change_smtp_auth_method() { // PW if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { - $mainsmtppw = (getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET') ? $conf->global->MAIN_MAIL_SMTPS_PW_TICKET : ''); + $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET'); print ''.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_TICKET, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET'), $htmltext, 1, 'superadmin'); print ''; } print ''; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 1dfa38ca92f35..e986ef76735bd 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -505,8 +505,7 @@ public function testPHP($file) if (!in_array($val[1], array( "'content'", "'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'", "'WEBSITE_LICENSE'", '"mysqldump"', '"postgresqldump"', - "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", - '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"', '"MAIN_MAIL_SMTPS_PW_PASSWORDRESET"'))) { + "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'"))) { $ok = false; break; } From 75a4a3184194bb126191fd2abd6a41132d076854 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 1 Aug 2024 12:49:01 +0200 Subject: [PATCH 085/127] Qual: CommonObject improvements (Phan notices) (#30507) Improve phpdoc, initialisation, field test --- htdocs/core/class/commonobject.class.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 06a5b21afbc8b..b4e028b2a5c2f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -145,7 +145,8 @@ abstract class CommonObject /** * @var array> Array to store alternative languages values of object - * Note: call fetchValuesForExtraLanguages() before using this + * + * Note: call fetchValuesForExtraLanguages() before using this */ public $array_languages = null; // Value is array() when load already tried @@ -3356,9 +3357,9 @@ public function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line /** * Get children of line * - * @param int $id Id of parent line - * @param int $includealltree 0 = 1st level child, >0 = All level child - * @return int[] Array with list of children lines id + * @param int $id Id of parent line + * @param int<0,1> $includealltree 0 = 1st level child, 1 = All level child + * @return int[] Array with list of children lines id */ public function getChildrenOfLine($id, $includealltree = 0) { @@ -8092,6 +8093,7 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix $type = empty($val['type']) ? '' : $val['type']; $size = empty($val['css']) ? '' : $val['css']; $reg = array(); + $value = ''; // Default return value // Convert var to be able to share same code than showOutputField of extrafields if (preg_match('/varchar\((\d+)\)/', $type, $reg)) { @@ -8593,7 +8595,7 @@ public function validateField($fields, $fieldKey, $fieldValue) $this->clearFieldError($fieldKey); - if (!isset($fields[$fieldKey])) { + if (!isset($fields[$fieldKey]) || $fields[$fieldKey] === null) { $this->setFieldError($fieldKey, $langs->trans('FieldNotFoundInObject')); return false; } @@ -8915,7 +8917,7 @@ public function showOptionals($extrafields, $mode = 'view', $params = null, $key $value = $getposttemp; } } elseif (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('int'))) { - $value =( !empty($this->array_options["options_".$key]) || $this->array_options["options_".$key] === '0' ) ? $this->array_options["options_".$key] : ''; + $value = (!empty($this->array_options["options_".$key]) || $this->array_options["options_".$key] === '0') ? $this->array_options["options_".$key] : ''; } else { $value = (!empty($this->array_options["options_".$key]) ? $this->array_options["options_".$key] : ''); // No GET, no POST, no default value, so we take value of object. } From 2c92e57fe7b81a814f67ad8064dce67f37f8118a Mon Sep 17 00:00:00 2001 From: atm-adrien <67913809+atm-adrien@users.noreply.github.com> Date: Thu, 1 Aug 2024 12:52:53 +0200 Subject: [PATCH 086/127] FIX : Display the real_PMP on inventory when its value is equal to 0 (#22291) * FIX : Display the real_PMP on inventory when its value is equal to 0 * FIX : PR Returns * FIX : PR returns --- htdocs/product/inventory/inventory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 4719fe00ce8c8..0d65a78baddb9 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -1087,7 +1087,7 @@ function barcodeserialforproduct(tabproduct,index,element,barcodeproductqty,sele print ''; - if (! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; + if (! empty($obj->pmp_real) || (string) $obj->pmp_real === '0') $pmp_real = $obj->pmp_real; else $pmp_real = $product_static->pmp; $pmp_valuation_real = $pmp_real * $qty_view; print ''; From 46eb5f83c28205ac8e1029383df739fcd22047ed Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 1 Aug 2024 12:59:45 +0200 Subject: [PATCH 087/127] Qual: Updates for phpstan notices (#30509) * Fix int<0> typing to int<0,0> for phpstan * Fix phpdoc for phpstan * Fix phpdoc for phpstan * Qual: Several phpstan notice fixes * Fix phpdoc * Qual: totalpaid is never null, remove null test * improve phpdoc typing * Also return null to statisfy phpstan * Allow null value for $var * object->Object to make it meaningful * Type EvalMathStack properties * Comment out unused private methods (phpstan) * Changes for phpstan (return values, phpdoc, code) * Change order of tests for phpstan * phpdoc object to Object for correct typing * Typing hing for phpstan * UPdate test for phpstan * Change phpdoc position for phpstan * Update phpdoc for phpstan This needs further improvement * Change $op to $ope to fix phpstan * Update sqlite3.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/evalmath.class.php | 10 ++-- htdocs/core/db/sqlite3.class.php | 46 +++++++++++-------- htdocs/core/lib/accounting.lib.php | 4 +- htdocs/core/lib/company.lib.php | 8 ++-- htdocs/core/lib/functions.lib.php | 23 ++++++---- htdocs/core/lib/modulebuilder.lib.php | 4 +- .../holiday/mod_holiday_immaculate.php | 1 - htdocs/expensereport/card.php | 4 +- htdocs/filefunc.inc.php | 2 +- htdocs/hrm/lib/hrm_evaluation.lib.php | 6 +-- htdocs/hrm/skill_tab.php | 1 + htdocs/imports/import.php | 1 + .../template/class/myobject.class.php | 4 +- htdocs/multicurrency/multicurrency_rate.php | 2 +- htdocs/product/class/product.class.php | 4 +- htdocs/societe/class/societe.class.php | 4 +- htdocs/societe/website.php | 6 ++- .../variants/class/ProductAttribute.class.php | 6 +-- .../ProductCombination2ValuePair.class.php | 4 +- 19 files changed, 81 insertions(+), 59 deletions(-) diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index 943f252979ad5..3b001c6267112 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -359,11 +359,11 @@ private function nfx($expr) $index++; // into implicit multiplication if no operator is there) } } - while (!is_null($op = $stack->pop())) { // pop everything off the stack and push onto output - if ($op == '(') { + while (!is_null($ope = $stack->pop())) { // pop everything off the stack and push onto output + if ($ope == '(') { return $this->trigger(11, "expecting ')'", ")"); // if there are (s on the stack, ()s were unbalanced } - $output[] = $op; + $output[] = $ope; } return $output; @@ -480,8 +480,10 @@ public function trigger($code, $msg, $info = null) */ class EvalMathStack { + /** @var mixed[] */ public $stack = array(); + /** @var int */ public $count = 0; /** @@ -499,7 +501,7 @@ public function push($val) /** * pop * - * @return mixed|null Stack element + * @return ?mixed Stack element */ public function pop() { diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index e7b422abc0e27..73cf3b5e76552 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -1415,14 +1415,15 @@ private function addCustomFunction($name, $arg_count = -1) } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** + /* Unused/commented * calc_daynr * - * @param int $year Year - * @param int $month Month - * @param int $day Day - * @return int Formatted date + * param int $year Year + * param int $month Month + * param int $day Day + * return int Formatted date */ + /* private static function calc_daynr($year, $month, $day) { // phpcs:enable @@ -1439,46 +1440,52 @@ private static function calc_daynr($year, $month, $day) $temp = floor(($y / 100 + 1) * 3 / 4); return (int) ($num + floor($y / 4) - $temp); } + */ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** + /* Unused/commented * calc_weekday * - * @param int $daynr ??? - * @param bool $sunday_first_day_of_week ??? - * @return int + * param int $daynr ??? + * param bool $sunday_first_day_of_week ??? + * return int */ + /* private static function calc_weekday($daynr, $sunday_first_day_of_week) { // phpcs:enable $ret = (int) floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7); return $ret; } + */ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** + /* Unused/commented * calc_days_in_year * - * @param int $year Year - * @return int Nb of days in year + * param int $year Year + * return int Nb of days in year */ + /* private static function calc_days_in_year($year) { // phpcs:enable return (($year & 3) == 0 && ($year % 100 || ($year % 400 == 0 && $year)) ? 366 : 365); } + */ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** + /* Unused/commented * calc_week * - * @param int $year Year - * @param int $month Month - * @param int $day Day - * @param int $week_behaviour Week behaviour, bit masks: WEEK_MONDAY_FIRST, WEEK_YEAR, WEEK_FIRST_WEEKDEAY - * @param int $calc_year ??? Year where the week started - * @return int ??? Week number in year + * param int $year Year + * param int $month Month + * param int $day Day + * param int $week_behaviour Week behaviour, bit masks: WEEK_MONDAY_FIRST, WEEK_YEAR, WEEK_FIRST_WEEKDAY + * param int $calc_year ??? Year where the week started + * return int ??? Week number in year */ + /* private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) { // phpcs:enable @@ -1516,4 +1523,5 @@ private static function calc_week($year, $month, $day, $week_behaviour, &$calc_y } return (int) floor($days / 7 + 1); } + */ } diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 2111fb0a1d12f..5b05439de748c 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -30,14 +30,14 @@ * Check if a value is empty with some options * * @author Michael - https://www.php.net/manual/fr/function.empty.php#90767 - * @param mixed $var Value to test + * @param ?mixed $var Value to test * @param boolean $allow_false Setting this to true will make the function consider a boolean value of false as NOT empty. This parameter is false by default. * @param boolean $allow_ws Setting this to true will make the function consider a string with nothing but white space as NOT empty. This parameter is false by default. * @return boolean True of False */ function is_empty($var, $allow_false = false, $allow_ws = false) { - if (!isset($var) || is_null($var) || ($allow_ws == false && trim($var) == "" && !is_bool($var)) || ($allow_false === false && is_bool($var) && $var === false) || (is_array($var) && empty($var))) { + if (is_null($var) || !isset($var) || ($allow_ws == false && trim($var) == "" && !is_bool($var)) || ($allow_false === false && is_bool($var) && $var === false) || (is_array($var) && empty($var))) { return true; } return false; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 06c09aa60fcd4..41bf41958d9d1 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1226,7 +1226,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl 'sc.role' => array('label' => "ContactByDefaultFor", 'checked' => 1, 'position' => 40), 't.birthday' => array('label' => "Birthday", 'checked' => 0, 'position' => 45), 't.statut' => array('label' => "Status", 'checked' => 1, 'position' => 50, 'class' => 'center'), - 'u.user'=>array('label'=>"DolibarrLogin", 'checked'=>1, 'position'=>50, 'class'=>'center'), + 'u.user' => array('label' => "DolibarrLogin", 'checked' => 1, 'position' => 50, 'class' => 'center'), ); // Extra fields if (!empty($extrafields->attributes[$contactstatic->table_element]['label']) && is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) { @@ -1717,7 +1717,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl * @param Contact $objcon Object contact * @param int $noprint Return string but does not output it * @param string|string[] $actioncode Filter on actioncode - * @return string|void Return html part or void if noprint is 1 + * @return ?string Return html part or null if noprint is 1 */ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '') { @@ -1729,6 +1729,7 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = null, $nopr return $out; } else { print $out; + return null; } } @@ -1748,7 +1749,7 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = null, $nopr * @param string $sortfield Sort field * @param string $sortorder Sort order * @param string $module You can add module name here if elementtype in table llx_actioncomm is objectkey@module - * @return string|void Return html part or void if noprint is 1 + * @return ?string Return html part or void if noprint is 1 */ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '') { @@ -2412,6 +2413,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr return $out; } else { print $out; + return null; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b7e9d92486fec..b7100ee5ef2b4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4535,7 +4535,7 @@ function dol_user_country() * @param int $id Id of object * @param int $noprint No output. Result is the function return * @param string $charfornl Char to use instead of nl2br. '' means we use a standad nl2br. - * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 + * @return ?string Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address() */ function dol_print_address($address, $htmlid, $element, $id, $noprint = 0, $charfornl = '') @@ -4597,6 +4597,7 @@ function dol_print_address($address, $htmlid, $element, $id, $noprint = 0, $char return $out; } else { print $out; + return null; } } @@ -4911,7 +4912,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco $moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt); } } else { - $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', (is_null($picto) ? '' : $picto)); + // $picto can not be null since replaced with 'generic' in that case + //$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', (is_null($picto) ? '' : $picto)); + $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); $pictowithouttext = str_replace('object_', '', $pictowithouttext); $pictowithouttext = str_replace('_nocolor', '', $pictowithouttext); @@ -7197,10 +7200,10 @@ function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid * provide the selected value to the function calcul_price_total. * * @param int|string $vatrate VAT ID or Rate+Code. Value can be value or the string with code into parenthesis or rowid if $firstparamisid is 1. Example: '8.5' or '8.5 (8.5NPR)' or 123. - * @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2) + * @param int<0,2> $local Number of localtax (1 or 2, or 0 to return 1 & 2) * @param Societe $buyer Company object * @param Societe $seller Company object - * @param int $firstparamisid 1 if first param is ID into table instead of Rate+code (use this if you can) + * @param int<0,1> $firstparamisid 1 if first param is ID into table instead of Rate+code (use this if you can) * @return array{}|array{0:string,1:float,2:string,3:string}|array{0:string,1:float,2:string,3:float,4:string,5:string} array(localtax_type1(1-6 or 0 if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp) * @see getTaxesFromId() */ @@ -12550,7 +12553,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u if (!empty($helpText)) { $attr['title'] = dol_escape_htmltag($helpText); - } elseif (empty($attr['title']) && $label) { + } elseif ($label) { // empty($attr['title']) && $attr['title'] = $label; $useclassfortooltip = 0; } @@ -13216,9 +13219,12 @@ function addSummaryTableLine($tableColumnCount, $num, $nbofloop = 0, $total = 0, return; } + /* Case already handled above, commented to satisfy phpstan. if ($num === 0) { $colspan = $tableColumnCount; - } elseif ($num > $nbofloop) { + } else + */ + if ($num > $nbofloop) { $colspan = $tableColumnCount; } else { $colspan = $tableColumnCount - 1; @@ -13622,7 +13628,7 @@ function dolForgeCriteriaCallback($matches) } else { if (strtoupper($tmpescaped) == 'NULL') { $tmpescaped = 'NULL'; - } elseif (is_int($tmpescaped)) { + } elseif (ctype_digit((string) $tmpescaped)) { $tmpescaped = (int) $tmpescaped; } else { $tmpescaped = (float) $tmpescaped; @@ -13746,7 +13752,7 @@ function getActionCommEcmList($object) * @param array $filters Filter on other fields * @param string $sortfield Sort field * @param string $sortorder Sort order - * @return string|void Return html part or void if noprint is 1 + * @return ?string Return html part or void if noprint is 1 */ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') { @@ -14479,6 +14485,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, return $out; } else { print $out; + return null; } } diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 97c0e38da47f3..98d3b66f34a01 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -1217,7 +1217,7 @@ function reWriteAllMenus($file, $menus, $menuWantTo, $key, $action) * * @param string $module The name of the module. * @param string $file The path to the module descriptor file. - * @param array> $dicts The dictionary data to be updated. + * @param array> $dicts The dictionary data to be updated. * @return int Returns the number of replacements made in the file. */ function updateDictionaryInFile($module, $file, $dicts) @@ -1237,7 +1237,7 @@ function updateDictionaryInFile($module, $file, $dicts) if ($key === 'tabcond') { $conditions = array_map( /** - * @param mixed $val + * @param bool|string|int $val * @return string|int */ function ($val) use ($module) { diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 5645dfc1e4d7d..3f3225b39902f 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -31,7 +31,6 @@ */ class mod_holiday_immaculate extends ModelNumRefHolidays { - // variables inherited from ModelNumRefHolidays class public $name = 'Immaculate'; public $version = 'dolibarr'; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 72d333ac11d41..40d449e27ef5c 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2009,9 +2009,7 @@ $totalpaid += $objp->amount; $i++; } - if (!is_null($totalpaid)) { - $totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop - } + $totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop $remaintopay = price2num($object->total_ttc - (float) $totalpaid); $resteapayeraffiche = $remaintopay; diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 8998c20c86672..3041ae37dd291 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -87,7 +87,7 @@ function dol_session_regenerate_id() * Destroy and recreate a new session without losing content. * Not used yet. * - * @param $sessionname string Session name + * @param string $sessionname Session name * @return void */ function dol_session_rotate($sessionname = '') diff --git a/htdocs/hrm/lib/hrm_evaluation.lib.php b/htdocs/hrm/lib/hrm_evaluation.lib.php index a84aa3b0a3b70..dccb586f041cc 100644 --- a/htdocs/hrm/lib/hrm_evaluation.lib.php +++ b/htdocs/hrm/lib/hrm_evaluation.lib.php @@ -130,7 +130,7 @@ function GetLegendSkills() } /** - * @param object $obj Object needed to be represented + * @param Object $obj Object needed to be represented * @return string */ function getRankOrderResults($obj) @@ -165,8 +165,8 @@ function getRankOrderResults($obj) /** * Grouped rows with same ref in array * - * @param object[] $objects all rows retrieve from sql query - * @return array|int Object by groiup, -1 if error (empty or bad argument) + * @param Object[] $objects All rows retrieved from sql query + * @return array|int<-1,-1> Object by group, -1 if error (empty or bad argument) */ function getGroupedEval($objects) { diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index e9dc791e37615..443eea7b19f3d 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -500,6 +500,7 @@ } else { $i = 0; $sameRef = array(); + /** @var array $objects */ $objects = array(); while ($i < $num) { $obj = $db->fetch_object($resql); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index a3488098a5a53..ebdb27c1089a5 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -804,6 +804,7 @@ // Load the source fields from input file into variable $arrayrecord $fieldssource = array(); + /** @var array $fieldssource */ $result = $obj->import_open_file($conf->import->dir_temp.'/'.$filetoimport, $langs); if ($result >= 0) { // Read first line diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 7a11b824ecada..3001bedbaaf8a 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -1117,10 +1117,10 @@ public function getNextNumRef() $dir = dol_buildpath($reldir."core/modules/mymodule/"); // Load file with numbering class (if found) - $mybool |= @include_once $dir.$file; + $mybool = $mybool || @include_once $dir.$file; } - if ($mybool === false) { + if (!$mybool) { dol_print_error(null, "Failed to include file ".$file); return ''; } diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 984d9ae559487..c8c9da0383255 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -134,7 +134,7 @@ setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Currency")), null, "errors"); $error++; } - if ($rateinput === '0') { + if ($rateinput == 0) { setEventMessages($langs->trans('NoEmptyRate'), null, "errors"); $error++; } elseif (empty($rateinput)) { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 00cca51dd6727..586cd0cf6c6aa 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2366,7 +2366,7 @@ public function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref * @param string $newpricebase HT or TTC * @param User $user Object user that make change * @param ?double $newvat New VAT Rate (For example 8.5. Should not be a string) - * @param double $newminprice New price min + * @param double|int $newminprice New price min * @param int $level 0=standard, >0 = level if multilevel prices * @param int $newnpr 0=Standard vat rate, 1=Special vat rate for French NPR VAT * @param int $newpbq 1 if it has price by quantity @@ -2431,7 +2431,7 @@ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $ne $price_ttc = ($newnpr != 1) ? price2num($newprice) * (1 + ($newvat / 100)) : $price; $price_ttc = (float) price2num($price_ttc, 'MU'); - if ($newminprice !== '' || $newminprice === 0) { + if ($newminprice !== '' || $newminprice == 0) { $price_min = price2num($newminprice, 'MU'); $price_min_ttc = (float) price2num($newminprice) * (1 + ($newvat / 100)); $price_min_ttc = price2num($price_min_ttc, 'MU'); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b2ccbb22a9306..34b8fc2189bae 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -184,7 +184,7 @@ class Societe extends CommonObject 'parent' => array('type' => 'integer', 'label' => 'Parent', 'enabled' => 1, 'visible' => -1, 'position' => 20), 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 25), 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'position' => 30), - 'nom' => array('type' => 'varchar(128)', 'length'=>128, 'label' => 'Nom', 'enabled' => 1, 'visible' => -1, 'position' => 35, 'showoncombobox' => 1, 'csslist' => 'tdoverflowmax150'), + 'nom' => array('type' => 'varchar(128)', 'length' => 128, 'label' => 'Nom', 'enabled' => 1, 'visible' => -1, 'position' => 35, 'showoncombobox' => 1, 'csslist' => 'tdoverflowmax150'), 'name_alias' => array('type' => 'varchar(128)', 'label' => 'Name alias', 'enabled' => 1, 'visible' => -1, 'position' => 36, 'showoncombobox' => 2), 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 40, 'index' => 1), 'ref_ext' => array('type' => 'varchar(255)', 'label' => 'RefExt', 'enabled' => 1, 'visible' => 0, 'position' => 45), @@ -5474,12 +5474,14 @@ public function mergeCompany($soc_origin_id) //First, all core objects must update their tables foreach ($objects as $object_name => $object_file) { + /* $object_file is never an array -> code commented if (is_array($object_file)) { if (empty($object_file['enabled'])) { continue; } $object_file = $object_file['file']; } + */ require_once DOL_DOCUMENT_ROOT.$object_file; diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index ade8c4f3dca2a..c8d531fd81196 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -88,10 +88,12 @@ // Initialize array of search criteria $search_all = GETPOST("search_all", 'alpha'); +/** @var array $search */ $search = array(); foreach ($objectwebsiteaccount->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) { - $search[$key] = GETPOST('search_'.$key, 'alpha'); + $value = GETPOST('search_'.$key, 'alpha'); + if ($value) { + $search[$key] = $value; } } diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 146db8149e7f2..70b021cd68a8f 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -369,9 +369,9 @@ public function fetchAll() /** * Updates a product attribute * - * @param User $user User who updates the attribute - * @param int $notrigger 1 = Do not execute trigger (0 by default) - * @return int Return <0 if KO, 1 if OK + * @param User $user User who updates the attribute + * @param int<0,1> $notrigger 1 = Do not execute trigger (0 by default) + * @return int<-1,1> <0 if KO, 1 if OK */ public function update(User $user, $notrigger = 0) { diff --git a/htdocs/variants/class/ProductCombination2ValuePair.class.php b/htdocs/variants/class/ProductCombination2ValuePair.class.php index 5684fcff9a2cc..0e058e74c5a12 100644 --- a/htdocs/variants/class/ProductCombination2ValuePair.class.php +++ b/htdocs/variants/class/ProductCombination2ValuePair.class.php @@ -180,8 +180,8 @@ public function fetchByFkCombination($fk_combination) /** * Delete all ProductCombination2ValuePair linked to a given ProductCombination ID. * - * @param int $fk_combination ID of the ProductCombination - * @return int Return <0 if KO, 1 if OK + * @param int $fk_combination ID of the ProductCombination + * @return int<-1,-1>|int<1,1> -1 if KO, 1 if OK */ public function deleteByFkCombination($fk_combination) { From 4fc272698f16b6846d5e78f8ed15e1e3af79d403 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 13:07:12 +0200 Subject: [PATCH 088/127] Clean code --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/project.lib.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b7100ee5ef2b4..ef6e0ddf11cb8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13628,7 +13628,7 @@ function dolForgeCriteriaCallback($matches) } else { if (strtoupper($tmpescaped) == 'NULL') { $tmpescaped = 'NULL'; - } elseif (ctype_digit((string) $tmpescaped)) { + } elseif (is_numeric((string) $tmpescaped)) { $tmpescaped = (int) $tmpescaped; } else { $tmpescaped = (float) $tmpescaped; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 2999eb74ac2e3..920a815f429e7 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2585,10 +2585,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql .= " AND p.fk_statut = ".(int) $status; } if (getDolGlobalString('PROJECT_LIMIT_YEAR_RANGE')) { - $project_year_filter = GETPOST("project_year_filter"); + $project_year_filter = GETPOST("project_year_filter", 'alpha'); // '*' seems allowed //Check if empty or invalid year. Wildcard ignores the sql check if ($project_year_filter != "*") { - if (empty($project_year_filter) || !ctype_digit($project_year_filter)) { + if (empty($project_year_filter) || !is_numeric($project_year_filter)) { $project_year_filter = date("Y"); } $sql .= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($project_year_filter, 12, false)).")"; From 6a98adcc3ca81b18682e70016015880fab7e1b56 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 1 Aug 2024 13:25:01 +0200 Subject: [PATCH 089/127] Qual: Further phpdoc fixes for phpstan (#30506) * Fix int<0> typing to int<0,0> for phpstan * Fix phpdoc for phpstan * Fix phpdoc for phpstan --------- Co-authored-by: Laurent Destailleur --- htdocs/variants/class/ProductAttribute.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index 70b021cd68a8f..9f057eba83ab5 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -369,9 +369,9 @@ public function fetchAll() /** * Updates a product attribute * - * @param User $user User who updates the attribute - * @param int<0,1> $notrigger 1 = Do not execute trigger (0 by default) - * @return int<-1,1> <0 if KO, 1 if OK + * @param User $user User who updates the attribute + * @param int $notrigger 1 = Do not execute trigger (0 by default) + * @return int Return <0 if KO, 1 if OK */ public function update(User $user, $notrigger = 0) { @@ -520,7 +520,7 @@ public function delete(User $user, $notrigger = 0) * Load array lines * * @param string $filters Filter on other fields - * @return int Return integer <0 if KO, >0 if OK + * @return int Return integer <0 if KO, >0 if OK */ public function fetch_lines($filters = '') { From 534570a85b6105150b50fdc2e5f2d9ca2c070764 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 13:39:27 +0200 Subject: [PATCH 090/127] Disable deprecated entry --- htdocs/install/mysql/data/llx_c_input_reason.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_input_reason.sql b/htdocs/install/mysql/data/llx_c_input_reason.sql index ff3621aed1601..0e1509f21df95 100644 --- a/htdocs/install/mysql/data/llx_c_input_reason.sql +++ b/htdocs/install/mysql/data/llx_c_input_reason.sql @@ -24,7 +24,7 @@ INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 1, 'SRC_INTE', 'Web site', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 2, 'SRC_CAMP_MAIL', 'Mailing campaign', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 3, 'SRC_CAMP_PHO', 'Phone campaign', 1); -INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 4, 'SRC_CAMP_FAX', 'Fax campaign', 1); +INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 4, 'SRC_CAMP_FAX', 'Fax campaign', 0); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 5, 'SRC_COMM', 'Commercial contact', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 6, 'SRC_SHOP', 'Shop contact', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES ( 7, 'SRC_CAMP_EMAIL', 'EMailing campaign', 1); From e5aa6059949e171c76c3463700035eb1e7bc27c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 13:58:29 +0200 Subject: [PATCH 091/127] Debug v21 - Fix regression --- htdocs/core/class/commonobject.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b4e028b2a5c2f..57e06f3550d4f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8093,7 +8093,6 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix $type = empty($val['type']) ? '' : $val['type']; $size = empty($val['css']) ? '' : $val['css']; $reg = array(); - $value = ''; // Default return value // Convert var to be able to share same code than showOutputField of extrafields if (preg_match('/varchar\((\d+)\)/', $type, $reg)) { @@ -8282,7 +8281,7 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix $resql = $this->db->query($sql); if ($resql) { if (!$filter_categorie) { - $value = ''; // value was used, so now we reste it to use it to build final output + $value = ''; // value was used, so now we reset it to use it to build final output $numrows = $this->db->num_rows($resql); if ($numrows) { $obj = $this->db->fetch_object($resql); From 9cc098b24ce2405b396771b34a9601ea25700224 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 14:28:05 +0200 Subject: [PATCH 092/127] NEW Can show raw value of oauth token --- htdocs/admin/oauthlogintokens.php | 32 ++++++++++++++++--------------- htdocs/langs/en_US/oauth.lang | 4 +++- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 00d754cc9eff8..164c858ac2d5b 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -347,7 +347,7 @@ } // Check remote access if ($urltocheckperms) { - print '
    '.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; + print '
    '.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; } } print ''; @@ -356,10 +356,20 @@ print ''; print ''; //var_dump($key); - print $langs->trans("Token").''; + print $langs->trans("TokenRawValue").''; print ''; + if (is_object($tokenobj)) { + print '
    '."\n"; + } + print ''; + print ''."\n"; if (is_object($tokenobj)) { + print ''; + print ''; + //var_dump($key); + print $langs->trans("AccessToken").''; + print ''; $tokentoshow = $tokenobj->getAccessToken(); print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'
    '; //print 'Refresh: '.$tokenobj->getRefreshToken().'
    '; @@ -368,11 +378,9 @@ /*print '
    Extra:
    ';*/ - } - print ''; - print ''."\n"; + print ''; + print ''."\n"; - if (is_object($tokenobj)) { // Token refresh print ''; print ''; @@ -392,16 +400,10 @@ print ''; print ''; print yn($expire); - print ''; - print ''; - // Token expired at - print ''; - print ''; - //var_dump($key); - print $langs->trans("TOKEN_EXPIRE_AT"); - print ''; - print ''; + print '   -   '; + print $langs->trans("TOKEN_EXPIRE_AT").': '; + print ''; print $expiredat; print ''; print ''; diff --git a/htdocs/langs/en_US/oauth.lang b/htdocs/langs/en_US/oauth.lang index 498833fbe0771..9c681bd23bb62 100644 --- a/htdocs/langs/en_US/oauth.lang +++ b/htdocs/langs/en_US/oauth.lang @@ -19,7 +19,7 @@ OAuthSetupForLogin=Page to manage (generate/delete) OAuth tokens SeePreviousTab=See previous tab OAuthProvider=OAuth provider OAuthIDSecret=OAuth ID and Secret -TOKEN_REFRESH=Token Refresh Present +TOKEN_REFRESH=Refresh Token TOKEN_EXPIRED=Token expired TOKEN_EXPIRE_AT=Token expire at TOKEN_DELETE=Delete saved token @@ -40,3 +40,5 @@ AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=An OAuth entry for this provide URLOfServiceForAuthorization=URL provided by OAuth service for authentication Scopes=Permissions (Scopes) ScopeUndefined=Permissions (Scopes) undefined (see previous tab) +TokenRawValue=Token (Raw value) +AccessToken=Access Token From edd56da1f8915b395fb3b33a4a6411615f8fdbdf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 16:31:53 +0200 Subject: [PATCH 093/127] Fix to force to get a token with the refresh token --- .../modules/oauth/google_oauthcallback.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 1949caeadd9cd..2b6d484c51ace 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -151,10 +151,11 @@ exit(); } + if (!GETPOST('code')) { dol_syslog("Page is called without the 'code' parameter defined"); - // If we enter this page without 'code' parameter, it means we click on the link from login page and we want to get the redirect + // If we enter this page without 'code' parameter, it means we click on the link from login page ($forlogin is set) or from setup page and we want to get the redirect // to the OAuth provider login page. $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; @@ -164,14 +165,16 @@ // No need to save more data in sessions. We have several info into $_SESSION['datafromloginform'], saved when form is posted with a click // on "Login with Google" with param actionlogin=login and beforeoauthloginredirect=google, by the functions_googleoauth.php. + // Set approval_prompt. Note: A refresh token will be provided only if prompt is done. if ($forlogin) { - // Set approval_prompt $approval_prompt = getDolGlobalString('OAUTH_GOOGLE_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' $apiService->setApprouvalPrompt($approval_prompt); + } else { + $apiService->setApprouvalPrompt('force'); } // This may create record into oauth_state before the header redirect. - // Creation of record with state in this tables depend on the Provider used (see its constructor). + // Creation of record with state, create record or just update column state of table llx_oauth_token (and create/update entry in llx_oauth_state) depending on the Provider used (see its constructor). if ($state) { $url = $apiService->getAuthorizationUri(array('state' => $state)); } else { @@ -209,7 +212,9 @@ } } - // we go on oauth provider authorization page + //var_dump($url);exit; + + // we go on oauth provider authorization page, we will then go back on this page but into the other branch of the if (!GETPOST('code')) header('Location: '.$url); exit(); } else { @@ -233,9 +238,13 @@ $db->begin(); // This requests the token from the received OAuth code (call of the https://oauth2.googleapis.com/token endpoint) - // Result is stored into object managed by class DoliStorage into includes/OAuth/Common/Storage/DoliStorage.php, so into table llx_oauth_token + // Result is stored into object managed by class DoliStorage into includes/OAuth/Common/Storage/DoliStorage.php and into database table llx_oauth_token $token = $apiService->requestAccessToken(GETPOST('code'), $state); + // The refresh token is inside the object token if the prompt was forced only. + //$refreshtoken = $token->getRefreshToken(); + //var_dump($refreshtoken); + // Note: The extraparams has the 'id_token' than contains a lot of information about the user. $extraparams = $token->getExtraParams(); $jwt = explode('.', $extraparams['id_token']); @@ -305,8 +314,8 @@ $tmparray = (empty($_SESSION['datafromloginform']) ? array() : $_SESSION['datafromloginform']); $entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1); - // Delete the token - $storage->clearToken('Google'); + // Delete the old token + $storage->clearToken('Google'); // Delete the token called ("Google-".$storage->keyforprovider) $tmpuser = new User($db); $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. From 4a9d039d0e43a51d6118487a0a357e1288c3fcd5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 17:05:13 +0200 Subject: [PATCH 094/127] NEW enhance the OAUTH2 token manager. Can refresh a token from page. --- htdocs/admin/oauthlogintokens.php | 127 ++++++++++++++++++++++-------- htdocs/langs/en_US/oauth.lang | 13 ++- 2 files changed, 104 insertions(+), 36 deletions(-) diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 164c858ac2d5b..47c76a3a9283e 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; use OAuth\Common\Storage\DoliStorage; +use OAuth\Common\Consumer\Credentials; $supportedoauth2array = getSupportedOauth2Array(); @@ -114,6 +115,66 @@ $action = ''; } +// Test a refresh of a token using the refresh token +if ($action == 'refreshtoken' && $user->admin) { + $keyforprovider = GETPOST('keyforprovider'); + $OAUTH_SERVICENAME = GETPOST('service'); + + // Show value of token + $tokenobj = null; + // Load OAUth libraries + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; + // Dolibarr storage + $storage = new DoliStorage($db, $conf, $keyforprovider); + try { + // $OAUTH_SERVICENAME is for example 'Google-keyforprovider' + print ''."\n"; + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + $expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30)); + // We have to save the refresh token because Google give it only once + $refreshtoken = $tokenobj->getRefreshToken(); + print ''; + + //print $tokenobj->getExtraParams()['id_token'].'
    '; + //print $tokenobj->getAccessToken().'
    '; + //print $tokenobj->getRefreshToken().'
    '; + + + //var_dump($expire); + + // We do the refresh even if not expired, this is the goal of action. + $credentials = new Credentials( + getDolGlobalString('OAUTH_'.strtoupper($OAUTH_SERVICENAME).'_ID'), + getDolGlobalString('OAUTH_'.strtoupper($OAUTH_SERVICENAME).'_SECRET'), + getDolGlobalString('OAUTH_'.strtoupper($OAUTH_SERVICENAME).'_URLAUTHORIZE') + ); + $serviceFactory = new \OAuth\ServiceFactory(); + $oauthname = explode('-', $OAUTH_SERVICENAME); + // ex service is Google-Emails we need only the first part Google + $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); + + if ($apiService instanceof OAuth\OAuth2\Service\AbstractService || $apiService instanceof OAuth\OAuth1\Service\AbstractService) { + // ServiceInterface does not provide refreshAccessToekn, AbstractService does + $tokenobj = $apiService->refreshAccessToken($tokenobj); + $tokenobj->setRefreshToken($refreshtoken); // Restore the refresh token + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); + + if ($expire) { + setEventMessages($langs->trans("OldTokenWasExpiredItHasBeenRefresh"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("OldTokenWasNotExpiredButItHasBeenRefresh"), null, 'mesgs'); + } + } else { + dol_print_error($db, 'apiService is not a correct OAUTH2 Abstract service'); + } + + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + } catch (Exception $e) { + // Return an error if token not found + print $e->getMessage(); + } +} + /* * View @@ -188,6 +249,8 @@ } $state = $shortscope; // TODO USe a better state + $urltorefresh = $_SERVER["PHP_SELF"].'?action=refreshtoken&token='.newToken(); + // Define $urltorenew, $urltodelete, $urltocheckperms if ($keyforsupportedoauth2array == 'OAUTH_GITHUB_NAME') { // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). @@ -217,6 +280,9 @@ if ($urltorenew) { $urltorenew .= '&keyforprovider='.urlencode($keyforprovider); } + if ($urltorefresh) { + $urltorefresh .= '&keyforprovider='.urlencode($keyforprovider).'&service='.urlencode($OAUTH_SERVICENAME); + } if ($urltodelete) { $urltodelete .= '&keyforprovider='.urlencode($keyforprovider); } @@ -334,50 +400,61 @@ if (is_object($tokenobj)) { //test on $storage->hasAccessToken($OAUTH_SERVICENAME) ? if ($urltodelete) { - print ''.$langs->trans('DeleteAccess').'
    '; + print ''.$langs->trans('DeleteAccess').''; } else { - print ''.$langs->trans('GoOnTokenProviderToDeleteToken').'
    '; + print ''.$langs->trans('GoOnTokenProviderToDeleteToken').''; } } // Request remote token if ($urltorenew) { - print ''.$langs->trans('GetAccess').''; - print $form->textwithpicto('', $langs->trans('RequestAccess')); - print '
    '; + print ''.$langs->trans('GetAccess').''; + } + // Request remote token + if ($urltorefresh && $refreshtoken) { + print ''.$langs->trans('RefreshToken').''; } + // Check remote access if ($urltocheckperms) { - print '
    '.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; + print '
    '.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; } } print ''; print ''; - print ''; - print ''; - //var_dump($key); - print $langs->trans("TokenRawValue").''; - print ''; if (is_object($tokenobj)) { - print '
    '."\n"; - } - print ''; - print ''."\n"; + print ''; + print ''; + //var_dump($key); + print $langs->trans("TokenRawValue").''; + print ''; + if (is_object($tokenobj)) { + print '
    '."\n"; + } + print ''; + print ''."\n"; - if (is_object($tokenobj)) { print ''; print ''; //var_dump($key); print $langs->trans("AccessToken").''; print ''; $tokentoshow = $tokenobj->getAccessToken(); - print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'
    '; + print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).''; //print 'Refresh: '.$tokenobj->getRefreshToken().'
    '; //print 'EndOfLife: '.$tokenobj->getEndOfLife().'
    '; //var_dump($tokenobj->getExtraParams()); /*print '
    Extra:
    ';*/ + + print '   -   '; + print $langs->trans("ExpirationDate").': '; + print ''; + print $expiredat; + + print $expire ? ' ('.$langs->trans("TokenExpired").')' : ' ('.$langs->trans("TokenNotExpired").')'; + print ''; print ''."\n"; @@ -391,22 +468,6 @@ print ''.showValueWithClipboardCPButton($refreshtoken, 1, dol_trunc($refreshtoken, 32)).''; print ''; print ''; - - // Token expired - print ''; - print ''; - //var_dump($key); - print $langs->trans("TOKEN_EXPIRED"); - print ''; - print ''; - print yn($expire); - - print '   -   '; - print $langs->trans("TOKEN_EXPIRE_AT").': '; - print ''; - print $expiredat; - print ''; - print ''; } print ''; diff --git a/htdocs/langs/en_US/oauth.lang b/htdocs/langs/en_US/oauth.lang index 9c681bd23bb62..21565246fe270 100644 --- a/htdocs/langs/en_US/oauth.lang +++ b/htdocs/langs/en_US/oauth.lang @@ -9,9 +9,9 @@ HasAccessToken=A token was generated and saved into local database NewTokenStored=Token received and saved ToCheckDeleteTokenOnProvider=Click here to check/delete authorization saved by %s OAuth provider TokenDeleted=Token deleted -GetAccess=Click here to get a token +GetAccess=Get new Token RequestAccess=Click here to request/renew access and receive a new token -DeleteAccess=Click here to delete the token +DeleteAccess=Delete Token RedirectURL=Redirect URL UseTheFollowingUrlAsRedirectURI=Use the following URL as the Redirect URL when creating your credentials with your OAuth provider ListOfSupportedOauthProviders=Add your OAuth2 token providers. Then, go on your OAuth provider admin page to create/get an OAuth ID and Secret and save them here. Once done, switch on the other tab to generate your token. @@ -40,5 +40,12 @@ AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=An OAuth entry for this provide URLOfServiceForAuthorization=URL provided by OAuth service for authentication Scopes=Permissions (Scopes) ScopeUndefined=Permissions (Scopes) undefined (see previous tab) -TokenRawValue=Token (Raw value) +TokenRawValue=Full Token (object) AccessToken=Access Token +TokenExpired=Expired +TokenNotExpired=Not expired +ExpirationDate=Expiration date +RefreshToken=Refresh token +RefreshTokenHelp=Use the Refresh Token to get a new Access Token +OldTokenWasExpiredItHasBeenRefresh=Old token was expired, it has been refreshed +OldTokenWasNotExpiredButItHasBeenRefresh=Old token was not expired but it has been refreshed From 56d4a30bdfee921b73fe81028c492a696e9120b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 17:05:29 +0200 Subject: [PATCH 095/127] Code comment --- htdocs/core/class/CMailFile.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index e263c282dc372..0d912d1496daf 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1139,13 +1139,14 @@ public function sendfile() $oauthname = explode('-', $OAUTH_SERVICENAME); // ex service is Google-Emails we need only the first part Google $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); - // We have to save the token because Google give it only once + + // We have to save the refresh token because Google give it only once $refreshtoken = $tokenobj->getRefreshToken(); if ($apiService instanceof OAuth\OAuth2\Service\AbstractService || $apiService instanceof OAuth\OAuth1\Service\AbstractService) { // ServiceInterface does not provide refreshAccessToekn, AbstractService does $tokenobj = $apiService->refreshAccessToken($tokenobj); - $tokenobj->setRefreshToken($refreshtoken); + $tokenobj->setRefreshToken($refreshtoken); // Restore the refresh token $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); } From 3789332f40212c9a97b5e4f1b42a025ca6089da1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Aug 2024 16:31:53 +0200 Subject: [PATCH 096/127] Fix to force to get a token with the refresh token --- .../modules/oauth/google_oauthcallback.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 1949caeadd9cd..2b6d484c51ace 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -151,10 +151,11 @@ exit(); } + if (!GETPOST('code')) { dol_syslog("Page is called without the 'code' parameter defined"); - // If we enter this page without 'code' parameter, it means we click on the link from login page and we want to get the redirect + // If we enter this page without 'code' parameter, it means we click on the link from login page ($forlogin is set) or from setup page and we want to get the redirect // to the OAuth provider login page. $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; @@ -164,14 +165,16 @@ // No need to save more data in sessions. We have several info into $_SESSION['datafromloginform'], saved when form is posted with a click // on "Login with Google" with param actionlogin=login and beforeoauthloginredirect=google, by the functions_googleoauth.php. + // Set approval_prompt. Note: A refresh token will be provided only if prompt is done. if ($forlogin) { - // Set approval_prompt $approval_prompt = getDolGlobalString('OAUTH_GOOGLE_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' $apiService->setApprouvalPrompt($approval_prompt); + } else { + $apiService->setApprouvalPrompt('force'); } // This may create record into oauth_state before the header redirect. - // Creation of record with state in this tables depend on the Provider used (see its constructor). + // Creation of record with state, create record or just update column state of table llx_oauth_token (and create/update entry in llx_oauth_state) depending on the Provider used (see its constructor). if ($state) { $url = $apiService->getAuthorizationUri(array('state' => $state)); } else { @@ -209,7 +212,9 @@ } } - // we go on oauth provider authorization page + //var_dump($url);exit; + + // we go on oauth provider authorization page, we will then go back on this page but into the other branch of the if (!GETPOST('code')) header('Location: '.$url); exit(); } else { @@ -233,9 +238,13 @@ $db->begin(); // This requests the token from the received OAuth code (call of the https://oauth2.googleapis.com/token endpoint) - // Result is stored into object managed by class DoliStorage into includes/OAuth/Common/Storage/DoliStorage.php, so into table llx_oauth_token + // Result is stored into object managed by class DoliStorage into includes/OAuth/Common/Storage/DoliStorage.php and into database table llx_oauth_token $token = $apiService->requestAccessToken(GETPOST('code'), $state); + // The refresh token is inside the object token if the prompt was forced only. + //$refreshtoken = $token->getRefreshToken(); + //var_dump($refreshtoken); + // Note: The extraparams has the 'id_token' than contains a lot of information about the user. $extraparams = $token->getExtraParams(); $jwt = explode('.', $extraparams['id_token']); @@ -305,8 +314,8 @@ $tmparray = (empty($_SESSION['datafromloginform']) ? array() : $_SESSION['datafromloginform']); $entitytosearchuser = (isset($tmparray['entity']) ? $tmparray['entity'] : -1); - // Delete the token - $storage->clearToken('Google'); + // Delete the old token + $storage->clearToken('Google'); // Delete the token called ("Google-".$storage->keyforprovider) $tmpuser = new User($db); $res = $tmpuser->fetch(0, '', '', 0, $entitytosearchuser, $useremail, 0, 1); // Load user. Can load with email_oauth2. From f002fb4ed132ab5eeabe3b161b31eb8e1009fc4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 10:36:43 +0200 Subject: [PATCH 097/127] Use the non deprecated function loadRights instead of getrights --- htdocs/api/class/api_access.class.php | 2 +- htdocs/api/class/api_login.class.php | 2 +- htdocs/core/lib/ws.lib.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 2 +- htdocs/dav/fileserver.php | 2 +- htdocs/ecm/search.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/fourn/commande/index.php | 2 +- htdocs/holiday/list.php | 2 +- htdocs/imports/emptyexample.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/modulebuilder/template/css/mymodule.css.php | 4 +--- htdocs/modulebuilder/template/scripts/mymodule.php | 2 +- .../template/test/phpunit/MyObjectTest.php | 2 +- htdocs/public/agenda/agendaexport.php | 4 ++-- htdocs/public/cron/cron_run_jobs_by_url.php | 4 ++-- htdocs/public/stripe/ipn.php | 2 +- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/style.css.php | 2 +- htdocs/user/agenda.php | 2 +- htdocs/user/agenda_extsites.php | 2 +- htdocs/user/bank.php | 2 +- htdocs/user/card.php | 2 +- htdocs/user/class/user.class.php | 5 +++-- htdocs/user/clicktodial.php | 2 +- htdocs/user/document.php | 2 +- htdocs/user/group/card.php | 2 +- htdocs/user/group/ldap.php | 2 +- htdocs/user/group/perms.php | 6 +++--- htdocs/user/ldap.php | 2 +- htdocs/user/messaging.php | 2 +- htdocs/user/note.php | 2 +- htdocs/user/notify/card.php | 4 ++-- htdocs/user/param_ihm.php | 2 +- htdocs/user/perms.php | 10 +++++----- htdocs/user/virtualcard.php | 2 +- htdocs/webservices/server_actioncomm.php | 4 ++-- htdocs/webservices/server_category.php | 2 +- htdocs/webservices/server_contact.php | 2 +- htdocs/webservices/server_invoice.php | 4 ++-- htdocs/webservices/server_order.php | 4 ++-- htdocs/webservices/server_other.php | 2 +- htdocs/webservices/server_productorservice.php | 4 ++-- htdocs/webservices/server_project.php | 4 ++-- htdocs/webservices/server_supplier_invoice.php | 2 +- htdocs/webservices/server_thirdparty.php | 4 ++-- htdocs/webservices/server_user.php | 6 +++--- 48 files changed, 67 insertions(+), 68 deletions(-) diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index fb074a8b32d42..1355261d0ef17 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -200,7 +200,7 @@ public function __isAllowed() } // User seems valid - $fuser->getrights(); + $fuser->loadRights(); // Set the property $user to the $user of API static::$user = $fuser; diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 77f337743fc30..810c0829952d8 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -144,7 +144,7 @@ public function index($login, $password, $entity = '', $reset = 0) // Renew the hash if (empty($tmpuser->api_key) || $reset) { - $tmpuser->getrights(); + $tmpuser->loadRights(); if (!$tmpuser->hasRight('user', 'self', 'creer')) { if (empty($tmpuser->api_key)) { throw new RestException(403, 'No API token set for this user and user need write permission on itself to reset its API token'); diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index f2f39b2eddf4b..2efffff73af25 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -72,7 +72,7 @@ function check_authentication($authentication, &$error, &$errorcode, &$errorlabe // Validation of login if (!$error) { - $fuser->getrights(); // Load permission of user + $fuser->loadRights(); // Load permission of user // Authentication mode if (empty($dolibarr_main_authentication)) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 88232c594f0c6..8bc05ad4a545c 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2019,7 +2019,7 @@ public function insert_permissions($reinitadminperms = 0, $force_entity = null, if (!empty($reinitadminperms) && !empty($user->admin)) { // Reload permission for current user if defined // We reload permissions $user->clearrights(); - $user->getrights(); + $user->loadRights(); } } $this->db->free($resql); diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index 6911838834e2d..756639438f627 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -58,7 +58,7 @@ $user = new User($db); if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '') { $user->fetch(0, $_SERVER['PHP_AUTH_USER']); - $user->getrights(); + $user->loadRights(); } // Load translation files required by the page diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 202ea14afb741..2910d7a418441 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -40,7 +40,7 @@ $result = restrictedArea($user, 'ecm', ''); // Load permissions -$user->getrights('ecm'); +$user->loadRights('ecm'); // Get parameters $socid = GETPOSTINT('socid'); diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 57b80393617f4..8cec82fcb6d90 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2743,7 +2743,7 @@ public function computeTotalKm($fk_cat, $qty, $tva) $currentUser = new User($db); $currentUser->fetch($this->fk_user); - $currentUser->getrights('expensereport'); + $currentUser->loadRights('expensereport'); //Clean $qty = (float) price2num($qty); diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index a66ee7c4b161f..3e5ca842ec8ef 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -271,7 +271,7 @@ if ($id > 0) { // Charge utilisateur edite $fuser->fetch($id, '', '', 1); - $fuser->getrights(); + $fuser->loadRights(); $user_id = $fuser->id; $search_user = $user_id; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index ee6ca36224a7d..91d50316771f3 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -256,7 +256,7 @@ $userstatic = new User($db); $userstatic->id = $obj->rowid; - $userstatic->getrights('fournisseur'); + $userstatic->loadRights('fournisseur'); if ($userstatic->hasRight('fournisseur', 'commande', 'approuver')) { print ''; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 6baf24ccb2462..16aad58d970c2 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -253,7 +253,7 @@ if ($id > 0) { // Charge utilisateur edite $fuser->fetch($id, '', '', 1); - $fuser->getrights(); + $fuser->loadRights(); $user_id = $fuser->id; $search_employee = $user_id; diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index ec84e98e7145e..7f72904e13d06 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -79,7 +79,7 @@ function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = // Check exportkey if (empty($datatoimport)) { - $user->getrights(); + $user->loadRights(); llxHeader(); print '
    Bad value for datatoimport.
    '; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 399cb9030f147..a26222d051c9e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1471,7 +1471,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type, $stopcode = 1) } // Load permissions - $user->getrights(); + $user->loadRights(); } dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"]) ? '' : $_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE); diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index d805158c1145d..f243960eceeac 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -81,7 +81,7 @@ // Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS /*if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('',$_SESSION['dol_login']); - $user->getrights(); + $user->loadRights(); }*/ @@ -107,5 +107,3 @@ .myclasscss { /* ... */ } - - diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php index 9bb5d54cfa506..1f59f3a602c17 100644 --- a/htdocs/modulebuilder/template/scripts/mymodule.php +++ b/htdocs/modulebuilder/template/scripts/mymodule.php @@ -105,7 +105,7 @@ dol_print_error(null, $user->error); exit; } -$user->getrights(); +$user->loadRights(); $hookmanager->initHooks(array('cli')); diff --git a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php index 89b2e3db55466..97861ddf147b6 100644 --- a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php +++ b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php @@ -34,7 +34,7 @@ if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); - $user->getrights(); + $user->loadRights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 284dfd6091ea7..718c97e03edab 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -162,7 +162,7 @@ function llxFooterVierge() // Check config if (!getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) { - $user->getrights(); + $user->loadRights(); top_httphead(); @@ -189,7 +189,7 @@ function llxFooterVierge() } elseif (empty($reshook)) { // Check exportkey if (!GETPOST("exportkey") || getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY') != GETPOST("exportkey")) { - $user->getrights(); + $user->loadRights(); top_httphead(); diff --git a/htdocs/public/cron/cron_run_jobs_by_url.php b/htdocs/public/cron/cron_run_jobs_by_url.php index 3185f7bfa558e..86c0cc7629957 100644 --- a/htdocs/public/cron/cron_run_jobs_by_url.php +++ b/htdocs/public/cron/cron_run_jobs_by_url.php @@ -118,7 +118,7 @@ exit; } } -$user->getrights(); +$user->loadRights(); $id = GETPOST('id', 'alpha'); // We accept non numeric id. We will filter later. @@ -180,7 +180,7 @@ exit(-1); } } - $user->getrights(); + $user->loadRights(); } } diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 787a1474904a3..b7cec54d44caf 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -93,7 +93,7 @@ // We set the user to use for all ipn actions in Dolibarr $user = new User($db); $user->fetch(getDolGlobalString('STRIPE_USER_ACCOUNT_FOR_ACTIONS')); - $user->getrights(); + $user->loadRights(); } else { httponly_accessforbidden('Error: Setup of module Stripe not complete for mode '.dol_escape_htmltag($service).'. The STRIPE_USER_ACCOUNT_FOR_ACTIONS is not defined.', 400, 1); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 33266aeaad855..7b65ab171b65c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -69,7 +69,7 @@ // and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('', $_SESSION['dol_login'], '', 1); - $user->getrights(); + $user->loadRights(); // Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct. $menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1); diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8b7eac9d3e26c..8e8d4083dd931 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -71,7 +71,7 @@ // and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('', $_SESSION['dol_login'], '', 1); - $user->getrights(); + $user->loadRights(); //$user->loadPersonalConf(); // Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct. diff --git a/htdocs/user/agenda.php b/htdocs/user/agenda.php index 5b8cf4ffe56bd..41f128cd68e55 100644 --- a/htdocs/user/agenda.php +++ b/htdocs/user/agenda.php @@ -72,7 +72,7 @@ $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); - $object->getrights(); + $object->loadRights(); } // Security check diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index c3fc53bea3f71..9c435ca8485fc 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -59,7 +59,7 @@ $object = new User($db); $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); // Security check $socid = 0; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 1a667909ad55b..d6d857f0f27ea 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -71,7 +71,7 @@ $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); - $object->getrights(); + $object->loadRights(); } $account = new UserBankAccount($db); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a17d32c5f582d..b0d64602e214d 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1437,7 +1437,7 @@ // Check if user has rights if (!getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) { - $object->getrights(); + $object->loadRights(); if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) { setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings'); } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 1f2374dffdf60..df1d2e782f0a3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1299,7 +1299,7 @@ public function loadRights($moduletag = '', $forcereload = 0) $sql .= " ".$this->db->prefix()."usergroup_user as gu,"; $sql .= " ".$this->db->prefix()."rights_def as r"; $sql .= " WHERE r.id = gr.fk_id"; - // @FIXME Very strange business rules. Must be alays the same than into user->getrights() user/perms.php and user/group/perms.php + // @FIXME Very strange business rules. Must be always the same than into user->loadRights() user/perms.php and user/group/perms.php if (getDolGlobalString('MULTICOMPANY_BACKWARD_COMPATIBILITY')) { if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) { $sql .= " AND gu.entity IN (0,".$conf->entity.")"; @@ -1443,11 +1443,12 @@ public function loadRights($moduletag = '', $forcereload = 0) /** * Load permissions granted to a user->id into object user->rights - * TODO Remove this method. It has a name conflict with getRights() in CommonObject. + * TODO Remove this method. It has a name conflict with getRights() in CommonObject and was replaced in v20 with loadRights() * * @param string $moduletag Limit permission for a particular module ('' by default means load all permissions) * @param int $forcereload Force reload of permissions even if they were already loaded (ignore cache) * @return void + * @deprecated * * @see clearrights(), delrights(), addrights(), hasRight() * @phpstan-ignore-next-line diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 0b67de7d1978d..6b540e1f40733 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -81,7 +81,7 @@ if ($id > 0) { $object = new User($db); $object->fetch($id, '', '', 1); - $object->getrights(); + $object->loadRights(); $object->fetch_clicktodial(); $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 668890e0c91ea..06b51074c9549 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -102,7 +102,7 @@ $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); - $object->getrights(); + $object->loadRights(); //$upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ; // For users, the upload_dir is always $conf->user->entity for the moment $upload_dir = $conf->user->dir_output."/".$object->id; diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 51386fc3a0724..22a6db65cdb4b 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -68,7 +68,7 @@ // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. -$object->getrights(); +$object->loadRights(); // Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('groupcard', 'globalcard')); diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index 2bb9b4b2fac45..7149862bb15fe 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -44,7 +44,7 @@ $object = new UserGroup($db); $object->fetch($id, '', true); -$object->getrights(); +$object->loadRights(); // Users/Groups management only in master entity if transverse mode if (isModEnabled('multicompany') && $conf->entity > 1 && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) { diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 58c254d2717f2..8166525316b21 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -74,7 +74,7 @@ $object = new UserGroup($db); $object->fetch($id); -$object->getrights(); +$object->loadRights(); $entity = $conf->entity; @@ -106,7 +106,7 @@ } $user->clearrights(); - $user->getrights(); + $user->loadRights(); } if ($action == 'delrights' && $caneditperms) { @@ -122,7 +122,7 @@ } $user->clearrights(); - $user->getrights(); + $user->loadRights(); } } diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 45549a292486e..a40826c632f51 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -47,7 +47,7 @@ $object = new User($db); $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context $hookmanager->initHooks(array('usercard', 'userldap', 'globalcard')); diff --git a/htdocs/user/messaging.php b/htdocs/user/messaging.php index eabf89a25b3f8..713c7f83b343e 100644 --- a/htdocs/user/messaging.php +++ b/htdocs/user/messaging.php @@ -80,7 +80,7 @@ if ($result <= 0) { accessforbidden('User not found'); } - $object->getrights(); + $object->loadRights(); } // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 4fe5dd7e8de49..c6db1416a7b02 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -42,7 +42,7 @@ $object = new User($db); $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); // If user is not user read and no permission to read other users, we stop if (($object->id != $user->id) && (!$user->hasRight("user", "user", "read"))) { diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index f0027bc3b2e97..c0e20fb88932e 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -69,7 +69,7 @@ $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); - $object->getrights(); + $object->loadRights(); } $permissiontoadd = (($object->id == $user->id) || ($user->hasRight('user', 'user', 'lire'))); @@ -141,7 +141,7 @@ $object = new User($db); $result = $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification"); if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/thirdpartynameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) { diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index b401d90863f15..e97beefcde0bf 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -69,7 +69,7 @@ // Charge utilisateur edite $object = new User($db); $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); // Liste des zone de recherche permanentes supportees /* deprecated diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index d553851236a2c..03d63465a01dc 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -81,7 +81,7 @@ $object = new User($db); $object->fetch($id, '', '', 1); -$object->getrights(); +$object->loadRights(); $entity = $conf->entity; @@ -111,12 +111,12 @@ // If we are changing our own permissions, we reload permissions and menu if ($object->id == $user->id) { $user->clearrights(); - $user->getrights(); + $user->loadRights(); $menumanager->loadMenu(); } $object->clearrights(); - $object->getrights(); + $object->loadRights(); } if ($action == 'delrights' && $caneditperms && $confirm == 'yes') { @@ -130,12 +130,12 @@ // If we are changing our own permissions, we reload permissions and menu if ($object->id == $user->id) { $user->clearrights(); - $user->getrights(); + $user->loadRights(); $menumanager->loadMenu(); } $object->clearrights(); - $object->getrights(); + $object->loadRights(); } } diff --git a/htdocs/user/virtualcard.php b/htdocs/user/virtualcard.php index b519b6d67bf26..d2d180ba5a24b 100644 --- a/htdocs/user/virtualcard.php +++ b/htdocs/user/virtualcard.php @@ -44,7 +44,7 @@ $object = new User($db); if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); - $object->getrights(); + $object->loadRights(); } // Security check diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index b1666442c0181..d17e6682ebecf 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -297,7 +297,7 @@ function getActionComm($authentication, $id) } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('agenda', 'allactions', 'read')) { $actioncomm = new ActionComm($db); @@ -393,7 +393,7 @@ function getListActionCommType($authentication) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('agenda', 'myactions', 'read')) { $cactioncomm = new CActionComm($db); diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index ee681c18c738f..b584b88c09194 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -231,7 +231,7 @@ function getCategory($authentication, $id) } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); $nbmax = 10; if ($fuser->hasRight('categorie', 'lire')) { diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index d632ec121b7fd..c9f74cc8f5883 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -289,7 +289,7 @@ function getContact($authentication, $id, $ref_ext) } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); $contact = new Contact($db); $result = $contact->fetch($id, null, $ref_ext); diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index bb4d104c18d04..aa25ba56d18fe 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -330,7 +330,7 @@ function getInvoice($authentication, $id = 0, $ref = '', $ref_ext = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('facture', 'lire')) { $invoice = new Facture($db); @@ -698,7 +698,7 @@ function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '' ////////////////////// if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('commande', 'lire')) { $order = new Commande($db); diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index 8c75b40dfacd8..b73d2bef2fff5 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -407,7 +407,7 @@ function getOrder($authentication, $id = 0, $ref = '', $ref_ext = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('commande', 'lire')) { $order = new Commande($db); @@ -831,7 +831,7 @@ function validOrder($authentication, $id = 0, $id_warehouse = 0) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('commande', 'lire')) { $order = new Commande($db); diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 6fe3799c25385..4d23b21c1a669 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -243,7 +243,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); // Suppression de la chaine de character ../ dans $original_file $original_file = str_replace("../", "/", $original_file); diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 3d5ce1d17a2d1..443dc4ee53fd9 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -392,7 +392,7 @@ function getProductOrService($authentication, $id = 0, $ref = '', $ref_ext = '', $langcode = ($lang ? $lang : (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); - $fuser->getrights(); + $fuser->loadRights(); $nbmax = 10; if ($fuser->hasRight('produit', 'lire') || $fuser->hasRight('service', 'lire')) { @@ -1029,7 +1029,7 @@ function getProductsForCategory($authentication, $id, $lang = '') $langcode = ($lang ? $lang : (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); - $fuser->getrights(); + $fuser->loadRights(); $nbmax = 10; if ($fuser->hasRight('produit', 'lire')) { diff --git a/htdocs/webservices/server_project.php b/htdocs/webservices/server_project.php index d254fa870f206..5e731ece5ce2a 100644 --- a/htdocs/webservices/server_project.php +++ b/htdocs/webservices/server_project.php @@ -281,7 +281,7 @@ function createProject($authentication, $project) if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('projet', 'creer')) { $newobject = new Project($db); @@ -376,7 +376,7 @@ function getProject($authentication, $id = '', $ref = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('projet', 'lire')) { $project = new Project($db); diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index 77442df3f0385..482dbb7420643 100644 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -267,7 +267,7 @@ function getSupplierInvoice($authentication, $id = 0, $ref = '', $ref_ext = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('fournisseur', 'facture', 'lire')) { $invoice = new FactureFournisseur($db); diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index d53ee73ac9d3e..83e2acffa769f 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -339,7 +339,7 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '', $bar } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('societe', 'lire')) { $thirdparty = new Societe($db); @@ -845,7 +845,7 @@ function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: deleteThirdParty 1"); if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('societe', 'lire') && $fuser->hasRight('societe', 'supprimer')) { $thirdparty = new Societe($db); diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 1ffc7458d736a..fd6a4e96f14f6 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -354,7 +354,7 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('user', 'user', 'lire') || ($fuser->hasRight('user', 'self', 'creer') && $id && $id == $fuser->id) @@ -517,7 +517,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('societe', 'creer')) { $thirdparty = new Societe($db); @@ -716,7 +716,7 @@ function setUserPassword($authentication, $shortuser) } if (!$error) { - $fuser->getrights(); + $fuser->loadRights(); if ($fuser->hasRight('user', 'user', 'password') || $fuser->hasRight('user', 'self', 'password')) { $userstat = new User($db); From 5727dadfdd2da425ed86114e0e280b4d50614b54 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 10:55:53 +0200 Subject: [PATCH 098/127] Fix condition to get permission --- htdocs/user/class/user.class.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 92b3f4c38e628..c0f0b8fc13e96 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1241,11 +1241,11 @@ public function loadRights($moduletag = '', $forcereload = 0) // on old version, we use entity defined into table r only $sql .= " AND r.entity IN (0,".(isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') ? "1," : "").$conf->entity.")"; } else { - // On table r=rights_def, the unique key is (id, entity) because id is hard coded into module descriptor and insert during module activation. + // On table r=rights_def, the unique key is (id, entity) because id is hard coded into module descriptor and inserted during module activation. // So we must include the filter on entity on both table r. and ur. $sql .= " AND r.entity = ".((int) $conf->entity)." AND ur.entity = ".((int) $conf->entity); } - $sql .= " AND ur.fk_user= ".((int) $this->id); + $sql .= " AND ur.fk_user = ".((int) $this->id); $sql .= " AND r.perms IS NOT NULL"; if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) { $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled @@ -1275,12 +1275,12 @@ public function loadRights($moduletag = '', $forcereload = 0) if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { $this->rights->$module->$perms = new stdClass(); } - if (empty($this->rights->$module->$perms->$subperms)) { + if (empty($this->rights->$module->$perms->$subperms)) { // if not already counted $this->nb_rights++; } $this->rights->$module->$perms->$subperms = 1; } else { - if (empty($this->rights->$module->$perms)) { + if (empty($this->rights->$module->$perms)) { // if not already counted $this->nb_rights++; } $this->rights->$module->$perms = 1; @@ -1318,6 +1318,9 @@ public function loadRights($moduletag = '', $forcereload = 0) $sql .= " AND gr.fk_usergroup = gu.fk_usergroup"; $sql .= " AND gu.fk_user = ".((int) $this->id); $sql .= " AND r.perms IS NOT NULL"; + if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) { + $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled + } if ($moduletag) { $sql .= " AND r.module = '".$this->db->escape($moduletag)."'"; } @@ -1343,16 +1346,16 @@ public function loadRights($moduletag = '', $forcereload = 0) if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { $this->rights->$module->$perms = new stdClass(); } - if (empty($this->rights->$module->$perms->$subperms)) { // already counted + if (empty($this->rights->$module->$perms->$subperms)) { // if not already counted $this->nb_rights++; } $this->rights->$module->$perms->$subperms = 1; } else { - if (empty($this->rights->$module->$perms)) { // already counted - $this->nb_rights++; - } // if we have already define a subperm like this $this->rights->$module->level1->level2 with llx_user_rights, we don't want override level1 because the level2 can be not define on user group if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { + if (empty($this->rights->$module->$perms)) { // if not already counted + $this->nb_rights++; + } $this->rights->$module->$perms = 1; } } From 6558c69ac7ba0308fde7d2a529a4377c2a065c2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 11:17:14 +0200 Subject: [PATCH 099/127] Doc --- htdocs/user/class/user.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index c0f0b8fc13e96..e266212b5ab9a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1238,7 +1238,10 @@ public function loadRights($moduletag = '', $forcereload = 0) $sql .= " ".$this->db->prefix()."rights_def as r"; $sql .= " WHERE r.id = ur.fk_id"; if (getDolGlobalString('MULTICOMPANY_BACKWARD_COMPATIBILITY')) { - // on old version, we use entity defined into table r only + // On old version, we used entity defined into table r only + // @FIXME Test on MULTICOMPANY_BACKWARD_COMPATIBILITY is a very strange business rules because the select should be always the + // same than into user->loadRights() in user/perms.php and user/group/perms.php + // We should never use and remove this case. $sql .= " AND r.entity IN (0,".(isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') ? "1," : "").$conf->entity.")"; } else { // On table r=rights_def, the unique key is (id, entity) because id is hard coded into module descriptor and inserted during module activation. @@ -1299,8 +1302,10 @@ public function loadRights($moduletag = '', $forcereload = 0) $sql .= " ".$this->db->prefix()."usergroup_user as gu,"; $sql .= " ".$this->db->prefix()."rights_def as r"; $sql .= " WHERE r.id = gr.fk_id"; - // @FIXME Very strange business rules. Must be alays the same than into user->getrights() user/perms.php and user/group/perms.php if (getDolGlobalString('MULTICOMPANY_BACKWARD_COMPATIBILITY')) { + // @FIXME Test on MULTICOMPANY_BACKWARD_COMPATIBILITY is a very strange business rules because the select should be always the + // same than into user->loadRights() in user/perms.php and user/group/perms.php + // We should never use and remove this case. if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) { $sql .= " AND gu.entity IN (0,".$conf->entity.")"; } else { From 12e65797246ad6e0326fc8b248bff3842221c974 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 13:52:04 +0200 Subject: [PATCH 100/127] FIX fatal error --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index b06ba8834e951..39ad76ff8eecc 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -178,7 +178,7 @@ // Special field $model_pdf = GETPOST('model'); - if (!empty($model_pdf) && property_exists($this, 'model_pdf')) { + if (!empty($model_pdf) && property_exists($object, 'model_pdf')) { $object->model_pdf = $model_pdf; } From fc2bf8134f1e28bc5129ebea99a0106f4b344a16 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 13:52:04 +0200 Subject: [PATCH 101/127] FIX fatal error --- htdocs/core/actions_addupdatedelete.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 45e630799b8ce..ba22c8990e9fd 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -178,7 +178,7 @@ // Special field $model_pdf = GETPOST('model'); - if (!empty($model_pdf) && property_exists($this, 'model_pdf')) { + if (!empty($model_pdf) && property_exists($object, 'model_pdf')) { $object->model_pdf = $model_pdf; } From 16c1c016173e9e3a7482dcff3c350ab0c77ebb65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:07:43 +0200 Subject: [PATCH 102/127] Debug v20 - Fix roworder of stocktransfer --- htdocs/core/ajax/row.php | 8 +++++++- .../stocktransfer/stocktransfer_card.php | 20 ++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 274750b50d13b..625ffc62a8d99 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -57,6 +57,7 @@ $table_element_line = GETPOST('table_element_line', 'aZ09', 3); $fk_element = GETPOST('fk_element', 'aZ09', 3); $element_id = GETPOSTINT('element_id', 3); +$action = 'edit'; // Security check @@ -120,6 +121,8 @@ $perm = 1; } elseif ($table_element_line == 'contratdet' && $fk_element == 'fk_contrat' && $user->hasRight('contrat', 'creer')) { $perm = 1; + } elseif ($table_element_line == 'stocktransfer_stocktransferline' && $fk_element == 'fk_stocktransfer' && $user->hasRight('stocktransfer', 'stocktransfer', 'write')) { + $perm = 1; } else { $tmparray = explode('_', $table_element_line); $tmpmodule = $tmparray[0]; @@ -128,6 +131,7 @@ $perm = 1; } } + // Overwrite $perm by hook $parameters = array('roworder' => &$roworder, 'table_element_line' => &$table_element_line, 'fk_element' => &$fk_element, 'element_id' => &$element_id, 'perm' => &$perm); $row = new GenericObject($db); $row->table_element_line = $table_element_line; @@ -137,12 +141,14 @@ if ($reshook > 0) { $perm = $hookmanager->resArray['perm']; } + if (! $perm) { // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. // If we are here, it is a hack attempt, so we report a warning. print 'Bad permission to modify position of lines for object in table '.$table_element_line; dol_syslog('Bad permission to modify position of lines for object in table='.$table_element_line.', fk_element='.$fk_element, LOG_WARNING); - accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); + //accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); + httponly_accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); } $rowordertab = explode(',', $roworder); diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 837e8bc5eedca..b40ec3b1d5cab 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -844,21 +844,24 @@ print ''; } - print ''; - + // Warehouse source + print ''; if ($action === 'editline' && $line->id == $lineid) { print $formproduct->selectWarehouses($line->fk_warehouse_source, 'fk_warehouse_source', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); } else { print $warehousestatics->getNomUrl(1); } print ''; - print ''; + + // Warehouse target + print ''; if ($action === 'editline' && $line->id == $lineid) { print $formproduct->selectWarehouses($line->fk_warehouse_destination, 'fk_warehouse_destination', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); } else { print $warehousestatict->getNomUrl(1); } print ''; + if ($action === 'editline' && $line->id == $lineid) { print ''; } else { @@ -877,9 +880,11 @@ print ''; print price($line->pmp, 0, '', 1, -1, -1, $conf->currency); print ''; + print ''; print price($line->pmp * $line->qty, 0, '', 1, -1, -1, $conf->currency); print ''; + if (empty($object->status) && $permissiontoadd) { if ($action === 'editline' && $line->id == $lineid) { //print ''; @@ -967,14 +972,14 @@ } } - // On vide le tableau pour qu'il se charge tout seul lors de l'appel à la fonction select_warehouses + // We clean array. It is filled automatically when calling function select_warehouses $formproduct->cache_warehouses = array(); // In warehouse print ''; print $formproduct->selectWarehouses(empty($fk_warehouse_source) ? $object->fk_warehouse_source : $fk_warehouse_source, 'fk_warehouse_source', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200', $TExcludedWarehouseSource); print ''; - // On vide le tableau pour qu'il se charge tout seul lors de l'appel à la fonction select_warehouses + // We clean array. It is filled automatically when calling function select_warehouses $formproduct->cache_warehouses = array(); // Out warehouse print ''; @@ -983,18 +988,23 @@ // Qty print ''; + // PMP print ''; if (getDolGlobalInt('PRODUCT_USE_UNITS')) { // Unité print ''; } + // PMP * Qty print ''; + // Button to add line print ''; + // Grad and drop lines print ''; + print ''; } From f4d841c807bd2fb6e1f684425db3601b35b9e4b3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:07:43 +0200 Subject: [PATCH 103/127] Debug v20 - Fix roworder of stocktransfer --- htdocs/core/ajax/row.php | 8 +++++++- .../stocktransfer/stocktransfer_card.php | 20 ++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 274750b50d13b..625ffc62a8d99 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -57,6 +57,7 @@ $table_element_line = GETPOST('table_element_line', 'aZ09', 3); $fk_element = GETPOST('fk_element', 'aZ09', 3); $element_id = GETPOSTINT('element_id', 3); +$action = 'edit'; // Security check @@ -120,6 +121,8 @@ $perm = 1; } elseif ($table_element_line == 'contratdet' && $fk_element == 'fk_contrat' && $user->hasRight('contrat', 'creer')) { $perm = 1; + } elseif ($table_element_line == 'stocktransfer_stocktransferline' && $fk_element == 'fk_stocktransfer' && $user->hasRight('stocktransfer', 'stocktransfer', 'write')) { + $perm = 1; } else { $tmparray = explode('_', $table_element_line); $tmpmodule = $tmparray[0]; @@ -128,6 +131,7 @@ $perm = 1; } } + // Overwrite $perm by hook $parameters = array('roworder' => &$roworder, 'table_element_line' => &$table_element_line, 'fk_element' => &$fk_element, 'element_id' => &$element_id, 'perm' => &$perm); $row = new GenericObject($db); $row->table_element_line = $table_element_line; @@ -137,12 +141,14 @@ if ($reshook > 0) { $perm = $hookmanager->resArray['perm']; } + if (! $perm) { // We should not be here. If we are not allowed to reorder rows, feature should not be visible on script. // If we are here, it is a hack attempt, so we report a warning. print 'Bad permission to modify position of lines for object in table '.$table_element_line; dol_syslog('Bad permission to modify position of lines for object in table='.$table_element_line.', fk_element='.$fk_element, LOG_WARNING); - accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); + //accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); + httponly_accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line); } $rowordertab = explode(',', $roworder); diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 15ccc7da44851..c4e285b550333 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -844,21 +844,24 @@ print ''; } - print ''; - + // Warehouse source + print ''; if ($action === 'editline' && $line->id == $lineid) { print $formproduct->selectWarehouses($line->fk_warehouse_source, 'fk_warehouse_source', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); } else { print $warehousestatics->getNomUrl(1); } print ''; - print ''; + + // Warehouse target + print ''; if ($action === 'editline' && $line->id == $lineid) { print $formproduct->selectWarehouses($line->fk_warehouse_destination, 'fk_warehouse_destination', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); } else { print $warehousestatict->getNomUrl(1); } print ''; + if ($action === 'editline' && $line->id == $lineid) { print ''; } else { @@ -877,9 +880,11 @@ print ''; print price($line->pmp, 0, '', 1, -1, -1, $conf->currency); print ''; + print ''; print price($line->pmp * $line->qty, 0, '', 1, -1, -1, $conf->currency); print ''; + if (empty($object->status) && $permissiontoadd) { if ($action === 'editline' && $line->id == $lineid) { //print ''; @@ -967,14 +972,14 @@ } } - // On vide le tableau pour qu'il se charge tout seul lors de l'appel à la fonction select_warehouses + // We clean array. It is filled automatically when calling function select_warehouses $formproduct->cache_warehouses = array(); // In warehouse print ''; print $formproduct->selectWarehouses(empty($fk_warehouse_source) ? $object->fk_warehouse_source : $fk_warehouse_source, 'fk_warehouse_source', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200', $TExcludedWarehouseSource); print ''; - // On vide le tableau pour qu'il se charge tout seul lors de l'appel à la fonction select_warehouses + // We clean array. It is filled automatically when calling function select_warehouses $formproduct->cache_warehouses = array(); // Out warehouse print ''; @@ -983,18 +988,23 @@ // Qty print ''; + // PMP print ''; if (getDolGlobalInt('PRODUCT_USE_UNITS')) { // Unité print ''; } + // PMP * Qty print ''; + // Button to add line print ''; + // Grad and drop lines print ''; + print ''; } From 3d7d901f80feef4143c50688de279876b1d7ff22 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:19:19 +0200 Subject: [PATCH 104/127] Debug look and feel v20 --- .../stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php | 2 +- htdocs/product/stock/stocktransfer/stocktransfer_card.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php index 939b2bc0b136b..af8444991edd6 100644 --- a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php +++ b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php @@ -38,7 +38,7 @@ function stocktransferPrepareHead($object) $head = array(); $head[$h][0] = dol_buildpath("/product/stock/stocktransfer/stocktransfer_card.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Card"); + $head[$h][1] = $langs->trans("StockTransfer"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index b40ec3b1d5cab..ecb64197c7ed1 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -782,8 +782,6 @@ $param = ''; - $conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE = true; // Full display needed to see all column title details - print ''; print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); if (isModEnabled('productbatch')) { From a41d9daa21b18c11ab055e3605c3a12ddd4a9942 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:35:42 +0200 Subject: [PATCH 105/127] Debug v20 --- .../stocktransfer/doc/pdf_eagle.modules.php | 19 ++-- .../doc/pdf_eagle_proforma.modules.php | 92 ++++++++++--------- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index 82e331db31a4a..d58971275aabe 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -120,7 +120,7 @@ public function __construct(DoliDB $db) // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) { + if (empty($this->emetteur->country_code)) { $this->emetteur->country_code = substr($langs->defaultlang, -2); } @@ -192,7 +192,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $outputlangs->charset_output = 'ISO-8859-1'; } - // Load traductions files required by page + // Load translation files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); global $outputlangsbis; @@ -264,7 +264,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } if ($conf->stocktransfer->dir_output) { - // Definition de $dir et $file + // Definition of $dir and $file if ($object->specimen) { $dir = $conf->stocktransfer->dir_output; $file = $dir."/SPECIMEN.pdf"; @@ -325,10 +325,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("Shipment")); + $pdf->SetSubject($outputlangs->transnoentities("StockTransfer")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("StockTransfer")); if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -755,7 +755,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede return 0; } } else { - $this->error = $langs->transnoentities("ErrorConstantNotDefined", "EXP_OUTPUTDIR"); + $this->error = $langs->transnoentities("ErrorConstantNotDefined", "STOCKTRANSFER_OUTPUTDIR"); return 0; } } @@ -1010,14 +1010,15 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) // phpcs:enable global $conf, $langs; - $langs->load("orders"); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (getDolGlobalString('SHIPPING_DRAFT_WATERMARK'))) { + if ($object->statut == 0 && (getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK'))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK); } @@ -1272,6 +1273,6 @@ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); - return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); + return pdf_pagefoot($pdf, $outputlangs, 'STOCKTRANSFER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } 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 24ceb7b885568..7e9b3ce310750 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -86,7 +86,7 @@ public function __construct($db) global $langs, $mysoc; // Translations - $langs->loadLangs(array("main", "bills", "products")); + $langs->loadLangs(array("main", "bills", "products", "stocks")); $this->db = $db; $this->name = $langs->trans("StockTransferSheetProforma"); @@ -158,14 +158,15 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $outputlangs->charset_output = 'ISO-8859-1'; } - // Load translation files required by the page - $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); + // Load translation files required by page + $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); + global $outputlangsbis; + $outputlangsbis = null; if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && $outputlangs->defaultlang != getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) { - global $outputlangsbis; $outputlangsbis = new Translate('', $conf); $outputlangsbis->setDefaultLang(getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')); - $outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); + $outputlangsbis->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); } $nblines = is_array($object->lines) ? count($object->lines) : 0; @@ -178,7 +179,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); $this->atleastonephoto = false; - if (getDolGlobalString('MAIN_GENERATE_ORDERS_WITH_PICTURE')) { + if (getDolGlobalString('MAIN_GENERATE_STOCKTRANSFER_WITH_PICTURE')) { $objphoto = new Product($this->db); for ($i = 0; $i < $nblines; $i++) { @@ -261,14 +262,18 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + // Set nblines with the new facture lines content after hook + $nblines = is_array($object->lines) ? count($object->lines) : 0; + // Create pdf instance $pdf = pdf_getInstance($this->format); - $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance + $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetAutoPageBreak(1, 0); $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) + $pdf->SetAutoPageBreak(1, 0); if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); @@ -276,7 +281,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $pdf->SetFont(pdf_getPDFFont($outputlangs)); // Set path to the background PDF File - if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { + if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); $tplidx = $pdf->importPage(1); } @@ -286,10 +291,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pdf->SetDrawColor(128, 128, 128); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("PdfOrderTitle")); + $pdf->SetSubject($outputlangs->transnoentities("StockTransferProFormat")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle").($object->thirdparty ? " ".$outputlangs->convToOutputCharset($object->thirdparty->name) : '')); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("StockTransfer")); if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -324,7 +329,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $tab_height = 130; // Incoterm - if ($conf->incoterm->enabled) { + $height_incoterms = 0; + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -339,6 +345,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); $tab_top = $nexY + 6; + $height_incoterms += 4; } } @@ -562,8 +569,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); + $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text @@ -682,6 +689,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $tvaligne = $object->lines[$i]->total_tva; } + /* $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; $localtax1_rate = $object->lines[$i]->localtax1_tx; @@ -689,11 +697,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $localtax1_type = $object->lines[$i]->localtax1_type; $localtax2_type = $object->lines[$i]->localtax2_type; - // TODO remise_percent is an obsolete field for object parent - /*if ($object->remise_percent) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100;*/ - $vatrate = (string) $object->lines[$i]->tva_tx; // Retrieve type from database for backward compatibility with old records @@ -727,6 +730,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $this->tva[$vatrate] = 0; } $this->tva[$vatrate] += $tvaligne; + */ // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { @@ -781,14 +785,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - // Affiche zone infos - // ! No paiement information for this model ! - //$posy = $this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); - - // Affiche zone totaux + // Display total area $posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { $pdf->AliasNbPages(); @@ -1178,7 +1178,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && getDolGlobalString('COMMANDE_DRAFT_WATERMARK')) { + if ($object->statut == 0 && getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK')) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('COMMANDE_DRAFT_WATERMARK')); } @@ -1188,7 +1188,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $w = 110; $posy = $this->marge_haute; - $posx = $this->page_largeur - $this->marge_droite - 100; + $posx = $this->page_largeur - $this->marge_droite - $w; $pdf->SetXY($this->marge_gauche, $posy); @@ -1219,21 +1219,18 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek } } - $pdf->SetFont('', 'B', $default_font_size + 3); - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $title = $outputlangs->transnoentities($titlekey); - $pdf->MultiCell($w, 3, $title, '', 'R'); + $pdf->SetDrawColor(128, 128, 128); - $pdf->SetFont('', 'B', $default_font_size); + $posx = $this->page_largeur - $w - $this->marge_droite; + $posy = $this->marge_haute; - $posy += 5; + $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + $title = $outputlangs->transnoentities("StockTransferSheet").' '.$object->ref; + $pdf->MultiCell($w, 4, $title, '', 'R'); - $posy += 1; - $pdf->SetFont('', '', $default_font_size - 1); + $pdf->SetFont('', '', $default_font_size + 1); // Date prévue depart if (!empty($object->date_prevue_depart)) { @@ -1267,6 +1264,13 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateReelleArrivee")." : ".dol_print_date($object->date_reelle_arrivee, "day", false, $outputlangs, true), '', 'R'); } + if (!empty($object->thirdparty->code_client)) { + $posy += 4; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); + } + if ($object->ref_client) { $posy += 5; $pdf->SetXY($posx, $posy); @@ -1369,7 +1373,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell(66, 5, $outputlangs->transnoentities("Sender").":", 0, 'L'); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender").":", 0, 'L'); $pdf->SetXY($posx, $posy); $pdf->SetFillColor(230, 230, 230); $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); @@ -1414,8 +1418,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek // Show recipient $widthrecbox = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 92 : 100; if ($this->page_largeur < 210) { - $widthrecbox = 84; - } // To work with US executive format + $widthrecbox = 84; // To work with US executive format + } $posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) { @@ -1452,17 +1456,17 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek /** * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Object $object Object to show - * @param Translate $outputlangs Object lang for output - * @param int $hidefreetext 1=Hide free text - * @return int Return height of bottom margin including footer text + * @param TCPDF $pdf PDF + * @param StockTransfer $object Object to show + * @param Translate $outputlangs Object lang for output + * @param int $hidefreetext 1=Hide free text + * @return int Return height of bottom margin including footer text */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); - return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); + return pdf_pagefoot($pdf, $outputlangs, 'STOCKTRANSFER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From bc9afff591f86e19380eedbd2ee898391faea970 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:19:19 +0200 Subject: [PATCH 106/127] Debug look and feel v20 --- .../stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php | 2 +- htdocs/product/stock/stocktransfer/stocktransfer_card.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php index 939b2bc0b136b..af8444991edd6 100644 --- a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php +++ b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php @@ -38,7 +38,7 @@ function stocktransferPrepareHead($object) $head = array(); $head[$h][0] = dol_buildpath("/product/stock/stocktransfer/stocktransfer_card.php", 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Card"); + $head[$h][1] = $langs->trans("StockTransfer"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index c4e285b550333..d71bb56640d68 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -782,8 +782,6 @@ $param = ''; - $conf->global->MAIN_DISABLE_WRAPPING_ON_COLUMN_TITLE = true; // Full display needed to see all column title details - print ''; print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); if (isModEnabled('productbatch')) { From cd17e88a5045dbbd3700e101fb382f2fe188c94a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:35:42 +0200 Subject: [PATCH 107/127] Debug v20 --- .../stocktransfer/doc/pdf_eagle.modules.php | 19 ++-- .../doc/pdf_eagle_proforma.modules.php | 92 ++++++++++--------- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index e06b579cbf3bf..e9369f252754b 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -120,7 +120,7 @@ public function __construct(DoliDB $db) // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) { + if (empty($this->emetteur->country_code)) { $this->emetteur->country_code = substr($langs->defaultlang, -2); } @@ -192,7 +192,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $outputlangs->charset_output = 'ISO-8859-1'; } - // Load traductions files required by page + // Load translation files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); global $outputlangsbis; @@ -264,7 +264,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } if ($conf->stocktransfer->dir_output) { - // Definition de $dir et $file + // Definition of $dir and $file if ($object->specimen) { $dir = $conf->stocktransfer->dir_output; $file = $dir."/SPECIMEN.pdf"; @@ -325,10 +325,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("Shipment")); + $pdf->SetSubject($outputlangs->transnoentities("StockTransfer")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("StockTransfer")); if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -755,7 +755,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede return 0; } } else { - $this->error = $langs->transnoentities("ErrorConstantNotDefined", "EXP_OUTPUTDIR"); + $this->error = $langs->transnoentities("ErrorConstantNotDefined", "STOCKTRANSFER_OUTPUTDIR"); return 0; } } @@ -1010,14 +1010,15 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) // phpcs:enable global $conf, $langs; - $langs->load("orders"); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); $default_font_size = pdf_getPDFFontSize($outputlangs); pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (getDolGlobalString('SHIPPING_DRAFT_WATERMARK'))) { + if ($object->statut == 0 && (getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK'))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK); } @@ -1272,6 +1273,6 @@ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); - return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); + return pdf_pagefoot($pdf, $outputlangs, 'STOCKTRANSFER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } } 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 561b85ff9c02e..5ce8211bb03b6 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -86,7 +86,7 @@ public function __construct($db) global $langs, $mysoc; // Translations - $langs->loadLangs(array("main", "bills", "products")); + $langs->loadLangs(array("main", "bills", "products", "stocks")); $this->db = $db; $this->name = $langs->trans("StockTransferSheetProforma"); @@ -158,14 +158,15 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $outputlangs->charset_output = 'ISO-8859-1'; } - // Load translation files required by the page - $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); + // Load translation files required by page + $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); + global $outputlangsbis; + $outputlangsbis = null; if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && $outputlangs->defaultlang != getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) { - global $outputlangsbis; $outputlangsbis = new Translate('', $conf); $outputlangsbis->setDefaultLang(getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')); - $outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); + $outputlangsbis->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); } $nblines = is_array($object->lines) ? count($object->lines) : 0; @@ -178,7 +179,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); $this->atleastonephoto = false; - if (getDolGlobalString('MAIN_GENERATE_ORDERS_WITH_PICTURE')) { + if (getDolGlobalString('MAIN_GENERATE_STOCKTRANSFER_WITH_PICTURE')) { $objphoto = new Product($this->db); for ($i = 0; $i < $nblines; $i++) { @@ -261,14 +262,18 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + // Set nblines with the new facture lines content after hook + $nblines = is_array($object->lines) ? count($object->lines) : 0; + // Create pdf instance $pdf = pdf_getInstance($this->format); - $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance + $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetAutoPageBreak(1, 0); $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) + $pdf->SetAutoPageBreak(1, 0); if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); @@ -276,7 +281,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $pdf->SetFont(pdf_getPDFFont($outputlangs)); // Set path to the background PDF File - if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { + if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); $tplidx = $pdf->importPage(1); } @@ -286,10 +291,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pdf->SetDrawColor(128, 128, 128); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("PdfOrderTitle")); + $pdf->SetSubject($outputlangs->transnoentities("StockTransferProFormat")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle").($object->thirdparty ? " ".$outputlangs->convToOutputCharset($object->thirdparty->name) : '')); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("StockTransfer")); if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { $pdf->SetCompression(false); } @@ -324,7 +329,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $tab_height = 130; // Incoterm - if ($conf->incoterm->enabled) { + $height_incoterms = 0; + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; @@ -339,6 +345,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); $tab_top = $nexY + 6; + $height_incoterms += 4; } } @@ -562,8 +569,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); + $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text @@ -682,6 +689,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $tvaligne = $object->lines[$i]->total_tva; } + /* $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; $localtax1_rate = $object->lines[$i]->localtax1_tx; @@ -689,11 +697,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $localtax1_type = $object->lines[$i]->localtax1_type; $localtax2_type = $object->lines[$i]->localtax2_type; - // TODO remise_percent is an obsolete field for object parent - /*if ($object->remise_percent) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100;*/ - $vatrate = (string) $object->lines[$i]->tva_tx; // Retrieve type from database for backward compatibility with old records @@ -727,6 +730,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $this->tva[$vatrate] = 0; } $this->tva[$vatrate] += $tvaligne; + */ // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { @@ -781,14 +785,10 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede } $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - // Affiche zone infos - // ! No paiement information for this model ! - //$posy = $this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); - - // Affiche zone totaux + // Display total area $posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Pied de page + // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { $pdf->AliasNbPages(); @@ -1178,7 +1178,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && getDolGlobalString('COMMANDE_DRAFT_WATERMARK')) { + if ($object->statut == 0 && getDolGlobalString('STOCKTRANSFER_DRAFT_WATERMARK')) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', getDolGlobalString('COMMANDE_DRAFT_WATERMARK')); } @@ -1188,7 +1188,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $w = 110; $posy = $this->marge_haute; - $posx = $this->page_largeur - $this->marge_droite - 100; + $posx = $this->page_largeur - $this->marge_droite - $w; $pdf->SetXY($this->marge_gauche, $posy); @@ -1219,21 +1219,18 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek } } - $pdf->SetFont('', 'B', $default_font_size + 3); - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $title = $outputlangs->transnoentities($titlekey); - $pdf->MultiCell($w, 3, $title, '', 'R'); + $pdf->SetDrawColor(128, 128, 128); - $pdf->SetFont('', 'B', $default_font_size); + $posx = $this->page_largeur - $w - $this->marge_droite; + $posy = $this->marge_haute; - $posy += 5; + $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + $title = $outputlangs->transnoentities("StockTransferSheet").' '.$object->ref; + $pdf->MultiCell($w, 4, $title, '', 'R'); - $posy += 1; - $pdf->SetFont('', '', $default_font_size - 1); + $pdf->SetFont('', '', $default_font_size + 1); // Date prévue depart if (!empty($object->date_prevue_depart)) { @@ -1267,6 +1264,13 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateReelleArrivee")." : ".dol_print_date($object->date_reelle_arrivee, "day", false, $outputlangs, true), '', 'R'); } + if (!empty($object->thirdparty->code_client)) { + $posy += 4; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); + } + if ($object->ref_client) { $posy += 5; $pdf->SetXY($posx, $posy); @@ -1369,7 +1373,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell(66, 5, $outputlangs->transnoentities("Sender").":", 0, 'L'); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender").":", 0, 'L'); $pdf->SetXY($posx, $posy); $pdf->SetFillColor(230, 230, 230); $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); @@ -1414,8 +1418,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek // Show recipient $widthrecbox = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 92 : 100; if ($this->page_largeur < 210) { - $widthrecbox = 84; - } // To work with US executive format + $widthrecbox = 84; // To work with US executive format + } $posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) { @@ -1452,17 +1456,17 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlek /** * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Object $object Object to show - * @param Translate $outputlangs Object lang for output - * @param int $hidefreetext 1=Hide free text - * @return int Return height of bottom margin including footer text + * @param TCPDF $pdf PDF + * @param StockTransfer $object Object to show + * @param Translate $outputlangs Object lang for output + * @param int $hidefreetext 1=Hide free text + * @return int Return height of bottom margin including footer text */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); - return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); + return pdf_pagefoot($pdf, $outputlangs, 'STOCKTRANSFER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From 033f0aa0a7f23165579f6af2a8e5b51e69e90e98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 14:52:34 +0200 Subject: [PATCH 108/127] Fix translations --- .../modules/stocktransfer/doc/pdf_eagle_proforma.modules.php | 2 +- htdocs/langs/en_US/website.lang | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 7e9b3ce310750..ac6ecb6b3f25a 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -291,7 +291,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $pdf->SetDrawColor(128, 128, 128); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("StockTransferProFormat")); + $pdf->SetSubject($outputlangs->transnoentities("StockTransferSheetProforma")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("StockTransfer")); diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 33c4d523e2f10..e3468f8189a4e 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -271,7 +271,8 @@ totalTaxIncl=Total (tax incl.) clickToClose=Click to close sidebarCategories=Categories noSubCat=NoSubCat -specialPromo=Specials promotions +specialPromo=Promotions +allSpecials=All promotions newProducts=New products allNewProducts= All new products view=View: From 63f43ad61e350b49d2114d98f7b383da0dd93b5d Mon Sep 17 00:00:00 2001 From: Hasanuzzaman Sattar Date: Fri, 2 Aug 2024 18:23:39 +0530 Subject: [PATCH 109/127] Fix for issue #30531 (#30532) * issue#30513 * FIX#30531 --- htdocs/accountancy/admin/card.php | 6 +++--- htdocs/install/mysql/tables/llx_menu.key.sql | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 59a412fa3a4b6..c15274948eb5c 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -305,15 +305,15 @@ // Account number print ''.$langs->trans("AccountNumber").''; - print ''; + print ''; // Label print ''.$langs->trans("Label").''; - print ''; + print ''; // Label short print ''.$langs->trans("LabelToShow").''; - print ''; + print ''; // Account parent print ''.$langs->trans("Accountparent").''; diff --git a/htdocs/install/mysql/tables/llx_menu.key.sql b/htdocs/install/mysql/tables/llx_menu.key.sql index 4de7b3217e7dc..bf7caf6d346c1 100644 --- a/htdocs/install/mysql/tables/llx_menu.key.sql +++ b/htdocs/install/mysql/tables/llx_menu.key.sql @@ -22,4 +22,4 @@ ALTER TABLE llx_menu ADD INDEX idx_menu_menuhandler_type (menu_handler, type); -- Error SQL DB_ERROR_1170 BLOB/TEXT column 'url' used in key specification without a key length, so we removed completely the unique key --- ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity, url); +-- ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, entity, url); \ No newline at end of file From 50b0243f0efc34b316e63c2cddc7887e4538881d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 15:00:45 +0200 Subject: [PATCH 110/127] Default selected value --- htdocs/expensereport/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index aa2627af406f2..79c2704dfa0dc 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -167,7 +167,7 @@ 'd.date_valid' => array('label' => $langs->trans("DateValidation"), 'checked' => 1), 'd.date_approve' => array('label' => $langs->trans("DateApprove"), 'checked' => 1), 'd.total_ht' => array('label' => $langs->trans("AmountHT"), 'checked' => 1), - 'd.total_vat' => array('label' => $langs->trans("AmountVAT"), 'checked' => 1), + 'd.total_vat' => array('label' => $langs->trans("AmountVAT"), 'checked' => -1), 'd.total_ttc' => array('label' => $langs->trans("AmountTTC"), 'checked' => 1), 'd.date_create' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500), 'd.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 500), From 2fc0b5d3cf29e3e2b8c8db9536134b8589b6e12c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 15:00:48 +0200 Subject: [PATCH 111/127] Default selected value From d59568e73b5fa7ae03b1f7ba84f3203280d86d07 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 15:32:54 +0200 Subject: [PATCH 112/127] Trans --- htdocs/langs/en_US/ecm.lang | 10 +++++----- htdocs/theme/eldy/global.inc.php | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index 5ba4fbe5dc4c6..14b8229687c4b 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -2,10 +2,10 @@ ECMNbOfDocs=No. of documents in directory ECMSection=Directory ECMSectionManual=Manual directory -ECMSectionAuto=Automatic directory -ECMSectionsManual=Private manual tree -ECMSectionsAuto=Private automatic tree -ECMSectionsMedias=Public medias tree +ECMSectionAuto=Object directory +ECMSectionsManual=Manual directories +ECMSectionsAuto=Object directories +ECMSectionsMedias=Public medias directories ECMSections=Directories ECMRoot=ECM Root ECMNewSection=New directory @@ -19,7 +19,7 @@ ECMArea=DMS/ECM area ECMAreaDesc=The DMS/ECM (Document Management System / Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. ECMAreaDesc2a=* Manual directories can be used to save documents with a free organization of the tree structure. ECMAreaDesc2b=* Automatic directories are filled automatically when adding documents from the page of an element. -ECMAreaDesc3=* Public directories are files into the subdirectory /medias of the documents directory, readable by everybody with no need to be logged and no need to have the file shared explicitly. It is used to store image files for the emailing or website module for example. +ECMAreaDesc3=* Public directories are files into the subdirectory /medias of the documents directory, readable by everybody on internet with no need to be logged and no need to have the file shared explicitly. It is used to store image files for the emailing or website module for example. ECMSectionWasRemoved=Directory %s has been deleted. ECMSectionWasCreated=Directory %s has been created. ECMSearchByKeywords=Search by keywords diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a068454cd1dae..bfbe053e67ce2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1241,7 +1241,7 @@ font-size: 1em; } .listofinvoicetype { - height: 28px; + height: 2.2em; vertical-align: middle; } .divsocialnetwork:not(:last-child) { @@ -2046,7 +2046,7 @@ height: 40px !important; } div.tabBar .listofinvoicetype table tr, div.tabBar .listofinvoicetype table tr td { - height: 28px !important; + height: 2.2em !important; } @@ -4018,7 +4018,7 @@ .border tbody tr, .bordernooddeven tbody tr, .border tbody tr td, .bordernooddeven tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col, tr.liste_titre.box_titre td table td, .bordernooddeven tr td { - height: 28px; + height: 2.2em; } div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col { @@ -4611,7 +4611,7 @@ font-family: ; font-weight: ; vertical-align: middle; - height: 28px; + height: 2.2em; } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; @@ -5701,7 +5701,7 @@ /* display: inline-block; */ padding-: 10px; vertical-align: middle; - line-height: 28px; + line-height: 2.2em; } .websiteselectionsection { font-size: 0.85em; @@ -6203,7 +6203,7 @@ right: 0; bottom: 0; background-color: #ebebeb; - height: 28px; + height: 2.2em; line-height: 2.2em; } .ace_status-indicator { @@ -6720,7 +6720,7 @@ color: #FFF !important; } .select2-container .select2-selection--multiple { - min-height: 28px !important; + min-height: 2.2em !important; } .tableforfield .select2-container .select2-selection--single { height: 25px; @@ -7035,7 +7035,7 @@ padding: 0; vertical-align: middle; min-height: unset; - height: 28px !important; + height: 2.2em !important; opacity: 0; /* width: 1px !important; */ } @@ -7621,7 +7621,7 @@ /* ============================================================================== */ .ticketpublictable td { - height: 28px; + height: 2.2em; } .ticketpublicarea { From eabfc6606f978f5df0460af7d10440c724e8eec7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 16:16:56 +0200 Subject: [PATCH 113/127] Try to fix phpstan warning --- htdocs/core/class/commonobject.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 57e06f3550d4f..f8011cb40716c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8579,10 +8579,10 @@ public function getFieldError($fieldKey) /** * Return validation test result for a field * - * @param array|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}> $fields Array of properties of field to show - * @param string $fieldKey Key of attribute - * @param string $fieldValue value of attribute - * @return bool return false if fail true on success, see $this->error for error message + * @param array|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}?> $fields Array of properties of field to show + * @param string $fieldKey Key of attribute + * @param string $fieldValue Value of attribute + * @return bool Return false if fail true on success, see $this->error for error message */ public function validateField($fields, $fieldKey, $fieldValue) { From d967409f8649eecc5a50457189b992f0d265f8b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 16:36:30 +0200 Subject: [PATCH 114/127] css look and feel v21 --- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/tpl/extrafields_list_search_input.tpl.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 10 +++++----- htdocs/theme/md/style.css.php | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6812463071312..2ae7c0bf35145 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1235,7 +1235,7 @@ public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $ } $out = ''; } else { - $out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1); + $out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1, 1, 'width75 yesno'); } $out .= ''; // A hidden field ending with "_boolean" that is always set to 1. } elseif ($type == 'price') { diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index ad282d70a4393..d9c860a050fbb 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -44,14 +44,14 @@ $morecss = ''; $preselectedvalues = (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]); // Here $preselectedvalues can be an array('start'=>int, 'end'=>int) or an int - echo $extrafields->showInputField($key, $preselectedvalues, '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); + print $extrafields->showInputField($key, $preselectedvalues, '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } else { // for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid') $morecss = ''; if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) { $morecss = 'maxwidth200'; } - echo $extrafields->showInputField($key, (!isset($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); + print $extrafields->showInputField($key, (!isset($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index bfbe053e67ce2..654b520b99149 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -407,7 +407,7 @@ margin-top: 5px; } textarea { - border-radius: 0; + border-radius: 3px; border-top: solid 1px var(--inputbordercolor); border-left: solid 1px var(--inputbordercolor); border-right: solid 1px var(--inputbordercolor); @@ -7043,15 +7043,15 @@ @media only screen and (min-width: 768px) { /* CSS to have the dropdown boxes larger that the input search area */ - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown.ui-dialog { + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown.ui-dialog { min-width: 230px !important; } - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--below:not(.onrightofpage), - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--above:not(.onrightofpage) { + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--below:not(.onrightofpage), + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--above:not(.onrightofpage) { min-width: 230px !important; } .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--below, - .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--above{ + .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--above { min-width: 140px !important; } .combolargeelem.select2-container.select2-container--open .select2-dropdown.ui-dialog { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8e8d4083dd931..caf4a6905797b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6953,11 +6953,11 @@ @media only screen and (min-width: 767px) { /* CSS to have the dropdown boxes larger that the input search area */ - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown.ui-dialog { + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown.ui-dialog { min-width: 240px !important; } - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--below:not(.onrightofpage), - .select2-container.select2-container--open:not(.graphtype) .select2-dropdown--above:not(.onrightofpage) { + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--below:not(.onrightofpage), + .select2-container.select2-container--open:not(.graphtype):not(.yesno) .select2-dropdown--above:not(.onrightofpage) { min-width: 240px !important; } .onrightofpage span.select2-dropdown.ui-dialog.select2-dropdown--below, From dd61bff4dadaaaac06b68430986d4874ee95a27b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 16:39:29 +0200 Subject: [PATCH 115/127] Code simpler --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ef6e0ddf11cb8..1acddf5470451 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13383,7 +13383,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = // Test the filter syntax $t = preg_replace_callback('/'.$regexstring.'/i', 'dolForgeDummyCriteriaCallback', $filter); - $t = str_replace(array('and','or','AND','OR',' '), '', $t); // Remove the only strings allowed between each () criteria + $t = str_ireplace(array('and', 'or', ' '), '', $t); // Remove the only strings allowed between each () criteria // If the string result contains something else than '()', the syntax was wrong if (preg_match('/[^\(\)]/', $t)) { From a7c7317d97b75d8dad0d34c91c67dc154ce0c06e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 16:48:01 +0200 Subject: [PATCH 116/127] Fix regression --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1acddf5470451..b1e0ac3375b65 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13628,7 +13628,7 @@ function dolForgeCriteriaCallback($matches) } else { if (strtoupper($tmpescaped) == 'NULL') { $tmpescaped = 'NULL'; - } elseif (is_numeric((string) $tmpescaped)) { + } elseif (ctype_digit((string) $tmpescaped)) { // if only 0-9 chars, no . $tmpescaped = (int) $tmpescaped; } else { $tmpescaped = (float) $tmpescaped; From b138957cfb8377e8241695b2e9769f0707ba3824 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 16:51:31 +0200 Subject: [PATCH 117/127] Try to fix phpstan --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f8011cb40716c..c38201101ab27 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8579,7 +8579,7 @@ public function getFieldError($fieldKey) /** * Return validation test result for a field * - * @param array|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}?> $fields Array of properties of field to show + * @param array|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}> $fields Array of properties of field to show * @param string $fieldKey Key of attribute * @param string $fieldValue Value of attribute * @return bool Return false if fail true on success, see $this->error for error message From 2f415cafcd960604a4b8a26174eb5a89f4e11f68 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 2 Aug 2024 17:06:07 +0200 Subject: [PATCH 118/127] Try to fix phan warning --- htdocs/core/lib/functions.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b1e0ac3375b65..0935d471b9f35 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6940,7 +6940,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round * @param Societe $thirdparty_buyer Object of buying third party * @param Societe $thirdparty_seller Object of selling third party ($mysoc if not defined) * @param int $vatnpr If vat rate is NPR or not - * @return int<0,0>|string 0 if not found, localtax rate if found + * @return int<0,0>|string 0 if not found, localtax rate if found (Can be '20', '-19:-15:-9') * @see get_default_tva() */ function get_localtax($vatrate, $local, $thirdparty_buyer = null, $thirdparty_seller = null, $vatnpr = 0) @@ -7020,7 +7020,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer = null, $thirdparty_se } } else { // i am the seller if (!isOnlyOneLocalTax($local)) { // TODO If seller is me, why not always returning this, even if there is only one locatax vat. - return $conf->global->MAIN_INFO_VALUE_LOCALTAX1; + return getDolGlobalString('MAIN_INFO_VALUE_LOCALTAX1'); } } } @@ -7034,7 +7034,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer = null, $thirdparty_se if (in_array($mysoc->country_code, array('ES'))) { return $thirdparty_buyer->localtax2_value; } else { - return $conf->global->MAIN_INFO_VALUE_LOCALTAX2; + return getDolGlobalString('MAIN_INFO_VALUE_LOCALTAX2'); } } } @@ -7204,7 +7204,7 @@ function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid * @param Societe $buyer Company object * @param Societe $seller Company object * @param int<0,1> $firstparamisid 1 if first param is ID into table instead of Rate+code (use this if you can) - * @return array{}|array{0:string,1:float,2:string,3:string}|array{0:string,1:float,2:string,3:float,4:string,5:string} array(localtax_type1(1-6 or 0 if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp) + * @return array{}|array{0:string,1:int|string,2:string,3:string}|array{0:string,1:int|string,2:string,3:int|string,4:string,5:string} array(localtax_type1('1-6' or '0' if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp) * @see getTaxesFromId() */ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid = 0) From 49808847b91b7afb2262572f545a9fab7873a4c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 13:27:19 +0200 Subject: [PATCH 119/127] Ignore phpstan false positive --- htdocs/core/lib/functions2.lib.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 48e8ec902e2e4..7e47eb7c23393 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2246,7 +2246,7 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') /** - * Clean corrupted tree (orphelins linked to a not existing parent), record linked to themself and child-parent loop + * Clean corrupted database tree (orphelins linked to a not existing parent), record linked to themself, and also child-parent loop * * @param DoliDB $db Database handler * @param string $tabletocleantree Table to clean @@ -2309,6 +2309,7 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) $listofidtoclean[$cursor] = $id; break; } + // @phpstan-ignore-next-line PHPStan thinks this line is never reached $cursor = $listofparentid[$cursor]; } @@ -2317,8 +2318,8 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) } } - $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; - $sql .= " SET ".$fieldfkparent." = 0"; + $sql = "UPDATE ".MAIN_DB_PREFIX.$db->sanitize($tabletocleantree); + $sql .= " SET ".$db->sanitize($fieldfkparent)." = 0"; $sql .= " WHERE rowid IN (".$db->sanitize(implode(',', $listofidtoclean)).")"; // So we update only records detected wrong $resql = $db->query($sql); if ($resql) { @@ -2334,9 +2335,9 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) //else dol_print_error($db); // Check and clean orphelins - $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; - $sql .= " SET ".$fieldfkparent." = 0"; - $sql .= " WHERE ".$fieldfkparent." NOT IN (".$db->sanitize(implode(',', $listofid), 1).")"; // So we update only records linked to a non existing parent + $sql = "UPDATE ".MAIN_DB_PREFIX.$db->sanitize($tabletocleantree); + $sql .= " SET ".$db->sanitize($fieldfkparent)." = 0"; + $sql .= " WHERE ".$db->sanitize($fieldfkparent)." NOT IN (".$db->sanitize(implode(',', $listofid), 1).")"; // So we update only records linked to a non existing parent $resql = $db->query($sql); if ($resql) { $nb = $db->affected_rows($sql); From d1f1c0aa57346391e43e85cbcbba667acc77bdcc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 13:44:38 +0200 Subject: [PATCH 120/127] Clean code - Fix phpstan warning --- htdocs/admin/stocktransfer.php | 11 ++--------- htdocs/admin/workstation.php | 11 ++--------- htdocs/core/modules/modAi.class.php | 3 --- htdocs/core/modules/modEventOrganization.class.php | 3 --- htdocs/core/modules/modKnowledgeManagement.class.php | 3 --- htdocs/core/modules/modPartnership.class.php | 3 --- htdocs/core/modules/modRecruitment.class.php | 3 --- htdocs/core/modules/modWorkstation.class.php | 3 --- .../template/core/modules/modMyModule.class.php | 5 +---- 9 files changed, 5 insertions(+), 40 deletions(-) diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index 13f894bc72870..e8573c8e860bf 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -237,13 +237,8 @@ $myTmpObjects[$moduledir] = array('includerefgeneration' => 1, 'includedocgeneration' => 1, 'class' => 'StockTransfer'); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { - /* - * Orders Numbering model - */ + // Orders Numbering model $setupnotempty++; print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', ''); @@ -349,9 +344,7 @@ } if ($myTmpObjectArray['includedocgeneration']) { - /* - * Document templates generators - */ + // Document templates generators $setupnotempty++; $type = strtolower($myTmpObjectKey); diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php index e40a5d1ddfb0a..6be43435b2307 100644 --- a/htdocs/admin/workstation.php +++ b/htdocs/admin/workstation.php @@ -227,13 +227,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { - /* - * Orders Numbering model - */ + // Orders Numbering model $setupnotempty++; print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', ''); @@ -340,9 +335,7 @@ } if ($myTmpObjectArray['includedocgeneration']) { - /* - * Document templates generators - */ + // Document templates generators $setupnotempty++; $type = strtolower($myTmpObjectKey); diff --git a/htdocs/core/modules/modAi.class.php b/htdocs/core/modules/modAi.class.php index 4aa1f0cce755d..2bf7230a12d7e 100644 --- a/htdocs/core/modules/modAi.class.php +++ b/htdocs/core/modules/modAi.class.php @@ -379,9 +379,6 @@ public function init($options = '') $myTmpObjects['Availabilities'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); // foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - // if ($myTmpObjectKey == 'Availabilities') { - // continue; - // } // if ($myTmpObjectArray['includerefgeneration']) { // $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_availabilitiess.odt'; // $dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir; diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 4f59e7bdbe5bf..e4be0d8b18f00 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -445,9 +445,6 @@ public function init($options = '') $myTmpObjects['ConferenceOrBooth'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'ConferenceOrBooth') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/eventorganization/template_conferenceorbooths.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/eventorganization'; diff --git a/htdocs/core/modules/modKnowledgeManagement.class.php b/htdocs/core/modules/modKnowledgeManagement.class.php index 80dd7b5fe9a93..92a1da8e8d0af 100644 --- a/htdocs/core/modules/modKnowledgeManagement.class.php +++ b/htdocs/core/modules/modKnowledgeManagement.class.php @@ -447,9 +447,6 @@ public function init($options = '') $myTmpObjects['KnowledgeRecord'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'KnowledgeRecord') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/knowledgemanagement/template_knowledgerecords.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/knowledgemanagement'; diff --git a/htdocs/core/modules/modPartnership.class.php b/htdocs/core/modules/modPartnership.class.php index e99045d05fc00..099cce8a574e3 100644 --- a/htdocs/core/modules/modPartnership.class.php +++ b/htdocs/core/modules/modPartnership.class.php @@ -463,9 +463,6 @@ public function init($options = '') $myTmpObjects['Partnership'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'Partnership') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_partnerships.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir; diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php index 89e26d587e29f..5bc9fe4516bd6 100644 --- a/htdocs/core/modules/modRecruitment.class.php +++ b/htdocs/core/modules/modRecruitment.class.php @@ -417,9 +417,6 @@ public function init($options = '') $myTmpObjects['RecruitmentJobPosition'] = array('includerefgeneration' => 1, 'includedocgeneration' => 1); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') { - continue; - } if ($myTmpObjectArray['includedocgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_recruitmentjobposition.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir; diff --git a/htdocs/core/modules/modWorkstation.class.php b/htdocs/core/modules/modWorkstation.class.php index cc656a9c03db9..2f5a184640883 100644 --- a/htdocs/core/modules/modWorkstation.class.php +++ b/htdocs/core/modules/modWorkstation.class.php @@ -394,9 +394,6 @@ public function init($options = '') $myTmpObjects['Workstation'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'Workstation') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/workstation/template_workstations.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/workstation'; diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index bbae6a5688a6b..bc694dfe711aa 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -41,7 +41,7 @@ class modMyModule extends DolibarrModules */ public function __construct($db) { - global $langs, $conf; + global $conf; $this->db = $db; @@ -492,9 +492,6 @@ public function init($options = '') $myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') { - continue; - } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/'.$moduledir.'/template_myobjects.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/'.$moduledir; From ed968b0e91afd0e85994337ea35855aae960a22e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 13:51:03 +0200 Subject: [PATCH 121/127] Try to fix phpstan warning --- htdocs/core/class/menu.class.php | 2 +- htdocs/core/menus/standard/eldy_menu.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 90299401453f3..be4bf7f298dce 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -32,7 +32,7 @@ class Menu /** * List of menu items * - * @var array,target:string,mainmenu:string,leftmenu:string,position:int,level?:int,id:string,idsel:string,classname:string,prefix:string}> + * @var array,target:string,mainmenu:string,leftmenu:string,position:int,level?:int,id:string,idsel:string,classname:string,prefix?:string}> */ public $liste; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 40cb9f0d427fb..0e52117957347 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -274,7 +274,7 @@ public function showmenu($mode, $moredata = null) */ $lastlevel2 = array(); - foreach ($submenu->liste as $key2 => $val2) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' + foreach ($submenu->liste as $key2 => $val2) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu','prefix'] $showmenu = true; if (getDolGlobalString('MAIN_MENU_HIDE_UNAUTHORIZED') && empty($val2['enabled'])) { $showmenu = false; From fc63159c30014758d68711c8812a8661d7caaacc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 13:57:03 +0200 Subject: [PATCH 122/127] Fix phan warnings --- htdocs/accountancy/bookkeeping/list.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 4e2b285669a74..b0710e6e109b4 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1212,8 +1212,10 @@ } // Document ref - $modulepart = ''; + $modulepart = ''; // may be used by include*.tpl.php if (!empty($arrayfields['t.doc_ref']['checked'])) { + $objectstatic = null; + if ($line->doc_type === 'customer_invoice') { $langs->loadLangs(array('bills')); @@ -1270,11 +1272,11 @@ $labeltoshow = ''; $labeltoshowalt = ''; $classforlabel = ''; - if ($line->doc_type === 'customer_invoice' || $line->doc_type === 'supplier_invoice' || $line->doc_type === 'expense_report') { + if (($line->doc_type === 'customer_invoice' || $line->doc_type === 'supplier_invoice' || $line->doc_type === 'expense_report') && is_object($objectstatic)) { $labeltoshow .= $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); $labeltoshow .= $documentlink; $labeltoshowalt .= $objectstatic->ref; - } elseif ($line->doc_type === 'bank') { + } elseif ($line->doc_type === 'bank' && is_object($objectstatic)) { $labeltoshow .= $objectstatic->getNomUrl(1); $labeltoshowalt .= $objectstatic->ref; $bank_ref = strstr($line->doc_ref, '-'); From 49f40b58feb760636e572cef8fc4f9818e45c1bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 14:02:09 +0200 Subject: [PATCH 123/127] Removed some warning (not priority) --- dev/tools/phan/config_extended.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/tools/phan/config_extended.php b/dev/tools/phan/config_extended.php index 0920a7f7ecceb..94346c93296f5 100644 --- a/dev/tools/phan/config_extended.php +++ b/dev/tools/phan/config_extended.php @@ -94,6 +94,9 @@ 'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning 'PhanPluginRedundantAssignment', // Not essential, useless 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences + + 'PhanPluginUnknownArrayMethodParamType', // this option costs more time to be supported than it solves time + 'PhanPluginUnknownArrayMethodReturnType', // this option costs more time to be supported than it solves time ]; return $config; From d787d801cf30795cc6a5f61f04c390dc0291dfdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 14:34:44 +0200 Subject: [PATCH 124/127] css --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0935d471b9f35..e7f3be411ed26 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2615,7 +2615,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab } if ($displaytab == 0) { - $out .= img_picto($title, $picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle paddingright').' '; + $out .= img_picto($title, $picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle paddingright marginrightonlyshort'); } $out .= $links[$i][1]; From 35293e75c8a3852d2d95f735b540e2bc79753dff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Aug 2024 15:01:24 +0200 Subject: [PATCH 125/127] Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 --- htdocs/core/multicompany_page.php | 9 ++++++--- htdocs/theme/eldy/global.inc.php | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/core/multicompany_page.php b/htdocs/core/multicompany_page.php index a047ef7496836..203313deabec8 100644 --- a/htdocs/core/multicompany_page.php +++ b/htdocs/core/multicompany_page.php @@ -58,6 +58,9 @@ $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); +if (!isModEnabled('multicompany')) { + httponly_accessforbidden('No multicompany module enabled'); +} /* @@ -113,15 +116,15 @@ $listofentities = array(); } - $multicompanyList .= '
      '; + $multicompanyList .= '
        '; foreach ($listofentities as $entityid => $entitycursor) { $url = DOL_URL_ROOT.'/core/multicompany_page.php?action=switchentity&token='.newToken().'&entity='.((int) $entityid).($backtourl ? '&backtourl='.urlencode($backtourl) : ''); $multicompanyList .= '
      • '; - $multicompanyList .= ''; + $multicompanyList .= ''; $multicompanyList .= img_picto('', 'entity', 'class="pictofixedwidth"'); $multicompanyList .= dol_escape_htmltag($entitycursor); if ($conf->entity == $entityid) { - $multicompanyList .= ' ('.$langs->trans("Currently").')'; + $multicompanyList .= ' '.img_picto($langs->trans("Currently"), 'tick').''; } $multicompanyList .= ''; $multicompanyList .= '
      • '; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 8f99b911fba3b..f01c76f2821be 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1024,12 +1024,18 @@ .paddingtop { padding-top: 4px; } +.paddingtopimp { + padding-top: 4px !important; +} .paddingtop2 { padding-top: 2px; } .paddingbottom { padding-bottom: 4px; } +.paddingbottomimp { + padding-bottom: 4px !important; +} .paddingbottom2 { padding-bottom: 2px; } From 37a46a9282e0d5b1c28a2e995c141d1e238e4dbb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 4 Aug 2024 13:36:42 +0200 Subject: [PATCH 126/127] Clean css --- htdocs/theme/eldy/global.inc.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 9c703f310327c..6cd923844424a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2197,8 +2197,12 @@ /* ============================================================================== */ #id-container { - display: table; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ - table-layout: fixed; + width: 100%; + + display: table; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ + + /* table-layout: fixed; */ + } #id-right, #id-left { display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ @@ -2386,6 +2390,8 @@ .user-header { height: auto !important; color: var(--colortextbackhmenu); } #id-container { + display: table; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ + table-layout: fixed; width: 100%; } .side-nav { @@ -3459,7 +3465,6 @@ padding: 0px; padding-bottom: 0px; padding-top: 1px; - width: px; } .vmenu { @@ -8474,11 +8479,6 @@ } - div.fichehalfright { - margin-top: 30px; - } - - .underbanner.underbanner-before-box { border-bottom: none; } From e3d3bad08024cbf5797898d6db21b5c6c944f021 Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 4 Aug 2024 18:47:22 +0200 Subject: [PATCH 127/127] =?UTF-8?q?Fix:=20=F0=9F=9B=9FFix=20getrights=20us?= =?UTF-8?q?age=20&=20Update=20the=20documentation=20to=20suggest=20to=20us?= =?UTF-8?q?e=20loadRights=20(#30543)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Qual: Update the documentation to suggest to use loadRights # Qual: Update the documentation to suggest to use loadRights Given the pending issues, update the documention regarding getrights to point to loadRights. * Fix: call loadRights on User (not getRights) --- htdocs/core/customreports.php | 2 +- htdocs/user/class/api_users.class.php | 8 ++++---- htdocs/user/class/user.class.php | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index 75ee1126897cc..2dc993e9c50b4 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -80,7 +80,7 @@ // $search_measures, $search_xaxis or $search_yaxis may have been defined by the parent. if (empty($user) || empty($user->id)) { - print 'Page is called as an include but $user and its permission loaded with getrights() are not defined. We stop here.'; + print 'Page is called as an include but $user and its permission loaded with loadRights() are not defined. We stop here.'; exit(-1); } if (empty($object)) { diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index c391f57aa5560..ccd0198f17bb4 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -168,7 +168,7 @@ public function get($id, $includepermissions = 0) } if ($includepermissions) { - $this->useraccount->getRights(); + $this->useraccount->loadRights(); } return $this->_cleanObjectDatas($this->useraccount); @@ -207,7 +207,7 @@ public function getByLogin($login, $includepermissions = 0) } if ($includepermissions) { - $this->useraccount->getRights(); + $this->useraccount->loadRights(); } return $this->_cleanObjectDatas($this->useraccount); @@ -246,7 +246,7 @@ public function getByEmail($email, $includepermissions = 0) } if ($includepermissions) { - $this->useraccount->getRights(); + $this->useraccount->loadRights(); } return $this->_cleanObjectDatas($this->useraccount); @@ -281,7 +281,7 @@ public function getInfo($includepermissions = 0) } if ($includepermissions) { - $this->useraccount->getRights(); + $this->useraccount->loadRights(); } $usergroup = new UserGroup($this->db); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2544dc25883a4..bf587fb05891c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -435,7 +435,7 @@ public function __construct($db) /** * Load a user from database with its id or ref (login). - * This function does not load permissions, only user properties. Use getrights() for this just after the fetch. + * This function does not load permissions, only user properties. Use loadRights() for this just after the fetch. * * @param int $id If defined, id to used for search * @param string $login If defined, login to used for search @@ -767,7 +767,7 @@ public function loadDefaultValues() * @param string $permlevel1 Permission level1 (Example: 'read', 'write', 'delete') * @param string $permlevel2 Permission level2 * @return int 1 if user has permission, 0 if not. - * @see clearrights(), delrights(), getrights(), hasRight() + * @see clearrights(), delrights(), loadRights(), hasRight() */ public function hasRight($module, $permlevel1, $permlevel2 = '') { @@ -922,7 +922,7 @@ public function hasRight($module, $permlevel1, $permlevel2 = '') * @param int $entity Entity to use * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int > 0 if OK, < 0 if KO - * @see clearrights(), delrights(), getrights(), hasRight() + * @see clearrights(), delrights(), loadRights(), hasRight() */ public function addrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { @@ -1065,7 +1065,7 @@ public function addrights($rid, $allmodule = '', $allperms = '', $entity = 0, $n * @param int|string $entity Entity to use. Example: '1', or '0,1', or '2,3' * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int > 0 if OK, < 0 if OK - * @see clearrights(), addrights(), getrights(), hasRight() + * @see clearrights(), addrights(), loadRights(), hasRight() */ public function delrights($rid, $allmodule = '', $allperms = '', $entity = 0, $notrigger = 0) { @@ -1183,7 +1183,7 @@ public function delrights($rid, $allmodule = '', $allperms = '', $entity = 0, $n * Clear all permissions array of user * * @return void - * @see getrights(), hasRight() + * @see loadRights(), hasRight() */ public function clearrights() { @@ -1456,7 +1456,7 @@ public function loadRights($moduletag = '', $forcereload = 0) * @param string $moduletag Limit permission for a particular module ('' by default means load all permissions) * @param int $forcereload Force reload of permissions even if they were already loaded (ignore cache) * @return void - * @deprecated + * @deprecated Use getRights * * @see clearrights(), delrights(), addrights(), hasRight() * @phpstan-ignore-next-line