From da543ac96d472dfe18ea239086856913a9c22211 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 14 Mar 2024 10:00:48 +0100 Subject: [PATCH 01/37] codespell and datee --- dev/tools/codespell/codespell-ignore.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tools/codespell/codespell-ignore.txt b/dev/tools/codespell/codespell-ignore.txt index c71e990a467..0c84807010b 100644 --- a/dev/tools/codespell/codespell-ignore.txt +++ b/dev/tools/codespell/codespell-ignore.txt @@ -57,3 +57,4 @@ dur fonction espace methode +datee From 89d6fe8d5d9638794bbf5de21527e9f37b787c58 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 14 Mar 2024 10:02:23 +0100 Subject: [PATCH 02/37] add project list linked by a contact --- htdocs/core/lib/company.lib.php | 98 ++++++++++++++++++++++++++++++++ htdocs/langs/fr_FR/admin.lang | 2 + htdocs/langs/fr_FR/projects.lang | 1 + htdocs/projet/admin/project.php | 12 ++++ 4 files changed, 113 insertions(+) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d8113ce1356..63f1e382fa7 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -960,6 +960,104 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel dol_print_error($db); } + //projects linked to that thirdpart because of a people of that company is linked to a project + if (getDolGlobalString('PROJECT_DISPLAY_LINKED_BY_CONTACT')) { + print "\n"; + print load_fiche_titre($langs->trans("ProjectsLinkedToThisThirdParty"), '', ''); + + + print '
'."\n"; + print ''; + + $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; + $sql .= ", cls.code as opp_status_code"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec on p.rowid = ec.element_id"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sc on ec.fk_socpeople = sc.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc on ec.fk_c_type_contact = tc.rowid"; + $sql .= " WHERE sc.fk_soc = ".((int) $object->id); + $sql .= " AND p.entity IN (".getEntity('project').")"; + $sql .= " AND tc.element = 'project'"; + $sql .= " ORDER BY p.dateo DESC"; + + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + if ($num > 0) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + + $projecttmp = new Project($db); + + $i = 0; + + while ($i < $num) { + $obj = $db->fetch_object($result); + $projecttmp->fetch($obj->id); + + // To verify role of users + $userAccess = $projecttmp->restrictedProjectArea($user); + + if ($user->rights->projet->lire && $userAccess > 0) { + print ''; + + // Ref + print ''; + + // Label + print ''; + // Date start + print ''; + // Date end + print ''; + // Opp amount + print ''; + // Opp status + print ''; + // Opp percent + print ''; + // Status + print ''; + + print ''; + } + $i++; + } + } else { + print ''; + } + $db->free($result); + } else { + dol_print_error($db); + } + } + $parameters = array('sql' => $sql, 'function' => 'show_projects'); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 2857c585ba4..3750b9bab8a 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -88,6 +88,8 @@ SearchString=Chaîne de recherche NotAvailableWhenAjaxDisabled=Non disponible quand Ajax est désactivé AllowToSelectProjectFromOtherCompany=Sur les éléments d'un tiers, autorise la sélection d'un projet lié à un autre tiers TimesheetPreventAfterFollowingMonths=Empêcher l'enregistrement du temps consacré après le nombre de mois suivant +PROJECT_DISPLAY_LINKED_BY_CONTACT=Afficher les projets liés par un contact +PROJECT_DISPLAY_LINKED_BY_CONTACT_help=Cette option permet d'ajouter la liste de tous les projets dans lesquels un des contact du tiers est rattaché JavascriptDisabled=Javascript désactivé UsePreviewTabs=Afficher les onglets "Aperçu" ShowPreview=Afficher aperçu diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 962372b874b..d5d1f2ce01c 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -142,6 +142,7 @@ DoNotShowMyTasksOnly=Voir aussi les tâches qui ne me sont pas affectées ShowMyTasksOnly=Ne voir que les tâches qui me sont affectées TaskRessourceLinks=Contacts de la tâche ProjectsDedicatedToThisThirdParty=Projets dédiés à ce tiers +ProjectsLinkedToThisThirdParty=Projets liés à ce tiers par un contact commun NoTasks=Aucune tâche pour ce projet LinkedToAnotherCompany=Liés à autre société TaskIsNotAssignedToUser=Tâche non assignée à l'utilisateur. Utilisez le bouton '%s' pour assigner la tâche maintenant. diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 184f8ac6104..9dc673aa745 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -841,6 +841,18 @@ print ''; print ''; print ''; + +$key = 'PROJECT_DISPLAY_LINKED_BY_CONTACT'; +echo '', + '', + '', + ''; + + print '
'.$langs->trans("Ref").''.$langs->trans("Name").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("OpportunityAmountShort").''.$langs->trans("OpportunityStatusShort").''.$langs->trans("OpportunityProbabilityShort").''.$langs->trans("Status").'
'; + print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:'.$_SERVER["PHP_SELF"].'?socid=__SOCID__'); + print ''.dol_escape_htmltag($obj->title).''.dol_print_date($db->jdate($obj->do), "day").''.dol_print_date($db->jdate($obj->de), "day").''; + if ($obj->opp_status_code) { + print ''.price($obj->opp_amount, 1, '', 1, -1, -1, '').''; + } + print ''; + if ($obj->opp_status_code) { + print $langs->trans("OppStatus".$obj->opp_status_code); + } + print ''; + if ($obj->opp_percent) { + print price($obj->opp_percent, 1, '', 1, 0).'%'; + } + print ''.$projecttmp->getLibStatut(5).'
'.$langs->trans("None").'
', + $form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key . '_help')), + '', + ajax_constantonoff($key), + '
'; print '
'; From 90210c3bfcc423858f22fef1b1fe8cce5ce750fd Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 14 Mar 2024 10:36:55 +0100 Subject: [PATCH 03/37] translation --- htdocs/langs/en_US/admin.lang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 576180c6371..f20f46f5c03 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -88,6 +88,8 @@ SearchString=Search string NotAvailableWhenAjaxDisabled=Not available when Ajax disabled AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party TimesheetPreventAfterFollowingMonths=Prevent recording time spent after the following number of months +PROJECT_DISPLAY_LINKED_BY_CONTACT=Display project linked by a common contact +PROJECT_DISPLAY_LINKED_BY_CONTACT_help=That option add a new list on Project tab with all projects linked to that thirdparty via a contact relationship JavascriptDisabled=JavaScript disabled UsePreviewTabs=Use preview tabs ShowPreview=Show preview From d4ea162cfb158992d4929441000b65ee798b6297 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 14 Mar 2024 10:37:46 +0100 Subject: [PATCH 04/37] locale --- htdocs/langs/en_US/projects.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index f0d303285d4..e522a34fd1e 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -142,6 +142,7 @@ DoNotShowMyTasksOnly=See also tasks not assigned to me ShowMyTasksOnly=View only tasks assigned to me TaskRessourceLinks=Contacts of task ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party +ProjectsLinkedToThisThirdParty=Projects linked to that third party thanks to a contact NoTasks=No tasks for this project LinkedToAnotherCompany=Linked to other third party TaskIsNotAssignedToUser=Task not assigned to user. Use button '%s' to assign task now. From 1e252dd5871f15181d17dd95194470fde7f4e778 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 14 Mar 2024 17:05:27 +0100 Subject: [PATCH 05/37] Add spelling exception (datee + error in Changelog) --- dev/tools/codespell/codespell-ignore.txt | 1 - dev/tools/codespell/codespell-lines-ignore.txt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tools/codespell/codespell-ignore.txt b/dev/tools/codespell/codespell-ignore.txt index 0c84807010b..c71e990a467 100644 --- a/dev/tools/codespell/codespell-ignore.txt +++ b/dev/tools/codespell/codespell-ignore.txt @@ -57,4 +57,3 @@ dur fonction espace methode -datee diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index 2c0fb95a96f..80e4f25e296 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -79,6 +79,7 @@ $object->periode = $dateperiod; $return .= '
'.$langs->trans("Payement").' : '.$this->type_payment.''; $sortfield = "datea"; + $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; $sql .= " '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.date_ech as date, t.periode as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " , datee = ".(!empty($obj->datee) ? "'".$this->db->escape($obj->datee)."'" : "null"); $sql .= " AND (".$datefieldname." <= '".$this->db->idate($datee)."' OR ".$datefieldname." IS NULL)"; @@ -325,6 +326,7 @@ $usercanread = (($user->hasRight('stock', 'mouvement', 'lire'))); * The hook contaxt thirdpartycard has been renamed thirdpartycontact * The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere. - New: Add proposals into referer page of thirdparty. +NEW: ModuleBuilder: Checkin comments begin and end before each actions for /F "tokens=2 delims=," %%i in ('tasklist /FI "IMAGENAME eq php.exe" /FO CSV /NH') do ( foreach ($TWeek as $week_number) { function checkES($IentOfi, $InumCta) From 49416784ce3646fd942d8164e11d8968f74b04fd Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:10 +0100 Subject: [PATCH 06/37] Fix PhanPluginSuspiciousParamPosition --- dev/tools/phan/baseline.txt | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 68fc0c015e7..c56fd81b5d6 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,8 +9,9 @@ */ return [ // # Issue statistics: - // PhanPluginSuspiciousParamPosition : 45+ occurrences + // PhanPluginDuplicateIfStatements : 30+ occurrences // PhanParamSignatureMismatch : 25+ occurrences + // PhanPluginSuspiciousParamPosition : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences // PhanTypeArraySuspiciousNull : 10+ occurrences @@ -33,34 +34,21 @@ return [ 'htdocs/adherents/stats/geo.php' => ['PhanTypeArraySuspiciousNull'], 'htdocs/adherents/type.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/admin/receiptprinter.php' => ['PhanRedefineFunctionInternal'], - 'htdocs/admin/translation.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected'], 'htdocs/categories/viewcat.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/collab/index.php' => ['PhanParamTooMany'], - 'htdocs/comm/action/index.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidUnaryOperandNumeric'], + 'htdocs/comm/action/index.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidUnaryOperandNumeric'], 'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/comm/mailing/cibles.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/comm/mailing/info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/compta/accounting-files.php' => ['PhanTypeInvalidUnaryOperandNumeric'], - 'htdocs/compta/bank/various_payment/card.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'], - 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/compta/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanParamTooMany'], 'htdocs/compta/prelevement/create.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'], - 'htdocs/compta/sociales/document.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/compta/sociales/info.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/compta/sociales/note.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'], - 'htdocs/compta/tva/document.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/actions_massactions.inc.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/class/commondocgenerator.class.php' => ['PhanTypeArraySuspiciousNull'], - 'htdocs/core/class/commonobject.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnsafeEval'], 'htdocs/core/class/html.form.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/class/html.formmail.class.php' => ['PhanNoopArray'], @@ -68,7 +56,6 @@ return [ 'htdocs/core/db/mysqli.class.php' => ['PhanParamSignatureMismatch'], 'htdocs/core/db/pgsql.class.php' => ['PhanParamSignatureMismatch'], 'htdocs/core/db/sqlite3.class.php' => ['PhanParamSignatureMismatch'], - 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/core/lib/functions.lib.php' => ['PhanParamTooMany', 'PhanPluginAlwaysReturnFunction', 'PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'], @@ -78,7 +65,6 @@ return [ 'htdocs/core/menus/standard/eldy_menu.php' => ['PhanParamSuspiciousOrder'], 'htdocs/core/menus/standard/empty.php' => ['PhanParamSuspiciousOrder'], 'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanParamSignatureMismatch'], - 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/modules/member/doc/pdf_standard.class.php' => ['PhanParamSignatureMismatch'], 'htdocs/core/modules/movement/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeArraySuspiciousNull'], @@ -87,18 +73,10 @@ return [ 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'], 'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'], 'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginSuspiciousParamOrder'], - 'htdocs/fourn/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic'], - 'htdocs/loan/card.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/loan/class/paymentloan.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'], - 'htdocs/loan/document.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/loan/info.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/loan/note.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/loan/payment/card.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/loan/schedule.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch'], 'htdocs/product/admin/product_tools.php' => ['PhanNoopStringLiteral'], - 'htdocs/product/card.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/projet/tasks/list.php' => ['PhanTypeArraySuspiciousNull'], 'htdocs/public/bookcal/index.php' => ['PhanTypeInvalidUnaryOperandNumeric'], 'htdocs/public/opensurvey/index.php' => ['PhanPluginSuspiciousParamOrder'], From 0efd899509de91afff51d3d828718ee8b6de98a1 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:14 +0100 Subject: [PATCH 07/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/admin/translation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 0dbeab0db6d..307f4e3a579 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2020 Laurent Destailleur * Copyright (C) 2009-2017 Regis Houssin * Copyright (C) 2017 Frédéric France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -301,7 +302,9 @@ foreach ($modulesdir as $keydir => $tmpsearchdir) { } //var_dump($i.' - '.$keydir.' - '.$dir_lang_osencoded.' -> '.$moduledirname . ' / ' . $tmpfile.' -> '.$langkey); + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $result = $newlang->load($langkey, 0, 0, '', 0); // Load translation files + database overwrite + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $result = $newlangfileonly->load($langkey, 0, 0, '', 1); // Load translation files only if ($result < 0) { print 'Failed to load language file '.$tmpfile.'
'."\n"; @@ -313,6 +316,7 @@ foreach ($modulesdir as $keydir => $tmpsearchdir) { } //print 'After loading lang '.$langkey.', newlang has '.count($newlang->tab_translate).' records
'."\n"; + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $result = $langsenfileonly->load($langkey, 0, 0, '', 1); // Load translation files only } $i++; From a7274050d205b0cd9d9602987ae44280080eaf37 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:17 +0100 Subject: [PATCH 08/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/comm/action/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 68e6b4d7169..92bd8159976 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -302,8 +302,8 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) { 'src' => getDolUserString($source), 'name' => dol_string_nohtmltag(getDolUserString($name)), 'offsettz' => (int) (empty($user->conf->$offsettz) ? 0 : $user->conf->$offsettz), - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition 'color' => dol_string_nohtmltag(getDolUserString($color)), + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition 'default' => dol_string_nohtmltag(getDolUserString($default)), 'buggedfile' => dol_string_nohtmltag(isset($user->conf->buggedfile) ? $user->conf->buggedfile : '') ); From 06cf35634af3cc6f90d2fce63f86ba323eb21085 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:19 +0100 Subject: [PATCH 09/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/compta/prelevement/create.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 00934b0f0e6..a6b326ac456 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -6,6 +6,7 @@ * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018-2023 Frédéric France * Copyright (C) 2019 Markus Welters + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -241,6 +242,7 @@ if ($type == 'bank-transfer') { llxHeader('', $title); +// @phan-suppress-next-line PhanPluginSuspiciousParamPosition $head = bon_prelevement_prepare_head($bprev, $bprev->nbOfInvoiceToPay($type), $bprev->nbOfInvoiceToPay($type, 'salary')); if ($type) { print dol_get_fiche_head($head, (!GETPOSTISSET('sourcetype') ? 'invoice' : 'salary'), $langs->trans("Invoices"), -1, $bprev->picto); From 27e89df94db179b3e4ecdb45f78f85d6eb29e6be Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:20 +0100 Subject: [PATCH 10/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/core/class/commonobject.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6d3d2c65557..dba5ffd306a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9785,6 +9785,7 @@ abstract class CommonObject foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; $value = $this->fields[$k]; + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $values[$k] = $this->quote($v, $value); // May return string 'NULL' if $value is null } @@ -10087,7 +10088,9 @@ abstract class CommonObject foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; $value = $this->fields[$k]; + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $values[$k] = $this->quote($v, $value); + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $tmp[] = $k.'='.$this->quote($v, $this->fields[$k]); } From bd0447a8a3544eea86bdc6bc02d4744111350a85 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:22 +0100 Subject: [PATCH 11/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/core/filemanagerdol/connectors/php/connector.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php index 656ca060471..afdfa2b6ffd 100644 --- a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php +++ b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php @@ -551,8 +551,8 @@ function GetParentFolder($folderPath) /** * CreateServerFolder * - * @param string $folderPath Folder - * @param string $lastFolder Folder + * @param string $folderPath Folder - Folder to create (recursively) + * @param ?string $lastFolder Internal - Child Folder we are creating, prevents recursion * @return string ''=success, error message otherwise */ function CreateServerFolder($folderPath, $lastFolder = null) @@ -585,6 +585,7 @@ function CreateServerFolder($folderPath, $lastFolder = null) return "Can't create $folderPath directory"; } + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $sErrorMsg = CreateServerFolder($sParent, $folderPath); if ($sErrorMsg != '') { return $sErrorMsg; From 8ff08adbbfbb6e92642dd9891c1b61ccd3099c9e Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:28:25 +0100 Subject: [PATCH 12/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/core/modules/import/import_xlsx.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index def42e03d9c..6a6d33df252 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012-2016 Juanjo Menent + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -519,6 +520,7 @@ class ImportXlsx extends ModeleImports // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); } else { $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; From 4d4aa6b4736f5fa942a44f1fe67648064be383d4 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:31:41 +0100 Subject: [PATCH 13/37] Fix PhanPluginSuspiciousParamPosition --- htdocs/product/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d18442094ca..3b028e50d73 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -974,6 +974,7 @@ if (empty($reshook)) { } else { if (count($clone->errors)) { setEventMessages($clone->error, $clone->errors, 'errors'); + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition dol_print_error($db, $clone->errors); } else { setEventMessages($langs->trans($clone->error), null, 'errors'); From 4719e1a28041cdbdaa75f18585a9a42d761df560 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:49:52 +0100 Subject: [PATCH 14/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/comm/mailing/card.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 559530a6873..216ec9bbdd8 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1023,20 +1023,20 @@ if ($action == 'create') { $morehtmlref .= $form->editfieldval("", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string', '', null, null, '', 1); $morehtmlref .= ''; - $morehtmlright = ''; + $morehtmlstatus = ''; $nbtry = $nbok = 0; if ($object->status == 2 || $object->status == 3) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); - $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; + $morehtmlstatus .= ' ('.$nbtry.'/'.$object->nbemail; if ($nbko) { - $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + $morehtmlstatus .= ' - '.$nbko.' '.$langs->trans("Error"); } - $morehtmlright .= ')   '; + $morehtmlstatus .= ')   '; } - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; @@ -1345,20 +1345,20 @@ if ($action == 'create') { $morehtmlref .= $form->editfieldval("", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string', '', null, null, '', 1); $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; $nbtry = $nbok = 0; if ($object->status == 2 || $object->status == 3) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); - $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; + $morehtmlstatus .= ' ('.$nbtry.'/'.$object->nbemail; if ($nbko) { - $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + $morehtmlstatus .= ' - '.$nbko.' '.$langs->trans("Error"); } - $morehtmlright .= ')   '; + $morehtmlstatus .= ')   '; } - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From 8b00d0c359a4e74cdea9940e9fec6bc4de22b64a Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:49:55 +0100 Subject: [PATCH 15/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/comm/mailing/cibles.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 95ffc1f0c38..108974d986e 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -278,21 +278,21 @@ if ($object->fetch($id) >= 0) { $morehtmlref .= $form->editfieldval("", 'title', $object->title, $object, 0, 'string', '', null, null, '', 1); $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; $nbtry = $nbok = 0; if ($object->status == $object::STATUS_SENTPARTIALY || $object->status == $object::STATUS_SENTCOMPLETELY) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); $nbok = ($nbtry - $nbko); - $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; + $morehtmlstatus .= ' ('.$nbtry.'/'.$object->nbemail; if ($nbko) { - $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + $morehtmlstatus .= ' - '.$nbko.' '.$langs->trans("Error"); } - $morehtmlright .= ')   '; + $morehtmlstatus .= ')   '; } - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From 6745fe4a5164060a33fa3166c269967df2ef7967 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:49:59 +0100 Subject: [PATCH 16/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/comm/mailing/info.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 0bf7e9cb4ad..08aaad90c2a 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -64,20 +64,20 @@ if ($object->fetch($id) >= 0) { $morehtmlref .= $form->editfieldval("", 'title', $object->title, $object, 0, 'string', '', null, null, '', 1); $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; $nbtry = $nbok = 0; if ($object->status == 2 || $object->status == 3) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); - $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; + $morehtmlstatus .= ' ('.$nbtry.'/'.$object->nbemail; if ($nbko) { - $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + $morehtmlstatus .= ' - '.$nbko.' '.$langs->trans("Error"); } - $morehtmlright .= ')   '; + $morehtmlstatus .= ')   '; } - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '

'; From 715b5ef38e09237ffabe9ec8deb9acc25454718f Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:02 +0100 Subject: [PATCH 17/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/facture/agenda-rec.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/agenda-rec.php b/htdocs/compta/facture/agenda-rec.php index 542dfd8f6c1..3636c91fce7 100644 --- a/htdocs/compta/facture/agenda-rec.php +++ b/htdocs/compta/facture/agenda-rec.php @@ -175,9 +175,9 @@ if ($object->id > 0) { } $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; @@ -211,19 +211,19 @@ if ($object->id > 0) { //$out.=""; } - $morehtmlright = ''; + $morehtmlstatus = ''; //$messagingUrl = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id; - //$morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); + //$morehtmlstatus .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); //$messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; - //$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); + //$morehtmlstatus .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); if (isModEnabled('agenda')) { /* if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { - $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); + $morehtmlstatus .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } else { - $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', 0); + $morehtmlstatus .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', 0); } */ } @@ -245,8 +245,8 @@ if ($object->id > 0) { $cachekey = 'count_events_facture_'.$object->id; $nbEvent = dol_getcache($cachekey); - print_barre_liste($langs->trans("ActionsOnBillRec").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); - //print_barre_liste($langs->trans("ActionsOnBill"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); + print_barre_liste($langs->trans("ActionsOnBillRec").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlstatus, '', 0, 1, 1); + //print_barre_liste($langs->trans("ActionsOnBill"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlstatus, '', 0, 1, 1); // List of all actions $filters = array(); From 3874830fc04ebef049c12a8ebe69a10d4d35eba0 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:04 +0100 Subject: [PATCH 18/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/facture/card-rec.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 59318f1a753..3502f31d822 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1282,9 +1282,9 @@ if ($action == 'create') { } $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From 7ecc9cfc2a3db17b4424771c1927106ca2da79b8 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:07 +0100 Subject: [PATCH 19/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/sociales/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index c66056c47ca..0666335cc4d 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -142,9 +142,9 @@ if ($object->id) { $object->totalpaid = $alreadypayed; // To give a chance to dol_banner_tab to use already paid amount to show correct status - $morehtmlright = ''; + $morehtmlstatus = ''; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From e6c29dacdaffb9e4cdd39a2494eb8f308ff3c0e4 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:09 +0100 Subject: [PATCH 20/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/sociales/info.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index 24181ae4b7b..e6ad4953129 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -111,8 +111,8 @@ $linkback = ''; print '
'; From dabd4e9f8031c65bd5c7252983f59f59a0d084b1 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:10 +0100 Subject: [PATCH 21/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/sociales/note.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/sociales/note.php b/htdocs/compta/sociales/note.php index 2f5487497f6..53c6fe187e6 100644 --- a/htdocs/compta/sociales/note.php +++ b/htdocs/compta/sociales/note.php @@ -116,9 +116,9 @@ if ($id > 0 || !empty($ref)) { //$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status - $morehtmlright = ''; + $morehtmlstatus = ''; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; From a308f7c178c18d460828eabcfca764f615474c1b Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:12 +0100 Subject: [PATCH 22/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/compta/tva/document.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index f2670861833..b9cf49d5dff 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -126,8 +126,8 @@ if ($object->id) { $linkback = ''.$langs->trans("BackToList").''; - $morehtmlright = ''; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + $morehtmlstatus = ''; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From cbd42a79061889a5caa103354f8608427f4e6d4f Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:14 +0100 Subject: [PATCH 23/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/fourn/facture/card-rec.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index d8f899d7bb1..a5dc3d0eba1 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -1184,9 +1184,9 @@ if ($action == 'create') { } $morehtmlref .= '
'; - $morehtmlright = ''; + $morehtmlstatus = ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From e90ce779cc0ba07f0b2180aaa9a6c03178603bc1 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:16 +0100 Subject: [PATCH 24/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/loan/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 17fd78aa8c1..803717ae085 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -258,7 +258,7 @@ if (empty($reshook)) { $form = new Form($db); $formproject = new FormProjets($db); -$morehtmlright = ''; +$morehtmlstatus = ''; $outputlangs = $langs; if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); @@ -474,7 +474,7 @@ if ($id > 0) { $object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From 5d77c882829bccbfc309ed2b3aa04b0fbfd0d867 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:17 +0100 Subject: [PATCH 25/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/loan/payment/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 2afeb25b322..31b71d49a3d 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -103,9 +103,9 @@ if ($action == 'delete') { $linkback = ''; $morehtmlref = ''; -$morehtmlright = ''; +$morehtmlstatus = ''; -dol_banner_tab($payment, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); +dol_banner_tab($payment, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); print '
'; print '
'; From 4735ff5c278d389d7f5257665d208ed33627e5fb Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 12 Mar 2024 19:50:19 +0100 Subject: [PATCH 26/37] Fix PhanPluginSuspiciousParamPosition by renaming arg (local assign) --- htdocs/loan/schedule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 1864c309298..ae61486bcfe 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -185,9 +185,9 @@ if (isModEnabled('project')) { } $morehtmlref .= '
'; -$morehtmlright = ''; +$morehtmlstatus = ''; -dol_banner_tab($object, 'loanid', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); +dol_banner_tab($object, 'loanid', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlstatus); ?>