diff --git a/.github/workflows/ci-pr-devcamp.yaml.disabled b/.github/workflows/ci-pr-devcamp.yaml.disabled new file mode 100644 index 00000000000..375974b43cd --- /dev/null +++ b/.github/workflows/ci-pr-devcamp.yaml.disabled @@ -0,0 +1,45 @@ +# Action to prepare the github action +# Go on Dolibarr Organization - Settings - Developer settings - GitHub App (https://github.com/organizations/Dolibarr/settings/apps) +# Create an App: Enter a name + In Home page URL use https://github.com/Dolibarr/dolibarr + Disable webhook +# Set Permissions (see other app for list of permissions) +# Click on generate the private keys +# Click on Install application - choose the repository of the bot +# Go on Organisation - Secret and variables and create a secret PR_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr". +# Go on Organisation - Secret and variables and create a variable PR_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr". +# + +name: Set the tag with devcamp label during the session of a devcamp +on: + pull_request_target: + types: [opened] + + +permissions: + pull-requests: write + issues: write + +jobs: + add-label-devcamp: + runs-on: ubuntu-latest + + steps: + #- name: Install GitHub CLI + # run: sudo apt-get install gh + + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ vars.PR_APP_ID }} + private-key: ${{ secrets.PR_SECRET_KEY }} + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Assign label + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + url: ${{ github.event.pull_request.html_url }} + run: | + echo "env.url=${{env.url}}" + gh pr edit "${{env.url}}" --add-label "Event: DevCamp 2025 XXX" diff --git a/ChangeLog b/ChangeLog index 71eaf9fa326..d69d30f0693 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,7 @@ The following changes may create regressions for some external modules, but were * The library timepicker.js has been removed. Was not used by Dolibarr. * Because of new TRIGGER_PREFIX property triggers SUPPLIER_PRODUCT_BUYPRICE_XXX are renamed to PRODUCT_BUYPRICE_XXX. * Function img_pdf() has been removed. Replace it with img_picto('', 'pdf.png') if you were using it. +* The method run_trigger() was deprecated 10+ years ago in favor of runTrigger(). It has been removed. Change your trigger file if you still use it. ***** ChangeLog for 22.0.2 compared to 22.0.1 ***** diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 18c0d0eeb6d..7c91286d1ca 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -810,12 +810,6 @@ parameters: count: 5 path: ../../../htdocs/admin/modules.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/admin/modules.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -4452,12 +4446,6 @@ parameters: count: 1 path: ../../../htdocs/core/actions_setmoduleoptions.inc.php - - - message: '#^Variable \$result might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/actions_setnotes.inc.php - - message: '#^Loose comparison using \=\= between ''directory'' and ''directory'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -5271,7 +5259,7 @@ parameters: - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 9 + count: 8 path: ../../../htdocs/core/class/commonobject.class.php - @@ -5823,7 +5811,7 @@ parameters: - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 11 + count: 10 path: ../../../htdocs/core/class/extrafields.class.php - @@ -7872,54 +7860,12 @@ parameters: count: 2 path: ../../../htdocs/core/modules/member/doc/pdf_standard_member.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modAccounting.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modAccounting.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modAccounting.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modAdherent.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modAdherent.class.php - - message: '#^Variable \$user in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 2 path: ../../../htdocs/core/modules/modAgenda.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modCategorie.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modCategorie.class.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -8118,36 +8064,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modPrelevement.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' identifier: assign.propertyType @@ -8232,42 +8148,12 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modRecruitment.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modResource.class.php - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' identifier: assign.propertyType count: 2 path: ../../../htdocs/core/modules/modSalaries.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modService.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modService.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modService.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modService.class.php - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' identifier: assign.propertyType @@ -8304,18 +8190,6 @@ parameters: count: 5 path: ../../../htdocs/core/modules/modSociete.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modSociete.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modSociete.class.php - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' identifier: assign.propertyType @@ -8352,18 +8226,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modStock.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modStock.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modStock.class.php - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' identifier: assign.propertyType @@ -8376,30 +8238,12 @@ parameters: count: 3 path: ../../../htdocs/core/modules/modSupplierProposal.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modTax.class.php - - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modTax.class.php - - message: '#^Property DolibarrModules\:\:\$export_permission \(array\\>\) does not accept non\-empty\-array\\>\.$#' identifier: assign.propertyType count: 1 path: ../../../htdocs/core/modules/modUser.class.php - - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modUser.class.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -8958,18 +8802,6 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/objectline_title.tpl.php - - - message: '#^Variable \$outputalsopricetotalwithtax might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/objectline_title.tpl.php - - - - message: '#^Variable \$usemargins might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/objectline_title.tpl.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9168,24 +9000,6 @@ parameters: count: 1 path: ../../../htdocs/document.php - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/document.php - - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/info.php - - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/note.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -11376,96 +11190,6 @@ parameters: count: 1 path: ../../../htdocs/loan/class/loanschedule.class.php - - - message: '#^Property LoanSchedule\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$fk_loan \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$fk_payment_loan \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property LoanSchedule\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/loan/class/loanschedule.class.php - - - - message: '#^Property PaymentLoan\:\:\$amount_capital \(float\|int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$amount_insurance \(float\|int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$fk_loan \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - - - message: '#^Property PaymentLoan\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/loan/class/paymentloan.class.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -12084,42 +11808,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/class/mo.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/mrp/class/mo.class.php - - - - message: '#^Property Mo\:\:\$fk_product \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - - - message: '#^Property Mo\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - - - message: '#^Property Mo\:\:\$mrptype \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - - - message: '#^Property Mo\:\:\$qty \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -12162,18 +11850,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/mo_agenda.php - - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_card.php - - - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_movements.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -12198,12 +11874,6 @@ parameters: count: 2 path: ../../../htdocs/mrp/mo_production.php - - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_production.php - - message: '#^Result of \|\| is always true\.$#' identifier: booleanOr.alwaysTrue @@ -13434,12 +13104,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/movement_list.php - - - message: '#^Variable \$listofobjectref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/movement_list.php - - message: '#^Variable \$month might not be defined\.$#' identifier: variable.undefined @@ -15846,18 +15510,6 @@ parameters: count: 1 path: ../../../htdocs/salaries/list.php - - - message: '#^Comparison operation "\>" between 1 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/salaries/paiement_salary.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/salaries/paiement_salary.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -17451,7 +17103,7 @@ parameters: - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 8 + count: 7 path: ../../../htdocs/webportal/class/html.formwebportal.class.php - diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 08c4603f85e..84f617721b4 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -12,11 +12,11 @@ return [ // PhanUndeclaredProperty : 420+ occurrences // PhanTypeMismatchProperty : 100+ occurrences // PhanTypeMismatchArgument : 70+ occurrences - // PhanUndeclaredGlobalVariable : 65+ occurrences + // PhanUndeclaredGlobalVariable : 60+ occurrences // PhanTypeMismatchArgumentNullable : 40+ occurrences // PhanTypeInvalidDimOffset : 15+ occurrences // PhanTypeMismatchDimFetch : 15+ occurrences - // PhanUndeclaredMethod : 9 occurrences + // PhanUndeclaredMethod : 8 occurrences // PhanPossiblyUndeclaredGlobalVariable : 6 occurrences // PhanTypeArraySuspiciousNull : 6 occurrences // PhanTypeComparisonFromArray : 6 occurrences @@ -31,7 +31,6 @@ return [ // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'], 'htdocs/comm/action/index.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'], @@ -157,10 +156,7 @@ return [ 'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'], 'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'], 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'], - 'htdocs/don/document.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/don/info.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/don/list.php' => ['PhanTypeMismatchProperty'], - 'htdocs/don/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'], 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgument'], @@ -217,7 +213,7 @@ return [ 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/product/stock/info.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/list.php' => ['PhanUndeclaredProperty'], - 'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredProperty'], 'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stats/expedition.php' => ['PhanUndeclaredProperty'], @@ -253,7 +249,7 @@ return [ 'htdocs/recruitment/recruitmentjobposition_card.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/salaries/paiement_salary.php' => ['PhanUndeclaredProperty'], + 'htdocs/salaries/payment_salary.php' => ['PhanUndeclaredProperty'], 'htdocs/salaries/virement_request.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/class/societe.class.php' => ['PhanTypeMismatchProperty'], diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index e0d54a841bf..d49d384b256 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -175,7 +175,6 @@ Child of ClassNotFound Clear ClickToDial -Clients Clone CloneAffectation CloneChanges @@ -626,7 +625,6 @@ Poll Posts PredefinedInterventional PrevRangeToThisRange -PreviousFingerprint Print PrintDriver PrintModule diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 2ebfc52b28d..013a3359ec1 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2025 Alexandre Spangaro * Copyright (C) 2016-2018 Laurent Destailleur * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -431,7 +431,7 @@ if ($resql) { $newcardbutton = dolGetButtonTitle($langs->trans('Addanaccount'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/card.php?action=create', '', $permissiontoadd); - print '
'; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 40f8b1f97f4..ff087293945 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -202,7 +202,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-fis if ($action == 'create') { print load_fiche_titre($title, '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 7bf6f41e5e4..fda3bba2f67 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -694,13 +694,18 @@ foreach ($arrayofmodules as $module) { } print ''; print ''; - +print '
'; // Show advanced options print '


'; // Advanced params +print '
'; +print ''; +print ''; +print ''; + print '
'; print ''; print ''; diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index 4ff4be4aa89..629d385288d 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2016-2018 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -336,7 +336,7 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array(); - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index c03f08c3fcf..7f5cdd39ae3 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Olivier Geffroy * Copyright (C) 2016 Florian Henry * Copyright (C) 2016-2025 Alexandre Spangaro - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -318,7 +318,7 @@ if ($action != 'export') { setEventMessages($object->error, $object->errors, 'errors'); } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 42303f17696..142d82f7ee8 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -606,13 +606,7 @@ if ($action == 'create') { print load_fiche_titre($langs->trans("UpdateMvts"), $backlink); }*/ - $head = array(); - $h = 0; - $head[$h][0] = DOL_URL_ROOT."/accountancy/bookkeeping/card.php".'?piece_num='.((int) $object->piece_num).($mode ? '&mode='.$mode : '').($type ? '&type='.$type : '').'&backtopage='.urlencode($backtopage); - $head[$h][1] = $langs->trans("Transaction"); - $head[$h][2] = 'transaction'; - $h++; - + $head = accounting_transaction_prepare_head($object, $mode, $type, $backtopage); print dol_get_fiche_head($head, 'transaction', '', -1); //$object->label = $object->doc_ref; diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index b6a0aa3ca7c..2731b6496b3 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -877,7 +877,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) { $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); -print ''; +print ''; print ''; print ''; if ($optioncss != '') { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 9490187d62b..34c23887cdd 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -853,7 +853,7 @@ if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringaut } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); -print ''; +print ''; print ''; print ''; if ($optioncss != '') { diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index a8dc1519930..3809675312e 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2020 Florian Henry * Copyright (C) 2013-2025 Alexandre Spangaro - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024-2025 MDW * Copyright (C) 2025 Nicolas Barrouillet * @@ -866,7 +866,7 @@ if (GETPOSTINT('nomassaction') || in_array($massaction, array('preunletteringaut } $massactionbutton = $form->selectMassAction($massaction, $arrayofmassactions); -print ''; +print ''; print ''; print ''; if ($optioncss != '') { diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 532f0efb9f7..c5726fe0c95 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 Alexandre Janniaux * * This program is free software; you can redistribute it and/or modify @@ -217,7 +217,7 @@ class AccountingJournal extends CommonObject $result = ''; - $url = DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35'; + $url = dolBuildUrl(DOL_URL_ROOT.'/accountancy/admin/journals_list.php', ['id' => 35]); $label = ''.$langs->trans("ShowAccountingJournal").''; if (!empty($this->code)) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 6204782b166..4b0f431aa22 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -595,7 +595,8 @@ class BookKeeping extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$this->piece_num; + $baseurl = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php'; + $query = ['piece_num' => $this->piece_num]; if ($option != 'nolink') { // Add param to save lastsearch_values or not @@ -604,9 +605,10 @@ class BookKeeping extends CommonObject $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { - $url .= '&save_lastsearch_values=1'; + $query += ['save_lastsearch_values' => 1]; } } + $url = dolBuildUrl($baseurl, $query); $linkclose = ''; if (empty($notooltip)) { @@ -3539,7 +3541,7 @@ class BookKeeping extends CommonObject */ public function newCloneMass($toselect, $code_journal, $docdate) { - global $langs; + global $langs, $user; $error = 0; $this->db->begin(); @@ -3593,22 +3595,55 @@ class BookKeeping extends CommonObject if ($bookKeeping->fetch($toselectid)) { $code_journal = getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL') ? $code_journal : $bookKeeping->code_journal; $journal_label = getDolGlobalString('ACCOUNTING_CLONING_ENABLE_INPUT_JOURNAL') ? $accountingJournal->label : $bookKeeping->journal_label; - $sql = "SELECT piece_num, label_operation, numero_compte, label_compte, doc_type, code_journal, fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant "; - $sql .= "FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE rowid = " . ((int) $toselectid); + $sql = "SELECT piece_num, label_operation, numero_compte, label_compte, subledger_account, subledger_label, doc_type, code_journal, fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant"; + $sql .= " FROM ".$this->db->prefix()."accounting_bookkeeping WHERE rowid = " . ((int) $toselectid); $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { $docRef = $langs->trans("CloneOf", $obj->doc_ref); - $sql_insert = "INSERT INTO ".$this->db->prefix()."accounting_bookkeeping"; - $sql_insert .= " (piece_num, label_operation, numero_compte, label_compte, doc_type, code_journal, doc_date,"; - $sql_insert .= " fk_user_author, doc_ref, fk_doc, fk_docdet, debit, credit, journal_label, sens, montant"; + $sql_insert = "INSERT INTO ".$this->db->prefix()."accounting_bookkeeping ("; + $sql_insert .= " piece_num"; + $sql_insert .= ", label_operation"; + $sql_insert .= ", numero_compte"; + $sql_insert .= ", label_compte"; + $sql_insert .= ", subledger_account"; + $sql_insert .= ", subledger_label"; + $sql_insert .= ", doc_type"; + $sql_insert .= ", code_journal"; + $sql_insert .= ", doc_date"; + $sql_insert .= ", date_creation"; + $sql_insert .= ", fk_user_author"; + $sql_insert .= ", doc_ref"; + $sql_insert .= ", fk_doc"; + $sql_insert .= ", fk_docdet"; + $sql_insert .= ", debit"; + $sql_insert .= ", credit"; + $sql_insert .= ", journal_label"; + $sql_insert .= ", sens"; + $sql_insert .= ", montant"; $sql_insert .= ")"; - $sql_insert .= " VALUES (" . ((int) $pieceNumNext) . ", '" . $this->db->escape($obj->label_operation) . "', '" . $this->db->escape($obj->numero_compte) . "',"; - $sql_insert .= " '" . $this->db->escape($obj->label_compte) . "', '" . $this->db->escape($obj->doc_type) . "', '" . $this->db->escape($code_journal) . "', '" . $this->db->idate($docdate)."',"; - $sql_insert .= " '" . $this->db->escape($obj->fk_user_author) . "', '" . $this->db->escape($docRef) . "', " . ((int) $obj->fk_doc) . ", " . ((int) $obj->fk_docdet) . ","; - $sql_insert .= " " . (float) $obj->debit . ", " . (float) $obj->credit . ", '" . $this->db->escape($journal_label) . "', '" . $this->db->escape($obj->sens) . "', " . (float) $obj->montant; + $sql_insert .= " VALUES ("; + $sql_insert .= $pieceNumNext; + $sql_insert .= ", '" . $this->db->escape($obj->label_operation) . "'"; + $sql_insert .= ", '" . $this->db->escape($obj->numero_compte) . "'"; + $sql_insert .= ", '" . $this->db->escape($obj->label_compte) . "'"; + $sql_insert .= ", '" . $this->db->escape($obj->subledger_account) . "'"; + $sql_insert .= ", '" . $this->db->escape($obj->subledger_label) . "'"; + $sql_insert .= ", ''"; + $sql_insert .= ", '" . $this->db->escape($code_journal) . "'"; + $sql_insert .= ", '" . $this->db->idate($docdate)."'"; + $sql_insert .= ", '" . $this->db->idate($now)."'"; + $sql_insert .= ", ".($user->id > 0 ? ((int) $user->id) : "NULL"); + $sql_insert .= ", '" . $this->db->escape($docRef) . "'"; + $sql_insert .= ", 0"; + $sql_insert .= ", 0"; + $sql_insert .= ", " . (float) $obj->debit; + $sql_insert .= ", " . (float) $obj->credit; + $sql_insert .= ", '" . $this->db->escape($journal_label) . "'"; + $sql_insert .= ", '" . $this->db->escape($obj->sens) . "'"; + $sql_insert .= ", " . (float) $obj->montant; $sql_insert .= ")"; $resqlInsert = $this->db->query($sql_insert); diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 29301ed70e9..0133df68c6c 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -388,7 +388,7 @@ if ($result) { if (getDolGlobalString('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS') && ($lineisapurchase == 1 || $lineisasale == 1) ) { if ($lineisapurchase == 1) { $sqlamount = "SELECT SUM(pf.amount) as amount"; - $sqlamount .= " FROM ".MAIN_DB_PREFIX."paiementfounr_facturefourn AS pf"; + $sqlamount .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn AS pf"; $sqlamount .= " INNER JOIN ".MAIN_DB_PREFIX."paiementfourn AS p ON pf.fk_paiementfourn = p.rowid"; $sqlamount .= " RIGHT JOIN ".MAIN_DB_PREFIX."facture AS f ON pf.fk_facturefourn = f.rowid"; $sqlamount .= " WHERE p.fk_bank = ".((int) $obj->rowid); diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 31c6a2c43f9..00d247d1d63 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -293,7 +293,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_M llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup'); @@ -367,7 +367,7 @@ foreach ($arrayofmodules as $file => $modCodeMember) { print '
'."\n"; print ''."\n"; - if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") { + if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON', 'mod_member_simple') == "$file") { print '\n"; diff --git a/htdocs/adherents/admin/member_emails.php b/htdocs/adherents/admin/member_emails.php index 49731bce47c..4f3ee48ffe8 100644 --- a/htdocs/adherents/admin/member_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -150,7 +150,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_M llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_emails'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/adherents/admin/member_extrafields.php b/htdocs/adherents/admin/member_extrafields.php index 3e77fc6416a..bb3199e16b5 100644 --- a/htdocs/adherents/admin/member_extrafields.php +++ b/htdocs/adherents/admin/member_extrafields.php @@ -76,7 +76,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_M llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/adherents/admin/member_type_extrafields.php b/htdocs/adherents/admin/member_type_extrafields.php index fbcaadfed7c..de9c3b6e90f 100644 --- a/htdocs/adherents/admin/member_type_extrafields.php +++ b/htdocs/adherents/admin/member_type_extrafields.php @@ -79,7 +79,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_M llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_type_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 600aa55fc1b..34fe35153ca 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -129,7 +129,7 @@ $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_M llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-admin_website'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($title, $linkback, 'title_setup'); @@ -312,6 +312,13 @@ if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) { print $form->selectarray("MEMBER_NEWFORM_PAYONLINE", $listofval, getDolGlobalString('MEMBER_NEWFORM_PAYONLINE'), 0); print "\n"; + // Search a member after member creation form + print '\n"; + print '
'.$modCodeMember->info($langs).''.$modCodeMember->getExample().''."\n"; print img_picto($langs->trans("Activated"), 'switch_on'); print "
'; + print $langs->trans("MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATE"); + print ''; + print $form->selectyesno("MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATE"); // Reverse the logic "hide -> show" for retrocompatibility + print "
'; print '
'; diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 2d492302262..a9e3d211440 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -181,13 +181,13 @@ if ($object->id > 0) { $newcardbutton = ''; - $messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/messaging.php', ['rowid' => $object->id]); $newcardbutton .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); - $messagingUrl = DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/agenda.php', ['id' => $object->id]); $newcardbutton .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); if (isModEnabled('agenda')) { - $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).($object->id > 0 ? '?id='.$object->id : '').'&origin=member&originid='.$id); + $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', ['action' => 'create', 'backtopage' => dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id, 'origin' => 'member', 'originid' => $id])])); } if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 29285113098..8eda2fd4195 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -314,7 +314,6 @@ class Adherent extends CommonObject */ public $invoice; - /** * 'type' field format: * 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', @@ -712,23 +711,20 @@ class Adherent extends CommonObject $id = $this->db->last_insert_id(MAIN_DB_PREFIX."adherent"); if ($id > 0) { $this->id = $id; - if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == '') { - // keep old numbering - $this->ref = (string) $id; - } else { - // auto code - $modfile = dol_buildpath('core/modules/member/'.getDolGlobalString('MEMBER_CODEMEMBER_ADDON').'.php', 0); - try { - require_once $modfile; - $modname = getDolGlobalString('MEMBER_CODEMEMBER_ADDON'); - $modCodeMember = new $modname(); - '@phan-var-force ModeleNumRefMembers $modCodeMember'; - /** @var ModeleNumRefMembers $modCodeMember */ - $this->ref = $modCodeMember->getNextValue($mysoc, $this); - } catch (Exception $e) { - dol_syslog($e->getMessage(), LOG_ERR); - $error++; - } + + $modulenum = getDolGlobalString('MEMBER_CODEMEMBER_ADDON', 'mod_member_simple'); + + $modfile = dol_buildpath('core/modules/member/'.$modulenum.'.php', 0); + try { + require_once $modfile; + $modname = $modulenum; + $modCodeMember = new $modname(); + '@phan-var-force ModeleNumRefMembers $modCodeMember'; + /** @var ModeleNumRefMembers $modCodeMember */ + $this->ref = $modCodeMember->getNextValue($mysoc, $this); + } catch (Exception $e) { + dol_syslog($e->getMessage(), LOG_ERR); + $error++; } // Update minor fields @@ -2778,10 +2774,10 @@ class Adherent extends CommonObject $warning_delay = getWarningDelay('member', 'subscription') / 60 / 60 / 24; $label = $langs->trans("MembersWithSubscriptionToReceive"); $labelShort = $langs->trans("MembersWithSubscriptionToReceiveShort"); - $url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut='.self::STATUS_VALIDATED.'&filter=outofdate'; + $url = dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['mainmenu' => 'members', 'statut' => self::STATUS_VALIDATED, 'filter' => 'outofdate']); } elseif ($mode == 'shift') { $warning_delay = getWarningDelay('member', 'subscription') / 60 / 60 / 24; - $url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut='.self::STATUS_DRAFT; + $url = dolBuildUrl(DOL_URL_ROOT.'/adherents/list.php', ['mainmenu' => 'members', 'statut' => self::STATUS_DRAFT]); $label = $langs->trans("MembersListToValid"); $labelShort = $langs->trans("ToValidate"); } diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index ebae7156dd8..f35d7703d97 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -113,6 +113,7 @@ class Subscription extends CommonObject 'fk_type' => array('type' => 'integer', 'label' => 'MemberType', 'enabled' => 1, 'visible' => -1, 'position' => 55), 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => -2, 'position' => 60), 'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'enabled' => 1, 'visible' => -1, 'position' => 65), + 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 805), ); @@ -144,6 +145,11 @@ class Subscription extends CommonObject $now = dol_now(); + // Clean parameters + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } + // Check parameters if ($this->datef <= $this->dateh) { $this->error = $langs->trans("ErrorBadValueForDate"); @@ -165,7 +171,7 @@ class Subscription extends CommonObject $type = $this->fk_type; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, note_private, ref_ext, fk_user_creat)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, note_private, ref_ext, fk_user_creat, import_key)"; $sql .= " VALUES (".((int) $this->fk_adherent).", '".$this->db->escape((string) $type)."', '".$this->db->idate($now)."',"; $sql .= " '".$this->db->idate($this->dateh)."',"; $sql .= " '".$this->db->idate($this->datef)."',"; @@ -174,6 +180,7 @@ class Subscription extends CommonObject $sql .= " '".$this->db->escape($this->note_private)."',"; $sql .= " ".(empty($this->ref_ext) ? "null" : "'".$this->db->escape($this->ref_ext)."'").","; $sql .= " ".((int) ($this->user_creation_id > 0 ? $this->user_creation_id : $user->id)); + $sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); $sql .= ")"; $resql = $this->db->query($sql); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index dc7f81c658d..89c2e313fd6 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -1,8 +1,8 @@ - * Copyright (C) 2006-2021 Regis Houssin - * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2006 Laurent Destailleur + * Copyright (C) 2006-2021 Regis Houssin + * Copyright (C) 2024 Alexandre Spangaro + * Copyright (C) 2024-2025 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 @@ -174,7 +174,7 @@ print dol_get_fiche_end(); print '
'; if (getDolGlobalString('LDAP_MEMBER_ACTIVE') && getDolGlobalString('LDAP_MEMBER_ACTIVE') != Ldap::SYNCHRO_LDAP_TO_DOLIBARR) { - print ''; + print ''; } print "
\n"; diff --git a/htdocs/adherents/messaging.php b/htdocs/adherents/messaging.php index d41d8ac2085..1be06a45bc3 100644 --- a/htdocs/adherents/messaging.php +++ b/htdocs/adherents/messaging.php @@ -181,9 +181,9 @@ if ((!empty($objUser->id) || !empty($objcon->id)) && $permok) { $morehtmlright = ''; -$messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id; +$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/messaging.php', ['rowid' => $object->id]); $morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 2); -$messagingUrl = DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id; +$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/adherents/agenda.php', ['id' => $object->id]); $morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1); if (isModEnabled('agenda')) { diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 56736ffd687..31416a8f55c 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -257,13 +257,13 @@ if ($mode && !count($data)) { } else { print ''.$langs->trans("MembersStatisticsDesc").'
'; print '
'; - print ''.$langs->trans("MembersStatisticsByCountries").'
'; + print ' 'memberbycountry']).'">'.$langs->trans("MembersStatisticsByCountries").'
'; print '
'; - print ''.$langs->trans("MembersStatisticsByState").'
'; + print ' 'memberbystate']).'">'.$langs->trans("MembersStatisticsByState").'
'; print '
'; - print ''.$langs->trans("MembersStatisticsByTown").'
'; + print ' 'memberbytown']).'">'.$langs->trans("MembersStatisticsByTown").'
'; print '
'; //+ - print ''.$langs->trans("MembersStatisticsByRegion").'
'; //+ + print ' 'memberbyregion']).'">'.$langs->trans("MembersStatisticsByRegion").'
'; //+ } print '
'; } diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 432069604fc..6a3635a3388 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -165,7 +165,7 @@ print dol_get_fiche_head($head, 'statssubscription', '', -1, ''); print '
'; // Show filter box -/*print ''; +/*print ''; print ''; print ''; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 44b32c55d9a..75999a51ef7 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -493,7 +493,7 @@ print ''; print dol_get_fiche_head($head, 'subscription', $langs->trans("Member"), -1, 'user'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); @@ -951,7 +951,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index ec03893f049..1903e4d6de3 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -3,7 +3,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -57,7 +57,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } echo ''; echo ''; - echo ''; + echo ''; echo ''; } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b7bad18911e..30cdbf6d961 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -331,7 +331,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') { $newcardbutton .= dolGetButtonTitle($langs->trans('NewMemberType'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/type.php?action=create'); } - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 9b9abcff9ac..dea20260bfb 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -4,7 +4,7 @@ * Copyright (C) 2010-2012 Destailleur Laurent * Copyright (C) 2014 Henry Florian * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -75,7 +75,7 @@ if ($action == 'delete' && GETPOST('langtodelete', 'alpha') && $user->hasRight(' $result = $object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user); if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); + header("Location: ".dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $id])); exit; } } @@ -90,9 +90,9 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->hasRight(' // update of object if ($forcelangprod == $current_lang) { - $object->label = GETPOST("libelle", 'alphanohtml'); + $object->label = GETPOST("libelle", 'alphanohtml'); $object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); - //$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); + //$object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); } else { $object->multilangs[$forcelangprod]["label"] = GETPOST("libelle", 'alphanohtml'); $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); @@ -116,13 +116,13 @@ if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->hasRight( foreach ($object->multilangs as $key => $value) { // saving new values in the object if ($key == $current_lang) { - $object->label = GETPOST("libelle-".$key, 'alphanohtml'); + $object->label = GETPOST("libelle-".$key, 'alphanohtml'); $object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); - $object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); + $object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); } else { - $object->multilangs[$key]["label"] = GETPOST("libelle-".$key, 'alphanohtml'); + $object->multilangs[$key]["label"] = GETPOST("libelle-".$key, 'alphanohtml'); $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); - $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); + $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); } } @@ -200,9 +200,9 @@ print "\n
\n"; if ($action == '') { if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { - print ''.$langs->trans("Add").''; + print ''.$langs->trans("Add").''; if ($cnt_trans > 0) { - print ''.$langs->trans("Update").''; + print ''.$langs->trans("Update").''; } } } @@ -228,7 +228,7 @@ if ($action == 'edit') { print($s ? $s.' ' : '').''.$langs->trans('Language_'.$key).':'; print '
'; print ''; print '
'; @@ -254,7 +254,7 @@ if ($action == 'edit') { print($s ? $s.' ' : '').''.$langs->trans('Language_'.$key).':'; print ''; print ''; diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index e2168f45de4..8fe27992264 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -81,7 +81,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if ($action != 'updateedit' && !$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".dolBuildUrl($_SERVER["PHP_SELF"])); exit; } } @@ -124,7 +124,7 @@ if (!empty($conf->use_javascript_ajax)) { print ''."\n"; } -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/accounting.php b/htdocs/admin/accounting.php index 9307ebe381b..49db0a149bc 100644 --- a/htdocs/admin/accounting.php +++ b/htdocs/admin/accounting.php @@ -67,13 +67,13 @@ $help_url = ''; llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-admin page-accounting'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($title, $linkback, 'title_setup'); print "
\n"; $texttoshow = $langs->trans("AccountancySetupDoneFromAccountancyMenu", '{s1}'.$langs->transnoentitiesnoconv("Accounting").' - '.$langs->transnoentitiesnoconv("Setup").'{s2}'); -$texttoshow = str_replace('{s1}', '', $texttoshow); +$texttoshow = str_replace('{s1}', '', $texttoshow); $texttoshow = str_replace('{s2}', ''.img_picto("", "url", 'class="paddingleft"'), $texttoshow); print ''.$texttoshow."
\n"; print "
\n"; diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 742c541da99..b28dd64b274 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -129,7 +129,7 @@ $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Ter llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-admin page-agenda'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 51aa833f5f8..8a581ac0fa3 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -75,7 +75,7 @@ $textobject = $langs->transnoentitiesnoconv("Agenda"); $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 9593272bcaa..7ab2ac7508e 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -201,7 +201,7 @@ $arrayofcss = array(); $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-admin page-agenda-extsites'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 060008ae883..fede7a740ca 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -198,7 +198,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_other'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index c95993e4586..c6a7c0d28d8 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -166,7 +166,7 @@ $formactions = new FormActions($db); $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-agenda_reminder'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 4ed15ecf8e3..2e21b9887fe 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -104,7 +104,7 @@ if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) { $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_xcal'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index e412202f15d..369382bf4e5 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -224,7 +224,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-admin page-bank'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup'); diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index f005ce7466c..17ff1082230 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -76,7 +76,7 @@ $page_name = "BankSetupModule"; llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bank_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/bank_payments_extrafields.php b/htdocs/admin/bank_payments_extrafields.php index e1b84db3157..b4ca2483f2c 100644 --- a/htdocs/admin/bank_payments_extrafields.php +++ b/htdocs/admin/bank_payments_extrafields.php @@ -76,7 +76,7 @@ $page_name = "BankSetupModule"; llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bank_payments_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/bankline_extrafields.php b/htdocs/admin/bankline_extrafields.php index 0f0a2d97c77..d8c812d08d4 100644 --- a/htdocs/admin/bankline_extrafields.php +++ b/htdocs/admin/bankline_extrafields.php @@ -76,7 +76,7 @@ $page_name = "BankSetupModule"; llxHeader('', $langs->trans("BankSetupModule"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bankline_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 790e5fb2cb1..14e773bf017 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -148,7 +148,7 @@ $formbarcode = new FormBarCode($db); $help_url = 'EN:Module_Barcode|FR:Module_Codes_Barre|ES:Módulo Código de barra|DE:Modul_Barcode'; llxHeader('', $langs->trans("BarcodeSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-barcode'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BarcodeSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 57cb649fbe6..7009b6149f7 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -175,7 +175,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader("", $langs->trans("BOMsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-bom'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/bom_extrafields.php b/htdocs/admin/bom_extrafields.php index 38e70b2e7a2..01d9ca59dbe 100644 --- a/htdocs/admin/bom_extrafields.php +++ b/htdocs/admin/bom_extrafields.php @@ -76,7 +76,7 @@ $help_url = ''; llxHeader('', $langs->trans("BOMsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bom_extrafiels'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/bomline_extrafields.php b/htdocs/admin/bomline_extrafields.php index 6fc194fcb6d..8c5126c0ab8 100644 --- a/htdocs/admin/bomline_extrafields.php +++ b/htdocs/admin/bomline_extrafields.php @@ -76,7 +76,7 @@ $help_url = ''; llxHeader('', $langs->trans("BOMsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-bomline_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BOMsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 322f8c73252..a4dd5c4fff5 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -115,7 +115,7 @@ llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-a $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup'); diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 8cc80ef93fb..a8042b821f6 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -81,7 +81,7 @@ $user->fetch_clicktodial(); $wikihelp = 'EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es'; llxHeader('', $langs->trans("ClickToDialSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-clicktodial'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ClickToDialSetup"), $linkback, 'title_setup'); @@ -175,7 +175,7 @@ if (getDolGlobalString('CLICKTODIAL_URL')) { $phonefortest = GETPOST('phonefortest'); } - print ''; + print ''; print ''; print $langs->trans("LinkToTestClickToDial", $user->login).' : '; print ''; diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php index 191c7f9d802..18b5493d9eb 100644 --- a/htdocs/admin/company_socialnetworks.php +++ b/htdocs/admin/company_socialnetworks.php @@ -6,7 +6,7 @@ * Copyright (C) 2011-2017 Philippe Grand * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2017 Rui Strecht - * Copyright (C) 2020-2024 Frédéric France + * Copyright (C) 2020-2025 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 @@ -112,7 +112,7 @@ print "
\n"; * Edit parameters */ -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index eca386cf842..c2311d835b0 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -142,7 +142,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-compta'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ComptaSetup'), $linkback, 'title_setup'); diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index e04ceef843a..8749fa2c62a 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -219,7 +219,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-contract'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index bbc1539d84e..0afe48564ea 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -85,7 +85,7 @@ $help_url = 'EN:Module_DAV'; llxHeader('', $langs->trans("DAVSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-dav'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("DAVSetup"), $linkback, 'title_setup'); @@ -98,7 +98,7 @@ $head = dav_admin_prepare_head(); print dol_get_fiche_head($head, 'webdav', '', -1, ''); if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php index d2c17dd88df..284a0b7d92c 100644 --- a/htdocs/admin/debugbar.php +++ b/htdocs/admin/debugbar.php @@ -80,7 +80,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-debugbar'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index a4ee948e317..e4febb73d31 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -220,7 +220,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-delivery'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/delivery_extrafields.php b/htdocs/admin/delivery_extrafields.php index f2f39fab87f..7153e8b2588 100644 --- a/htdocs/admin/delivery_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -77,7 +77,7 @@ $textobject = $langs->transnoentitiesnoconv("Receivings"); llxHeader('', $langs->trans("SendingsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-delivery-extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/deliverydet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php index ea9990c20b8..d778b547d18 100644 --- a/htdocs/admin/deliverydet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv("Receivings"); llxHeader('', $langs->trans("SendingsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-deliverydet_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 23d798ff683..648ec2a8eb5 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -85,7 +85,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans("ECMSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-ecm'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php index 6ebdc1e490a..aaba4e1bf38 100644 --- a/htdocs/admin/ecm_directories_extrafields.php +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -77,7 +77,7 @@ $textobject = $langs->transnoentitiesnoconv("ECM"); llxHeader('', $langs->trans("ECMSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-ecm_directories_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php index d5aba25e7d0..c99dc245924 100644 --- a/htdocs/admin/ecm_files_extrafields.php +++ b/htdocs/admin/ecm_files_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("ECM"); llxHeader('', $langs->trans("ECMSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-ecm_files_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index ac3aea7c570..b14439fc7cd 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2018 Laurent Destailleur * Copyright (C) 2022 Charlene Benke * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -289,7 +289,7 @@ llxHeader('', 'EmailCollector', $help_url, '', 0, 0, '', '', '', 'mod-admin page if ($action == 'create') { print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector"))); - print ''; + print ''; print ''; print ''; print ''; @@ -319,7 +319,7 @@ if ($action == 'create') { if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("EmailCollector")); - print ''; + print ''; print ''; print ''; print ''; @@ -641,7 +641,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').' $object->id, 'action' => 'dellink', 'dellinkid' => $key], true).'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'
'; - print ''; + print ''; print ''; print ''; print ''; @@ -838,16 +838,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Move up/down print ''; if ($i > 0) { - print ''.img_up('default', 0, 'imgupforline').''; + print ''.img_up('default', 0, 'imgupforline').''; } if ($i < count($object->actions) - 1) { - print ''.img_down('default', 0, 'imgdownforline').''; + print ''.img_down('default', 0, 'imgdownforline').''; } print ''; // Delete print ''; print ''.img_edit().''; - print ' '.img_delete().''; + print ' $object->id, 'action' => 'deleteoperation', 'operationid' => $ruleaction['id']], true).'">'.img_delete().''; print ''; print ''; $i++; diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 6f0813c62bf..1c3aec58f29 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -342,7 +342,7 @@ if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sear llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-user page-emailcollector_list'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($title, $linkback, 'title_setup'); diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 5970b97d248..e1bab9af0ab 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -161,7 +161,7 @@ print '
'; if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/eventorganization_confbooth_extrafields.php b/htdocs/admin/eventorganization_confbooth_extrafields.php index 267fb237203..8cef64b5db8 100644 --- a/htdocs/admin/eventorganization_confbooth_extrafields.php +++ b/htdocs/admin/eventorganization_confbooth_extrafields.php @@ -74,7 +74,7 @@ $page_name = "EventOrganizationSetup"; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-eventorganization_confbooth_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/eventorganization_confboothattendee_extrafields.php b/htdocs/admin/eventorganization_confboothattendee_extrafields.php index 8b5450fe74d..d33db8b1863 100644 --- a/htdocs/admin/eventorganization_confboothattendee_extrafields.php +++ b/htdocs/admin/eventorganization_confboothattendee_extrafields.php @@ -76,7 +76,7 @@ $page_name = 'EventOrganizationSetup'; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-eventorganization_conferenceorboothattendee_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/eventorganization_public.php b/htdocs/admin/eventorganization_public.php index cbd8ae0523d..a189e0e863e 100644 --- a/htdocs/admin/eventorganization_public.php +++ b/htdocs/admin/eventorganization_public.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -111,7 +111,7 @@ print dol_get_fiche_head($head, 'public', $langs->trans($page_name), -1, 'evento print '
'; if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index f25571cb52c..baf97ee3897 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -102,7 +102,7 @@ $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $wikihelp = 'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; llxHeader('', $langs->trans("Audit"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-events'); -//$linkback=''.$langs->trans("BackToModuleList").''; +//$linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print ''.$langs->trans("LogEventDesc", $langs->transnoentitiesnoconv("AdminTools"), $langs->transnoentitiesnoconv("Audit"))."
\n"; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 05aae48375f..e01887416cc 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -178,7 +178,7 @@ $form = new Form($db); llxHeader("", $langs->trans("SendingsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-expedition'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print '
'; @@ -415,7 +415,7 @@ foreach ($dirmodels as $reldir) { // Preview print ''; if ($module->type == 'pdf') { - print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; + print ' 'specimen', 'module' => $name, 'scan_dir' => $module->scandir, 'label' => $module->name], true).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index db5fa799ce1..63cb11e4335 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv("Sendings"); llxHeader('', $langs->trans("SendingsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-expedition-extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 2d577b5936e..b8d2d5f0093 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -79,7 +79,7 @@ $textobject = $langs->transnoentitiesnoconv("Sendings"); llxHeader('', $langs->trans("SendingsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-expeditiondet_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index acb78e1ed94..cce9f65dd8b 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -201,7 +201,7 @@ llxHeader('', $langs->trans("ExpenseReportsSetup"), '', '', 0, 0, '', '', '', 'm $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 40d989d2d88..c3690d4a80c 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -74,7 +74,7 @@ $textobject = $langs->transnoentitiesnoconv("ExpenseReports"); llxHeader('', $langs->trans("ExpenseReportsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-expensereport_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index b8b914b88b0..0d07fe19d99 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -116,7 +116,7 @@ llxHeader('', $langs->trans("ExpenseReportsSetup"), '', '', 0, 0, '', '', '', 'm $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 17ede5126c1..1ec1adaa852 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -198,7 +198,7 @@ llxHeader('', $langs->trans("ExpenseReportsSetup"), '', '', 0, 0, '', '', '', 'm $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index 2560e797e06..3578acac780 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -70,7 +70,7 @@ $page_name = "ExportSetup"; llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-export'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index c573bb0f20d..271198e9268 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -198,7 +198,7 @@ $form = new Form($db); llxHeader('', $langs->trans("ExternalRSSSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-external_rss'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ExternalRSSSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index a11752ca594..5b7699de28c 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -152,7 +152,7 @@ if (GETPOST('save', 'alpha')) { llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-fckeditor'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AdvancedEditor"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/fediverse.php b/htdocs/admin/fediverse.php index c10fccc3404..67fa5f95306 100644 --- a/htdocs/admin/fediverse.php +++ b/htdocs/admin/fediverse.php @@ -269,7 +269,7 @@ llxHeader('', $langs->trans("FediverseSetup"), '', '', 0, 0, '', '', '', 'mod-ad $head = socialnetwork_prepare_head(); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print dol_get_fiche_head($head, 'divers', $langs->trans('MenuDict'), -1, 'user', 0, $linkback, '', 0, '', 0); diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 7550e9ffdaa..fd4c311626d 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -269,7 +269,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-fichinter'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("InterventionsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/fichinter_xcal.php b/htdocs/admin/fichinter_xcal.php index 358cf0ee37c..f01cc23a759 100644 --- a/htdocs/admin/fichinter_xcal.php +++ b/htdocs/admin/fichinter_xcal.php @@ -103,7 +103,7 @@ if (!getDolGlobalString("MAIN_FICHINTER_EXPORT_PAST_DELAY")) { $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_xcal'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 885a9efb988..2b9e1c8151d 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -93,7 +93,7 @@ $form = new Form($db); llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-geoipmaxmind'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("GeoIPMaxmindSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 9206053a24c..32a3815b9c5 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -177,7 +177,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-holiday'); $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("HolidaySetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/holiday_extrafields.php b/htdocs/admin/holiday_extrafields.php index 39136700989..eb052884c32 100644 --- a/htdocs/admin/holiday_extrafields.php +++ b/htdocs/admin/holiday_extrafields.php @@ -75,7 +75,7 @@ $textobject = $langs->transnoentitiesnoconv("Holidays"); llxHeader('', $langs->trans("HolidaySetup"), '', '', 0, 0, '', '', '', 'mod-admin page-holiday_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("HolidaySetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index 1ee36e6528e..a2b18ea1dbf 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -5,7 +5,7 @@ * Copyright (C) 2021 Jean-Pascal BOUDET * Copyright (C) 2021 Grégory BLEMAND * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -249,7 +249,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print ''.$langs->trans("Example").''; print ''.$langs->trans("Status").''; print ''.$langs->trans("ShortInfo").''; - print ''."\n"; + print "\n"; clearstatcache(); @@ -266,8 +266,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file.'.php'; $module = new $file($db); - '@phan-var-force ModeleNumRefEvaluation $module'; + /** @var ModeleNumRefEvaluation $module */ // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -311,6 +311,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $nameofclass = ucfirst($myTmpObjectKey); $mytmpinstance = new $nameofclass($db); '@phan-var-force Evaluation $mytmpinstance'; + /** @var Evaluation $mytmpinstance */ $mytmpinstance->initAsSpecimen(); // Info @@ -436,13 +437,13 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Active if (in_array($name, $def)) { print ''."\n"; - print ''; + print ' 'del', 'value' => $name], true).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; } else { print ''."\n"; - print 'scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print ' 'set', 'value' => $name, 'scan_dir' => $module->scandir, 'label' => $module->name], true).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -505,7 +506,7 @@ if (!getDolGlobalString('HRM_MAXRANK')) { } if ($action != 'editxxx') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index e2b52b32325..f85ad596a0f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -8,7 +8,7 @@ * Copyright (C) 2021-2023 Anthony Berton * Copyright (C) 2023 Eric Seigne * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -379,7 +379,7 @@ print "
\n"; //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -print ''; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/import.php b/htdocs/admin/import.php index 084c42790b0..1ac1bdbd71c 100644 --- a/htdocs/admin/import.php +++ b/htdocs/admin/import.php @@ -71,7 +71,7 @@ $page_name = "ImportSetup"; llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-import'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback); diff --git a/htdocs/admin/invoice.php b/htdocs/admin/invoice.php index 49513c935ed..6f3ae469e04 100644 --- a/htdocs/admin/invoice.php +++ b/htdocs/admin/invoice.php @@ -296,7 +296,7 @@ llxHeader("", $title, 'EN:Invoice_Configuration|FR:Configuration_module_facture| $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($title, $linkback, 'title_setup'); diff --git a/htdocs/admin/invoice_situation.php b/htdocs/admin/invoice_situation.php index 60bdd0eb7ae..cdeeb3ac5fd 100644 --- a/htdocs/admin/invoice_situation.php +++ b/htdocs/admin/invoice_situation.php @@ -140,7 +140,7 @@ $help_url = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:Configu llxHeader("", $langs->trans("BillsSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-invoice_situation'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index c5aafc030b0..ae459e9b8c0 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -199,7 +199,7 @@ $page_name = "KnowledgeManagementSetup"; llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-knowledgemanagement'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); @@ -212,7 +212,7 @@ echo ''.$langs->trans("KnowledgeManagementSetupPage" if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/knowledgerecord_extrafields.php b/htdocs/admin/knowledgerecord_extrafields.php index 61595f95f95..d5fbaed92de 100644 --- a/htdocs/admin/knowledgerecord_extrafields.php +++ b/htdocs/admin/knowledgerecord_extrafields.php @@ -79,7 +79,7 @@ $page_name = 'KnowledgeManagementSetup'; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-knowledgerecord_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 40d4dfc2aac..2ce6519839c 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -133,7 +133,7 @@ if (empty($reshook)) { llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index b6d4b8d9bc8..ac177b0a3d1 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -136,7 +136,7 @@ $form = new Form($db); llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap_contacts'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 9e124b9e91e..5274979e07e 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -114,7 +114,7 @@ $form = new Form($db); llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap_groups'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index a43aa9cca30..1815af0447b 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -181,7 +181,7 @@ $form = new Form($db); llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap_members'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 3addaa9eb4c..74315d46737 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -105,7 +105,7 @@ if ($action == 'setvalue' /* && $user->admin */) { llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap_members_types'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 5b50a98571d..015d3b141a8 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -170,7 +170,7 @@ $form = new Form($db); llxHeader('', $langs->trans("LDAPSetup"), 'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP', '', 0, 0, '', '', '', 'mod-admin page-ldap_users'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index f871642b940..61081ea83e1 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -93,7 +93,7 @@ if (isModEnabled('accounting')) { $formaccounting = null; } -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ConfigLoan'), $linkback, 'title_setup'); diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 770c2a458b2..278bda99fb3 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -135,7 +135,7 @@ if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { llxHeader('', $langs->trans("MailingSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-mailing'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MailingSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index d7570db8834..84299155bf5 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -6,7 +6,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -149,7 +149,7 @@ $help_url = ''; llxHeader('', $langs->trans("MailmanSpipSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-mailman'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MailmanSpipSetup"), $linkback, 'title_setup'); @@ -224,7 +224,7 @@ if (getDolGlobalString('ADHERENT_USE_MAILMAN')) { if (getDolGlobalString('ADHERENT_USE_MAILMAN')) { - print ''; + print ''; print ''; print ''; @@ -233,7 +233,7 @@ if (getDolGlobalString('ADHERENT_USE_MAILMAN')) { print ''; - print '
'; + print ''; print ''; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 307049f7e5a..d343d27c874 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -367,7 +367,7 @@ if ($action == 'edit') { print ''."\n"; } - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index a1dd3fa09f0..9c7e23b8457 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -343,7 +343,7 @@ if ($action == 'edit') { print ''."\n"; } - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index e82e69e47c5..81f7e481aab 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -3,7 +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 + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -342,7 +342,7 @@ if ($action == 'edit') { print ''."\n"; } - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index feb9a573cff..10224371078 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -463,7 +463,7 @@ if ($action != 'create') { print $form->buttonsSaveCancel(); } } else { - /*print ''; + /*print ''; if ($optioncss != '') print ''; print ''; print ''; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index e263337da69..6320898456c 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -3,7 +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 + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -340,7 +340,7 @@ if ($action == 'edit') { print ''."\n"; } - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 351bc9f962d..9869a960973 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -121,7 +121,7 @@ if ($action == 'update' && !$cancel) { $db->close(); // We make a header redirect because we need to change menu NOW. - header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".dolBuildUrl($_SERVER["PHP_SELF"])); exit; } } @@ -143,17 +143,17 @@ print load_fiche_titre($langs->trans("Menus"), '', 'title_setup'); $h = 0; $head = array(); -$head[$h][0] = DOL_URL_ROOT."/admin/menus.php"; +$head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/menus.php"); $head[$h][1] = $langs->trans("MenuHandlers"); $head[$h][2] = 'handler'; $h++; -$head[$h][0] = DOL_URL_ROOT."/admin/menus/index.php"; +$head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/menus/index.php"); $head[$h][1] = $langs->trans("MenuAdmin"); $head[$h][2] = 'editor'; $h++; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 82adeb82823..6b2dc66b1aa 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007 Patrick Raguin * Copyright (C) 2007-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -253,7 +253,7 @@ if ($user->admin) { $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF'])); } -print ''; +print ''; print ''; print $langs->trans("MenuHandler").': '; $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone)); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 255e2a03c15..a38a8fb3466 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -738,7 +738,7 @@ $head = modules_prepare_head($nbofactivatedmodules, count($modules), $nbmodulesn if ($mode == 'common' || $mode == 'commonkanban') { dol_set_focus('#search_keyword'); - print ''; + print ''; print ''; if (isset($optioncss) && $optioncss != '') { print ''; @@ -1063,22 +1063,26 @@ if ($mode == 'common' || $mode == 'commonkanban') { // Set $codetoconfig if (!empty($objMod->config_page_url) && !$disableSetup) { - $backtourlparam = ''; + $backtourlquery = []; if ($search_keyword != '') { - $backtourlparam .= ($backtourlparam ? '&' : '?').'search_keyword='.urlencode($search_keyword); // No urlencode here, done later + $backtourlquery += ['search_keyword' => $search_keyword]; // No urlencode here, done later } if ($search_nature > -1) { - $backtourlparam .= ($backtourlparam ? '&' : '?').'search_nature='.urlencode($search_nature); // No urlencode here, done later + $backtourlquery += ['search_nature' => $search_nature]; // No urlencode here, done later } if ($search_version > -1) { - $backtourlparam .= ($backtourlparam ? '&' : '?').'search_version='.urlencode($search_version); // No urlencode here, done later + $backtourlquery += ['search_version' => $search_version]; // No urlencode here, done later } if ($search_status > -1) { - $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.urlencode($search_status); // No urlencode here, done later + $backtourlquery += ['search_status' => $search_status]; // No urlencode here, done later } - $backtourl = $_SERVER["PHP_SELF"].$backtourlparam; + $backtourl = dolBuildUrl($_SERVER["PHP_SELF"], $backtourlquery); $regs = array(); + $query = [ + 'save_lastsearch_values' => 1, + 'backtopage' => $backtourl, + ]; if (is_array($objMod->config_page_url)) { $i = 0; foreach ($objMod->config_page_url as $page) { @@ -1359,7 +1363,7 @@ if ($mode == 'marketplace') { $categories_tree = $remotestore->getCategories($options['categorie']); // Call API to get the categories - $products_list = $remotestore->getProducts($options); + $products_list = $remotestore->getProducts($options); // Get list of product from all sources $previouslink = $remotestore->get_previous_link(); @@ -1373,7 +1377,7 @@ if ($mode == 'marketplace') {
- +
diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index d704b40b677..bea575e709d 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -185,7 +185,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader("", $langs->trans("MrpSetupPage"), '', '', 0, 0, '', '', '', 'mod-admin page-mrp'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MrpSetupPage"), $linkback, 'title_setup'); diff --git a/htdocs/admin/mrp_extrafields.php b/htdocs/admin/mrp_extrafields.php index 741dee8e0dc..066fb9fe0bc 100644 --- a/htdocs/admin/mrp_extrafields.php +++ b/htdocs/admin/mrp_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv('ManufacturingOrder'); llxHeader('', $langs->trans("MrpSetupPage"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-mrp_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MrpSetupPage"), $linkback, 'title_setup'); diff --git a/htdocs/admin/mrp_production_extrafields.php b/htdocs/admin/mrp_production_extrafields.php index 9ef067e012d..9febcda909e 100644 --- a/htdocs/admin/mrp_production_extrafields.php +++ b/htdocs/admin/mrp_production_extrafields.php @@ -76,7 +76,7 @@ $help_url = ''; llxHeader('', $langs->trans("MrpSetupPage"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-mrp_production_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MrpSetupPage"), $linkback, 'title_setup'); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 110707e4912..97ac1454da3 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -193,7 +193,7 @@ $help_url = ''; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-multicurrency'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback); diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index f02c475c627..502e22425f7 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -181,7 +181,7 @@ $notify = new Notify($db); llxHeader('', $langs->trans("NotificationSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-notification'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("NotificationSetup"), $linkback, 'title_setup'); @@ -195,7 +195,7 @@ print $langs->trans("NotificationsDescGlobal").' - '.$langs->trans("YouAreHere") print ''; print '
'; -print ''; +print ''; print ''; print ''; @@ -271,7 +271,7 @@ print '

'; // Emails templates for notification -print ''; +print ''; print ''; print ''; @@ -399,7 +399,7 @@ print ''; print '

'; -print '
'; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index f803fefb330..0903e2123a5 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -245,7 +245,7 @@ if ($action == 'delete') { } -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($title, $linkback, 'title_setup'); diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 58c11c9b214..75b260beebe 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -235,7 +235,7 @@ $help_url = 'EN:Module_OAuth|FR:Module_OAuth_FR|ES:Módulo_OAuth_ES'; llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-admin page-oauthlogintokens'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup'); diff --git a/htdocs/admin/openid_connect.php b/htdocs/admin/openid_connect.php index 97e0c64b86e..a54ba4ab521 100644 --- a/htdocs/admin/openid_connect.php +++ b/htdocs/admin/openid_connect.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -146,7 +146,7 @@ print ''; print dol_get_fiche_end(); -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/order.php b/htdocs/admin/order.php index 548e1bd9d33..8418b43e724 100644 --- a/htdocs/admin/order.php +++ b/htdocs/admin/order.php @@ -269,7 +269,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader("", $langs->trans("OrdersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-order'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("OrdersSetup"), $linkback, 'title_setup'); @@ -682,7 +682,7 @@ print ''; //Use draft Watermark -print '
'; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 872aa8d9406..feaba5590ef 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("Orders"); llxHeader('', $langs->trans("OrdersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-order_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("OrdersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 1569c661d81..636f2fd264d 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("Orders"); llxHeader('', $langs->trans("OrdersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-orderdet_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("OrdersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index a02c4f22f49..e02e2c89d58 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -119,7 +119,7 @@ llxHeader('', $langs->trans("BillsSetup"), 'EN:Invoice_Configuration|FR:Configur $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index e9db0c327a5..130e86902b5 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -153,7 +153,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', $langs->trans("CreditTransferSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-paymentbybanktransfer'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CreditTransferSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index ed2de3906b8..a83290d7004 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -8,7 +8,7 @@ * Copyright (C) 2024 MDW * Copyright (C) 2024 Nick Fragoulis * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -284,7 +284,7 @@ print "
\n"; $noCountryCode = empty($mysoc->country_code); -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index e131e43c259..69de68ff05d 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -6,7 +6,7 @@ * Copyright (C) 2019 Ferran Marcet * Copyright (C) 2021-2024 Anthony Berton * Copyright (C) 2022 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-205 Nick Fragoulis * * This program is free software; you can redistribute it and/or modify @@ -242,7 +242,7 @@ if (isset($conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) { } -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 67724e2f829..a5f88ef58dd 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -153,7 +153,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', $langs->trans("WithdrawalsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-prelevement'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("WithdrawalsSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index d2c2c11c62e..95bcc926150 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -251,7 +251,7 @@ llxHeader('', $langs->trans("PropalSetup"), '', '', 0, 0, '', '', '', 'mod-admin //if ($mesg) print $mesg; -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("PropalSetup"), $linkback, 'title_setup'); @@ -621,7 +621,7 @@ print '
'; print load_fiche_titre($langs->trans("OtherOptions"), '', ''); -print ''; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index d589d647fb2..b31e1b8e180 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -311,7 +311,7 @@ $form = new Form($db); llxHeader('', $langs->trans("ReceiptPrinterSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-receiptprinter'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ReceiptPrinterSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php index c20e63e6158..26103d779a9 100644 --- a/htdocs/admin/reception_extrafields.php +++ b/htdocs/admin/reception_extrafields.php @@ -77,7 +77,7 @@ $textobject = $langs->transnoentitiesnoconv("Receptions"); llxHeader('', $langs->trans("ReceptionsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-reception_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ReceptionsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 81358b715c4..400009c95b3 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -184,7 +184,7 @@ $form = new Form($db); llxHeader('', $langs->trans("ReceptionsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-reception_setup'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ReceptionsSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/receptiondet_batch_extrafields.php b/htdocs/admin/receptiondet_batch_extrafields.php index 8a02034e1f8..93864b69edd 100644 --- a/htdocs/admin/receptiondet_batch_extrafields.php +++ b/htdocs/admin/receptiondet_batch_extrafields.php @@ -81,7 +81,7 @@ $textobject = $langs->transnoentitiesnoconv("Receptions"); llxHeader('', $langs->trans("ReceptionsSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-receptiondet_batch_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ReceptionsSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/remotestore/class/externalModules.class.php b/htdocs/admin/remotestore/class/externalModules.class.php index 9d9190fd137..46f0b8c38f3 100644 --- a/htdocs/admin/remotestore/class/externalModules.class.php +++ b/htdocs/admin/remotestore/class/externalModules.class.php @@ -352,10 +352,13 @@ class ExternalModules 'lang' => $this->lang ]; + + $this->numberTotalOfProducts = 0; + // Fetch the products from Dolistore source + $dolistoreProducts = array(); $dolistoreProductsTotal = 0; - $this->numberTotalOfProducts = 0; if ($this->dolistoreApiStatus > 0 && getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_DOLISTORE')) { $getDolistoreProducts = $this->callApi('products', $data); @@ -370,6 +373,7 @@ class ExternalModules } // Fetch the products from the github repo + $fileProducts = array(); $fileProductsTotal = 0; if (!empty($this->githubFileStatus) && getDolGlobalInt('MAIN_ENABLE_EXTERNALMODULES_COMMUNITY')) { @@ -389,8 +393,22 @@ class ExternalModules // Number of pages $this->numberTotalOfPages = (int) ceil(max($fileProductsTotal / $this->per_page, $dolistoreProductsTotal / $this->per_page)); - // merge both sources - $this->products = array_values(array_merge($fileProducts, $dolistoreProducts)); + // Merge both sources (github community modules have priority on dolistore). + $this->products = $dolistoreProducts; + foreach ($fileProducts as $fileProduct) { + $id = $fileProduct['id']; + if ($id > 0) { + if (empty($this->products[$id])) { // Not already present in array + array_unshift($this->products, $fileProduct); + } else { + $this->products[$id] = $fileProduct; + $this->products[$id]['category'] = $fileProduct['category']; + } + } else { + array_unshift($this->products, $fileProduct); + } + } + $i = 0; foreach ($this->products as $product) { @@ -976,7 +994,15 @@ class ExternalModules continue; } + // Check if there is a known ID + $reg = array(); + $id = 0; + if (!empty($package['dolistore-download']) && preg_match('/www\.dolistore\.com\/product\.php\?id=(\d+)/', (string) $package['dolistore-download'], $reg)) { + $id = $reg[1]; + } + $adaptedPackage = [ + 'id' => $id, 'ref' => str_replace(' ', '', $package['modulename'] . '-' . $package['current_version'] . '@' . (array_key_exists('author', $package) ? $package['author'] : 'unkownauthor')), 'label' => !empty($package['label'][substr($this->lang, 0, 2)]) @@ -1065,7 +1091,7 @@ class ExternalModules 'status' => empty($package['status']) ? '' : $package['status'] ]; - $adaptedData[] = $adaptedPackage; + $adaptedData[$package['id']] = $adaptedPackage; } } diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 38528911358..968ad870b79 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -73,7 +73,7 @@ llxHeader('', $langs->trans('ResourceSetup'), '', '', 0, 0, '', '', '', 'mod-adm $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ResourceSetup'), $linkback, 'title_setup'); diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index 0258ad839cd..6d3b3806d82 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -75,7 +75,7 @@ $textobject = $langs->transnoentitiesnoconv("ResourceSingular"); llxHeader('', $langs->trans("ResourceSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-resource_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ResourceSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 35abc2e742d..59104ded74b 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -401,7 +401,7 @@ if (getDolGlobalString('USER_PASSWORD_GENERATED') == "Perso") { // Crypt passwords in database print '
'; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 10557ed64b8..92aa921b482 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -174,7 +174,7 @@ if (!count($listofmethods)) { } if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 33031fa358e..e9d44beb8a6 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -114,7 +114,7 @@ $help_url = ''; llxHeader('', $langs->trans("MailmanSpipSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-spip'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MailmanSpipSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 86a9400949f..05e6b651e53 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -216,7 +216,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', $langs->trans("StockSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-stock'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("StockSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index 6a9c2588fd9..dfdd53a07dd 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -3,7 +3,7 @@ * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2021 SuperAdmin * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -173,7 +173,7 @@ $page_name = "StockTransferSetup"; llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-stocktransfer'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'stock'); @@ -184,7 +184,7 @@ print dol_get_fiche_head($head, 'settings', '', -1, "stocktransfer@stocktransfer /*if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/subtotals.php b/htdocs/admin/subtotals.php index 5c464e4d02a..3d598573f9e 100644 --- a/htdocs/admin/subtotals.php +++ b/htdocs/admin/subtotals.php @@ -122,7 +122,7 @@ if ($action == 'update_colors') { llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-subtotals'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SubtotalSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index bf89c1ef132..c3a187e5abf 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -206,7 +206,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-supplier_invoice'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index d11730d9564..7cc64d32a77 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -223,7 +223,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-supplier_order'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index a7596440e7d..3d594c3073d 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -169,7 +169,7 @@ llxHeader('', $langs->trans("SupplierPaymentSetup"), 'EN:Supplier_Payment_Config $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index cbc814bb763..ecf42187f22 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -240,7 +240,7 @@ llxHeader('', $langs->trans("SupplierProposalSetup"), '', '', 0, 0, '', '', '', $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SupplierProposalSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 4bcf68e18b1..8d9805bf171 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -75,7 +75,7 @@ $textobject = $langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierinvoice_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/supplierinvoice_rec_extrafields.php b/htdocs/admin/supplierinvoice_rec_extrafields.php index 4ce20d8b9b2..a6d40829bbb 100644 --- a/htdocs/admin/supplierinvoice_rec_extrafields.php +++ b/htdocs/admin/supplierinvoice_rec_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierinvoice_rec_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 6f948baab91..8bbc44518e8 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierinvoicedet_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/supplierinvoicedet_rec_extrafields.php b/htdocs/admin/supplierinvoicedet_rec_extrafields.php index e0d551f52b1..697b13a43d5 100644 --- a/htdocs/admin/supplierinvoicedet_rec_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_rec_extrafields.php @@ -79,7 +79,7 @@ $textobject = $langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierinvoicedet_rec_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index ba0072feb9c..d26d5e97a9f 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("SuppliersOrders"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierorder_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 22901c10505..e9a03e6c53f 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("SuppliersOrders"); llxHeader('', $langs->trans("SuppliersSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplierorderdet_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'); print "
\n"; diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 736a1605ea0..7e8d7da76d4 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -184,7 +184,7 @@ llxHeader('', $langs->trans("SyslogSetup"), '', '', 0, 0, '', '', '', 'mod-admin $form = new Form($db); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("SyslogSetup"), $linkback, 'title_setup'); print '
'; diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 1c6949f2510..155cc012b4c 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2020 Laurent Destailleur * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2007-2012 Regis Houssin - * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015-2025 Frédéric France * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2024-2025 MDW * @@ -128,7 +128,7 @@ if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || getDolGlobalString('MAIN_ALLO } $enableremotecheck = true; -print ''; +print ''; print ''; print $langs->trans("MakeIntegrityAnalysisFrom").':
'; diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index a14671a8443..978d9ac59a8 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -4,8 +4,8 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 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 @@ -104,14 +104,10 @@ if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) { print ''; print ''; -$ErrorPicturePath = "../../theme/eldy/img/error.png"; -$WarningPicturePath = "../../theme/eldy/img/warning.png"; -$OkayPicturePath = "../../theme/eldy/img/tick.png"; - print ''; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index bbee27e4be4..49b41a10597 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -176,7 +176,9 @@ class Categorie extends CommonObject 'order' => 'Commande', 'invoice' => 'Facture', 'supplier_order' => 'CommandeFournisseur', - 'supplier_invoice' => 'FactureFournisseur' + 'supplier_invoice' => 'FactureFournisseur', + 'supplier_proposal' => 'SupplierProposal', + 'propal' => 'Propal', ); /** @@ -202,7 +204,9 @@ class Categorie extends CommonObject 'order' => 'Orders', 'invoice' => 'Invoices', 'supplier_order' => 'SuppliersOrders', - 'supplier_invoice' => 'SuppliersInvoices' + 'supplier_invoice' => 'SuppliersInvoices', + 'propal' => 'Proposals', + 'supplier_proposal' => 'SupplierProposals', ); /** @@ -1892,7 +1896,7 @@ class Categorie extends CommonObject $linkclose = ''; if (empty($notooltip)) { if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { - $label = $langs->trans("ShowMyObject"); + $label = $langs->trans("ShowCategory"); $linkclose .= ' alt="'.dolPrintHTMLForAttribute($label).'"'; } $linkclose .= ($label ? ' title="'.dolPrintHTMLForAttribute($label).'"' : ' title="tocomplete"'); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 86694d7937e..f22cd884e46 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -5,7 +5,7 @@ * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024 MDW * Copyright (C) 2025 Alexandre Spangaro * @@ -31,10 +31,6 @@ // Load Dolibarr environment require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - /** * @var Conf $conf * @var DoliDB $db @@ -43,8 +39,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; * @var User $user */ +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + // Load translation files required by the page -$langs->loadLangs(array("accountancy", "agenda", "banks", "bills", "categories", "contracts", "interventions")); +$langs->loadLangs(array("accountancy", "agenda", "banks", "bills", "categories", "contracts", "interventions", "propal", "supplier_proposal")); $langs->loadLangs(array("knowledgemanagement", "members", "orders", "products", "stocks", "suppliers", "tickets", "website")); $mode = GETPOST('mode', 'aZ09'); @@ -165,11 +165,11 @@ foreach ($arrayofcateg as $idtype => $val) { print ''; - print ''; + print ''; print ''; } -print "
'.$langs->trans("Parameter").'
'.$langs->trans("Version").''; -$arrayphpminversionerror = array(5, 5, 0); -$arrayphpminversionwarning = array(5, 6, 0); +$arrayphpminversionerror = array(7, 1, 0); +$arrayphpminversionwarning = array(7, 1, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 5f29b96afb4..f43abe596a7 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -1,7 +1,7 @@ * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -805,7 +805,7 @@ $exampletodecrypt = GETPOST('exampletodecrypt', 'password'); print ''.$langs->trans("AlgorithmFor", $langs->transnoentitiesnoconv("SensitiveData")); print $form->textwithpicto('', 'reversible encryption done with dolEncrypt/dolDecrypt'); print ' = '.constant('MAIN_SECURITY_REVERSIBLE_ALGO').' with key defined into conf.php file in $dolibarr_main_dolcrypt_key (or $dolibarr_main_instance_unique_id)
'; -print ''; +print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 7bf6712fd9d..ac60811ac98 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -166,7 +166,7 @@ if (isModEnabled('accounting')) { $formaccounting = new FormAccounting($db); } -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('TaxSetup'), $linkback, 'title_setup'); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 2f19c6dc80f..82ca2853d83 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -275,7 +275,7 @@ $page_name = 'TicketSetup'; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-ticket'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php index 47da53203d0..5cfba7fd924 100644 --- a/htdocs/admin/ticket_extrafields.php +++ b/htdocs/admin/ticket_extrafields.php @@ -72,7 +72,7 @@ $help_url = "FR:Module_Ticket"; $page_name = "TicketSetup"; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-ticket_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("TicketSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index f1da6b05509..f3b6ec38fe1 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -230,7 +230,7 @@ $page_name = "TicketSetup"; llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-admin page-ticket_public'); // Subheader -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 13569e10eaa..a4d470bfe3f 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2023 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Bahfir Abbes - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -342,7 +342,7 @@ if ($result) { $center = ''.$langs->trans("Purge").''; } - print ''; + print ''; print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 525198416fe..cf53a892b1f 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -140,7 +140,7 @@ dol_mkdir(DOL_DATA_ROOT.'/doctemplates/usergroups'); $help_url = 'EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios'; llxHeader('', $langs->trans("UsersSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-user'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("UsersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index 15621f60325..ab7ed5a7386 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -112,7 +112,7 @@ if ($action == 'set_default') { $help_url = 'EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios'; llxHeader('', $langs->trans("UsersSetup"), $help_url, '', 0, 0, '', '', '', 'mod-admin page-usergroup'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("UsersSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 814884e2f97..0c568e70c99 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -257,7 +257,7 @@ if ($action == 'setvarworkflow') { // Test on permission already done llxHeader('', $langs->trans("WorkflowSetup"), "EN:Module_Workflow_En|FR:Module_Workflow|ES:Módulo_Workflow", '', 0, 0, '', '', '', 'mod-admin page-workflow'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("WorkflowSetup"), $linkback, 'title_setup'); diff --git a/htdocs/admin/workstation_extrafields.php b/htdocs/admin/workstation_extrafields.php index c05423c18c0..193bd173afc 100644 --- a/htdocs/admin/workstation_extrafields.php +++ b/htdocs/admin/workstation_extrafields.php @@ -79,7 +79,7 @@ $page_name = "WorkstationSetup"; llxHeader('', $langs->trans("WorkstationSetup"), $help_url, '', 0, 0, '', '', '', 'mod-workstation page-admin_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 3dff437b8be..017874a088d 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -5,7 +5,7 @@ * Copyright (C) 2012-2018 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -113,14 +113,14 @@ dol_mkdir(DOL_DATA_ROOT.'/api/temp'); // May have been deleted by a purge llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-api page-admin-index'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ApiSetup"), $linkback, 'title_setup'); print ''.$langs->trans("ApiDesc")."
\n"; print "
\n"; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/asset/admin/asset_extrafields.php b/htdocs/asset/admin/asset_extrafields.php index bb336e43fdc..dfec16bfb66 100644 --- a/htdocs/asset/admin/asset_extrafields.php +++ b/htdocs/asset/admin/asset_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv("Assets"); llxHeader('', $langs->trans("AssetSetup"), $help_url); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/asset/admin/assetmodel_extrafields.php b/htdocs/asset/admin/assetmodel_extrafields.php index b6f5c759e1b..24ea12ec29f 100644 --- a/htdocs/asset/admin/assetmodel_extrafields.php +++ b/htdocs/asset/admin/assetmodel_extrafields.php @@ -78,7 +78,7 @@ $textobject = $langs->transnoentitiesnoconv("AssetModels"); llxHeader('', $langs->trans("AssetSetup"), $help_url); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 1ca21cbfffb..0dc37661fad 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2018-2024 Alexandre Spangaro * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -469,7 +469,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { } if ($action == 'edit') { - print ''; + print ''; print ''; print ''; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index e611f09628b..39fe2f99db5 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2018-2025 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -188,7 +188,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-asset page-card'); if ($action == 'create') { print load_fiche_titre($langs->trans("NewAsset"), '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; if ($backtopage) { @@ -228,7 +228,7 @@ if ($action == 'create') { if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("Asset"), '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; print ''; @@ -324,7 +324,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated), array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat), ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1, 350); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1, 350); } // Confirmation of reopen diff --git a/htdocs/asset/model/card.php b/htdocs/asset/model/card.php index 63cf541f6a4..9a13bc43fce 100644 --- a/htdocs/asset/model/card.php +++ b/htdocs/asset/model/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -270,12 +270,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAssetModel'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('DeleteAssetModel'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); } elseif ($action == 'clone') { // Clone confirmation // Create an array for form $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Call Hook formConfirm diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 2e678931cd2..266b8579142 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2017-2018 Laurent Destailleur - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Alexandre Spangaro * @@ -479,7 +479,7 @@ print '
'; print ''; -print '
'; +print ''; if ($optioncss != '') { print ''; diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index bd4f2135d1c..cf57851314c 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -169,7 +169,7 @@ if ($object->id > 0) { $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($user->hasRight('bom', 'creer')) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index c7f25128c38..92a70caca1a 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -331,7 +331,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bom page-card'); if ($action == 'create') { print load_fiche_titre($langs->trans("NewBOM"), '', 'bom'); - print ''; + print ''; print ''; print ''; print ''; @@ -359,7 +359,7 @@ if ($action == 'create') { if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("BillOfMaterials"), '', 'cubes'); - print ''; + print ''; print ''; print ''; print ''; @@ -531,7 +531,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($permissiontoadd) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index f6cbfa46a67..8f2e49d4c3d 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1439,7 +1439,7 @@ class BOM extends CommonObject return -1; } - $line->total_cost = (float) price2num($line->unit_cost * $line->qty / $line->efficiency, 'MT'); + $line->total_cost = (float) $line->unit_cost * $line->qty / $line->efficiency; $this->total_cost += $line->total_cost; } else { @@ -1448,7 +1448,7 @@ class BOM extends CommonObject if ($res > 0) { $bom_child->calculateCosts(); $line->childBom[] = $bom_child; - $line->total_cost = (float) price2num($bom_child->unit_cost * $line->qty / $line->efficiency, 'MT'); + $line->total_cost = (float) $bom_child->unit_cost * $line->qty / $line->efficiency; $this->total_cost += $line->total_cost; } else { $this->error = $bom_child->error; @@ -1469,7 +1469,7 @@ class BOM extends CommonObject $res = $workstation->fetch($line->fk_default_workstation); if ($res > 0) { - $line->total_cost = (float) price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT'); + $line->total_cost = (float) $qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated); } else { $this->error = $workstation->error; return -3; @@ -1483,9 +1483,9 @@ class BOM extends CommonObject } if ($qtyhourservice) { - $line->total_cost = (float) price2num($qtyhourforline / $qtyhourservice * $line->unit_cost, 'MT'); + $line->total_cost = (float) $qtyhourforline / $qtyhourservice * $line->unit_cost; } else { - $line->total_cost = (float) price2num($line->qty * $line->unit_cost, 'MT'); + $line->total_cost = (float) $line->qty * $line->unit_cost; } } diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index c545b286723..91ba3d8b291 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2019-2023 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software: you can redistribute it and/or modify @@ -42,12 +42,12 @@ function bomAdminPrepareHead() $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/admin/bom.php"; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/bom.php"); $head[$h][1] = $langs->trans("Settings"); $head[$h][2] = 'settings'; $h++; - $head[$h][0] = DOL_URL_ROOT."/admin/bom_extrafields.php"; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/bom_extrafields.php"); $head[$h][1] = $langs->trans("ExtraFields"); $nbExtrafields = (isset($extrafields->attributes['bom_bom']['label']) && is_countable($extrafields->attributes['bom_bom']['label'])) ? count($extrafields->attributes['bom_bom']['label']) : 0; if ($nbExtrafields > 0) { @@ -56,7 +56,7 @@ function bomAdminPrepareHead() $head[$h][2] = 'bom_extrafields'; $h++; - $head[$h][0] = DOL_URL_ROOT."/admin/bomline_extrafields.php"; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/bomline_extrafields.php"); $head[$h][1] = $langs->trans("ExtraFieldsLines"); $nbExtrafields = (isset($extrafields->attributes['bom_bomline']['label']) && is_countable($extrafields->attributes['bom_bomline']['label'])) ? count($extrafields->attributes['bom_bomline']['label']) : 0; if ($nbExtrafields > 0) { @@ -98,12 +98,12 @@ function bomPrepareHead($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/bom/bom_card.php?id=".$object->id; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/bom/bom_card.php', ['id' => $object->id]); $head[$h][1] = $langs->trans("BOM"); $head[$h][2] = 'card'; $h++; - $head[$h][0] = DOL_URL_ROOT."/bom/bom_net_needs.php?id=".$object->id; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/bom/bom_net_needs.php', ['id' => $object->id]); $head[$h][1] = $langs->trans("BOMNetNeeds"); $head[$h][2] = 'net_needs'; $h++; @@ -116,7 +116,7 @@ function bomPrepareHead($object) if (!empty($object->note_public)) { $nbNote++; } - $head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/bom/bom_note.php', ['id' => $object->id]); $head[$h][1] = $langs->trans('Notes'); if ($nbNote > 0) { $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ''.$nbNote.'' : ''); @@ -130,7 +130,7 @@ function bomPrepareHead($object) $upload_dir = getMultidirOutput($object) . "/".dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/bom/bom_document.php', ['id' => $object->id]); $head[$h][1] = $langs->trans('Documents'); if (($nbFiles + $nbLinks) > 0) { $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? ''.($nbFiles + $nbLinks).'' : ''); @@ -138,7 +138,7 @@ function bomPrepareHead($object) $head[$h][2] = 'document'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/bom/bom_agenda.php?id='.$object->id; + $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/bom/bom_agenda.php', ['id' => $object->id]); $head[$h][1] = $langs->trans("Events"); $head[$h][2] = 'agenda'; $h++; diff --git a/htdocs/bookcal/admin/availabilities_extrafields.php b/htdocs/bookcal/admin/availabilities_extrafields.php index f9b18492677..93098c3c6ae 100644 --- a/htdocs/bookcal/admin/availabilities_extrafields.php +++ b/htdocs/bookcal/admin/availabilities_extrafields.php @@ -79,7 +79,7 @@ $page_name = "BookCalSetup"; llxHeader('', $langs->trans("BookCalSetup"), $help_url, '', 0, 0, '', '', '', 'mod-bookcal page-admin_availabilities_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/bookcal/admin/calendar_extrafields.php b/htdocs/bookcal/admin/calendar_extrafields.php index e6e47af2317..e9a13f4c31b 100644 --- a/htdocs/bookcal/admin/calendar_extrafields.php +++ b/htdocs/bookcal/admin/calendar_extrafields.php @@ -80,7 +80,7 @@ $page_name = "BookCalSetup"; llxHeader('', $langs->trans("BookCalSetup"), $help_url, '', 0, 0, '', '', '', 'mod-bookcal page-admin_calender_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); diff --git a/htdocs/bookcal/availabilities_agenda.php b/htdocs/bookcal/availabilities_agenda.php index 6cccf182dad..5153ae694ae 100644 --- a/htdocs/bookcal/availabilities_agenda.php +++ b/htdocs/bookcal/availabilities_agenda.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -170,7 +170,7 @@ if ($object->id > 0) { $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($permissiontoadd) { if ($action != 'classify') { - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } $morehtmlref.=' : '; if ($action == 'classify') { diff --git a/htdocs/bookcal/availabilities_card.php b/htdocs/bookcal/availabilities_card.php index a8f017a7bdc..1faef7f96c9 100644 --- a/htdocs/bookcal/availabilities_card.php +++ b/htdocs/bookcal/availabilities_card.php @@ -238,7 +238,7 @@ if ($action == 'create') { } print load_fiche_titre($langs->trans("NewAvailabilities"), '', 'object_'.$object->picto); - print ''; + print ''; print ''; if ($error != 0) { print ''; @@ -277,7 +277,7 @@ if ($action == 'create') { if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("Availabilities"), '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/bookcal/availabilities_contact.php b/htdocs/bookcal/availabilities_contact.php index e8b7f950112..5f6ea80136c 100644 --- a/htdocs/bookcal/availabilities_contact.php +++ b/htdocs/bookcal/availabilities_contact.php @@ -155,7 +155,7 @@ if ($object->id) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bookcal/availabilities_document.php b/htdocs/bookcal/availabilities_document.php index 704484bf280..11d070e4f01 100644 --- a/htdocs/bookcal/availabilities_document.php +++ b/htdocs/bookcal/availabilities_document.php @@ -153,7 +153,7 @@ if ($object->id && $upload_dir !== null) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bookcal/availabilities_note.php b/htdocs/bookcal/availabilities_note.php index 713e5607a8e..c3331f295bd 100644 --- a/htdocs/bookcal/availabilities_note.php +++ b/htdocs/bookcal/availabilities_note.php @@ -127,7 +127,7 @@ if ($id > 0 || !empty($ref)) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bookcal/calendar_agenda.php b/htdocs/bookcal/calendar_agenda.php index 4a1c8bdd521..9a44ea9a5d1 100644 --- a/htdocs/bookcal/calendar_agenda.php +++ b/htdocs/bookcal/calendar_agenda.php @@ -1,7 +1,7 @@ * Copyright (C) 2023 Alice Adminson - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -179,7 +179,7 @@ if ($object->id > 0) { $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($permissiontoadd) { if ($action != 'classify') { - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } $morehtmlref.=' : '; if ($action == 'classify') { diff --git a/htdocs/bookcal/calendar_card.php b/htdocs/bookcal/calendar_card.php index 958fb64c9e9..ae47031901b 100644 --- a/htdocs/bookcal/calendar_card.php +++ b/htdocs/bookcal/calendar_card.php @@ -1,7 +1,7 @@ * Copyright (C) 2023 Alice Adminson - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -214,7 +214,7 @@ if ($action == 'create') { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Calendar")), '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; if ($backtopage) { @@ -253,7 +253,7 @@ if ($action == 'create') { if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("Calendar"), '', 'object_'.$object->picto); - print ''; + print ''; print ''; print ''; print ''; @@ -341,7 +341,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($permissiontoadd) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/bookcal/calendar_contact.php b/htdocs/bookcal/calendar_contact.php index b67a8c07d45..c314c71778e 100644 --- a/htdocs/bookcal/calendar_contact.php +++ b/htdocs/bookcal/calendar_contact.php @@ -164,7 +164,7 @@ if ($object->id) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bookcal/calendar_document.php b/htdocs/bookcal/calendar_document.php index 73bb20e33b2..59f8e2c45a6 100644 --- a/htdocs/bookcal/calendar_document.php +++ b/htdocs/bookcal/calendar_document.php @@ -147,42 +147,6 @@ if ($object->id && $upload_dir !== null) { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; - /* - // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); - // Project - if (isModEnabled('project')) { - $langs->load("projects"); - $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $morehtmlref.=' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ': '.$proj->getNomUrl(); - } else { - $morehtmlref .= ''; - } - } - }*/ $morehtmlref .= '
'; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/bookcal/calendar_note.php b/htdocs/bookcal/calendar_note.php index c3c7dcabdc8..8883631c69c 100644 --- a/htdocs/bookcal/calendar_note.php +++ b/htdocs/bookcal/calendar_note.php @@ -130,7 +130,7 @@ if ($id > 0 || !empty($ref)) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 752e8ea3806..b57cc2325f1 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2011-2012 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -73,13 +73,13 @@ if ($action == 'setvalue') { llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-bookmarks page-admin_bookmark'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BookmarkSetup"), $linkback, 'title_setup'); print $langs->trans("BookmarkDesc")."
\n"; print '
'; -print '
'; +print ''; print ''; print ''; diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 7561c83d351..9b6bcda99ce 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -77,11 +77,11 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { */ $help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|DE:Modul_Kategorien'; -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; llxHeader('', $langs->trans("Categories"), $help_url); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CategoriesSetup"), $linkback, 'title_setup'); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 764fd9e1249..f730c09dc1d 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -73,7 +73,7 @@ $help_url = 'EN:Module Categories|FR:Module Catégories|ES:Módulo Categorías|D llxHeader('', $langs->trans("Categories"), $help_url); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CategoriesSetup"), $linkback, 'title_setup'); $head = categoriesadmin_prepare_head(); diff --git a/htdocs/categories/categorie_list.php b/htdocs/categories/categorie_list.php index 3bd2c48f342..0bfb015485a 100644 --- a/htdocs/categories/categorie_list.php +++ b/htdocs/categories/categorie_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -448,7 +448,10 @@ if ($mode == 'hierarchy') { if (empty($conf->main_checkbox_left_column)) { $entry .= '
'; if ($user->hasRight('categorie', 'creer')) { - $entry .= '' . img_edit() . ''; + $query = []; + parse_str($param, $query); + $query = array_merge($query, ['id' => $val['id'], 'backtopage' => (dolBuildUrl($_SERVER["PHP_SELF"], ['type' => $type]).$param)]); + $entry .= '' . img_edit() . ''; } $entry .= ''; print $arrayofcateg[$idtype]['nb']; print ''.img_picto('', 'edit').''.img_picto('', 'edit').'
"; +print "\n"; print '
'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 6e75a7bbb05..f131b1ae805 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -8,7 +8,7 @@ * Copyright (C) 2020 Josep Lluís Amador * Copyright (C) 2022-2023 Solution Libre SAS * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 Alexandre Spangaro * Copyright (C) 2023-2024 Charlene Benke * @@ -207,7 +207,7 @@ if ($user->hasRight('categorie', 'supprimer') && $action == 'confirm_delete' && header("Location: ".$backtopage); exit; } else { - header("Location: ".DOL_URL_ROOT.'/categories/categorie_list.php?type='.$type); + header("Location: ".dolBuildUrl(DOL_URL_ROOT.'/categories/categorie_list.php', ['type' => $type])); exit; } } else { @@ -387,12 +387,12 @@ if ($reshook < 0) { } if (empty($reshook)) { if ($user->hasRight('categorie', 'creer')) { - $socid = ($object->socid ? "&socid=".$object->socid : ""); - print ''.$langs->trans("Modify").''; + $socid = ($object->socid ? $object->socid : ""); + print ''.$langs->trans("Modify").''; } if ($user->hasRight('categorie', 'supprimer')) { - print 'id.'&type='.urlencode($type).'&backtolist='.urlencode($backtolist).'">'.$langs->trans("Delete").''; + print ' 'delete', 'id' => $object->id, 'type' => $type, 'backtolist' => $backtolist], true).'">'.$langs->trans("Delete").''; } } @@ -400,11 +400,7 @@ print "
"; $newcardbutton = ''; if ($user->hasRight('categorie', 'creer')) { - $link = DOL_URL_ROOT.'/categories/card.php'; - $link .= '?action=create'; - $link .= '&type='.urlencode($type); - $link .= '&catorigin='.((int) $object->id); - $link .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.'&id='.$id); + $link = dolBuildUrl(DOL_URL_ROOT.'/categories/card.php', ['action'=> 'create', 'type' => $type, 'catorigin' => $object->id, 'backtopage' => dolBuildUrl($_SERVER["PHP_SELF"], ['type' => $type, 'id' => $id])]); $newcardbutton = '
'; $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', $link); @@ -573,7 +569,7 @@ if ($type == Categorie::TYPE_PRODUCT) { /** @var Product[] $prods */ '@phan-var-force Product[] $prods'; // Form to add record into the category - print ''; + print ''; print ''; print ''; print ''; @@ -653,7 +649,7 @@ if ($type == Categorie::TYPE_CUSTOMER) { /** @var Societe[] $socs */ '@phan-var-force Societe[] $socs'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -734,7 +730,7 @@ if ($type == Categorie::TYPE_SUPPLIER) { /** @var Fournisseur[] $socs */ '@phan-var-force Fournisseur[] $socs'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -817,7 +813,7 @@ if ($type == Categorie::TYPE_MEMBER) { /** @var Adherent[] $members */ '@phan-var-force Adherent[] $members'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -899,7 +895,7 @@ if ($type == Categorie::TYPE_CONTACT) { /** @var Contact[] $contacts */ '@phan-var-force Contact[] $contacts'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -987,7 +983,7 @@ if ($type == Categorie::TYPE_ACCOUNT) { /** @var Account[] $accounts */ '@phan-var-force Account[] $accounts'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -1070,7 +1066,7 @@ if ($type == Categorie::TYPE_PROJECT) { /** @var Project $object */ '@phan-var-force Project $object'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -1150,7 +1146,7 @@ if ($type == Categorie::TYPE_USER) { /** @var User[] $users */ '@phan-var-force User[] $users'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -1228,7 +1224,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) { } else { /** @var Entrepot[] $objects */ '@phan-var-force Entrepot[] $objects'; - print ''; + print ''; print ''; print ''; print ''; @@ -1299,7 +1295,7 @@ if ($type == Categorie::TYPE_TICKET) { /** @var Ticket[] $tickets */ '@phan-var-force Ticket[] $tickets'; // Form to add record into a category - print ''; + print ''; print ''; print ''; print ''; @@ -1382,7 +1378,7 @@ if ($type == Categorie::TYPE_FICHINTER) { $formfichinter = new FormIntervention($db); print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -1398,7 +1394,7 @@ if ($type == Categorie::TYPE_FICHINTER) { print ''; } - print '
'; + print ''; print ''; print ''; print ''; @@ -1467,7 +1463,7 @@ if ($type == Categorie::TYPE_ORDER) { $showclassifyform = $user->hasRight('order', 'write'); if ($showclassifyform) { print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -1483,7 +1479,7 @@ if ($type == Categorie::TYPE_ORDER) { print '
'; } - print '
'; + print ''; print ''; print ''; print ''; @@ -1548,7 +1544,7 @@ if ($type == Categorie::TYPE_INVOICE) { $showclassifyform = $user->hasRight('facture', 'write'); if ($showclassifyform) { print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -1564,7 +1560,7 @@ if ($type == Categorie::TYPE_INVOICE) { print '
'; } - print '
'; + print ''; print ''; print ''; print ''; @@ -1630,7 +1626,7 @@ if ($type == Categorie::TYPE_SUPPLIER_ORDER) { ; if ($showclassifyform) { print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -1646,7 +1642,7 @@ if ($type == Categorie::TYPE_SUPPLIER_ORDER) { print '
'; } - print '
'; + print ''; print ''; print ''; print ''; @@ -1711,7 +1707,7 @@ if ($type == Categorie::TYPE_SUPPLIER_INVOICE) { $showclassifyform = $user->hasRight('fournisseur', 'facture', 'creer');; if ($showclassifyform) { print '
'; - print ''; + print ''; print ''; print ''; print ''; @@ -1727,7 +1723,7 @@ if ($type == Categorie::TYPE_SUPPLIER_INVOICE) { print '
'; } - print '
'; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index ef33d404774..ed271a7a30f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -2605,7 +2605,7 @@ if ($id > 0 && $action != 'create') { if ($usercancreate) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index b8104639c7f..0f9c8afd648 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1850,13 +1850,13 @@ class ActionComm extends CommonObject $linkclose .= ' class="'.$morecss.'"'; } - $url = ''; + $query = ['id' => $this->id]; if ($option == 'birthday') { - $url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id; + $baseurl = DOL_URL_ROOT.'/contact/perso.php'; } elseif ($option == 'holiday') { - $url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id; + $baseurl = DOL_URL_ROOT.'/holiday/card.php'; } else { - $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id; + $baseurl = DOL_URL_ROOT.'/comm/action/card.php'; } if ($option !== 'nolink') { @@ -1866,9 +1866,10 @@ class ActionComm extends CommonObject $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { - $url .= '&save_lastsearch_values=1'; + $query += ['save_lastsearch_values' => 1]; } } + $url = dolBuildUrl($baseurl, $query); $linkstart = ''; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 869644dc8a2..1ea2bf4e892 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -206,7 +206,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index f7b3098126c..d1b23884942 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2023 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -130,7 +130,7 @@ if (isModEnabled('project')) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 2d6f8211ecc..0fe6c736d53 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -126,7 +126,7 @@ if ($resql) { $param .= '&limit='.$limit; } - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index 9cb88a7fce8..acc54325a48 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -72,7 +72,7 @@ $textobject = $langs->transnoentitiesnoconv("Proposals"); llxHeader('', $langs->trans("PropalSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("PropalSetup"), $linkback, 'title_setup'); diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 3479441c7eb..5f939d6edce 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -76,7 +76,7 @@ $textobject = $langs->transnoentitiesnoconv("Proposals"); llxHeader('', $langs->trans("PropalSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("PropalSetup"), $linkback, 'title_setup'); $head = propal_admin_prepare_head(); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 19ac7e15d38..062fb7e68da 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -1264,7 +1264,7 @@ if (isModEnabled('order') && $user->hasRight('commande', 'lire') && is_object($o if ($resql) { $total = $total_ttc = 0; $num = $db->num_rows($resql); - $nbofloop = min($num, (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop = min($num, getDolGlobalString('MAIN_MAXLIST_OVERLOAD', 500)); startSimpleTable("OrdersOpened", "commande/list.php", "search_status=".Commande::STATUS_VALIDATED, 4, $num); if ($num > 0) { diff --git a/htdocs/comm/mailing/note.php b/htdocs/comm/mailing/note.php index 534e128d643..1446b646e6c 100644 --- a/htdocs/comm/mailing/note.php +++ b/htdocs/comm/mailing/note.php @@ -121,7 +121,7 @@ if ($id > 0 || !empty($ref)) { if ($permissiontoadd) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/comm/mailing/targetemailing.php b/htdocs/comm/mailing/targetemailing.php index 12f3c94f836..aed869d83f2 100644 --- a/htdocs/comm/mailing/targetemailing.php +++ b/htdocs/comm/mailing/targetemailing.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2014 Florian Henry * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -759,7 +759,7 @@ if ($object->fetch($id) >= 0) { $param .= "&search_other=".urlencode($search_other); } - print ''; + print ''; print ''; print ''; print ''; @@ -783,7 +783,7 @@ if ($object->fetch($id) >= 0) { print ''; print "\n\n"; - print '
'; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/propal/agenda.php b/htdocs/comm/propal/agenda.php index fb39a439b96..51f7a9d5031 100644 --- a/htdocs/comm/propal/agenda.php +++ b/htdocs/comm/propal/agenda.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -154,8 +154,8 @@ if ($object->id > 0) { $morehtmlref = '
'; // Ref customer - $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '
' . $object->thirdparty->getNomUrl(1); // Project @@ -165,7 +165,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { @@ -201,20 +201,26 @@ if ($object->id > 0) { $objthirdparty = $object; $objcon = new stdClass(); - $out = '&origin=' . urlencode((string) ($object->element . (property_exists($object, 'module') ? '@' . $object->module : ''))) . '&originid=' . urlencode((string) ($object->id)); - $urlbacktopage = $_SERVER['PHP_SELF'] . '?id=' . $object->id; - $out .= '&backtopage=' . urlencode($urlbacktopage); + $query = [ + 'action' => 'create', + 'origin' => ($object->element . (property_exists($object, 'module') && !empty($object->module) ? '@' . $object->module : '')), + 'originid' => $object->id, + 'backtopage' => dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id]), + ]; $permok = $user->hasRight('agenda', 'myactions', 'create'); if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='trans("AddAnAction"),'filenew'); //$out.=""; } + $url = dolBuildUrl(DOL_URL_ROOT . '/comm/action/card.php', $query); $morehtmlright = ''; @@ -224,27 +230,24 @@ if ($object->id > 0) { //$messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; //$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); - $messagingUrl = DOL_URL_ROOT . '/comm/propal/messaging.php?id=' . $object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/messaging.php', ['id' => $object->id]); $morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); - $messagingUrl = DOL_URL_ROOT . '/comm/propal/agenda.php?id=' . $object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/agenda.php', ['id' => $object->id]); $morehtmlright .= 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); + $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url); } else { - $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT . '/comm/action/card.php?action=create' . $out, '', 0); + $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, '', 0); } } - if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { print '
'; - - $param = '&id=' . $object->id . (!empty($socid) ? '&socid=' . $socid : ''); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage=' . urlencode($contextpage); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 6f779fe34f3..0c20c81f150 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2736,7 +2736,7 @@ if ($action == 'create') { $formquestion[] = array('type' => 'date', 'name' => 'date_delivery', 'label' => $langs->trans("DeliveryDate"), 'value' => $object->delivery_date); } // Incomplete payment. We ask if reason = discount or other - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600); } // Subtotal line form @@ -2902,19 +2902,19 @@ if ($action == 'create') { } if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); } else { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); } } elseif ($action == 'cancel') { // Confirm cancel - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1); } elseif ($action == 'delete') { // Confirm delete - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } elseif ($action == 'reopen') { // Confirm reopen - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } elseif ($action == 'ask_deleteline') { // Confirmation delete product/service line $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); @@ -2974,7 +2974,7 @@ if ($action == 'create') { } if (!$error) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240); } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 05a6ed2c135..c2af9bc7d12 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2102,6 +2102,11 @@ class Propal extends CommonObject return -1; } + if (!getDolGlobalBool('PROPALE_NOCHECK_ONSALE_PRODUCTS_ONVALID') && !$this->checkActiveProductInLines()) { + dol_syslog(get_class($this)."::valid checkActiveProductInLines ".$this->error, LOG_INFO); + return -1; + } + $now = dol_now(); $this->db->begin(); @@ -3582,9 +3587,10 @@ class Propal extends CommonObject * Used to build previews or test instances. * id must be 0 if object instance is a specimen. * + * @param array $param Array of options * @return int */ - public function initAsSpecimen() + public function initAsSpecimen($param = array()) { global $conf, $langs; @@ -3594,6 +3600,9 @@ class Propal extends CommonObject $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + if (array_key_exists('tosell', $param)) { + $sql .= " AND tosell = ".((int) $param['tosell']); + } $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); @@ -3610,6 +3619,7 @@ class Propal extends CommonObject // Initialise parameters $this->id = 0; $this->ref = 'SPECIMEN'; + $this->ref_customer = 'NEMICEPS'; $this->ref_client = 'NEMICEPS'; $this->specimen = 1; $this->socid = 1; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index a173c70b23b..bee8a91c9f5 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -169,7 +169,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 7ee0af21e10..0bc7f7f9c5b 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -150,7 +150,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index d2d63a32ba0..1d3bc091b1c 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -115,7 +115,7 @@ if (isModEnabled("propal")) { $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - $nbofloop = min($num, (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop = min($num, getDolGlobalString('MAIN_MAXLIST_OVERLOAD', 500)); startSimpleTable("DraftPropals", "comm/propal/list.php", "search_status=".Propal::STATUS_DRAFT, 2, $num); $total = 0; @@ -295,7 +295,7 @@ if (isModEnabled("propal") && $user->hasRight('propal', 'lire')) { if ($resql) { $total = 0; $num = $db->num_rows($resql); - $nbofloop = min($num, (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop = min($num, getDolGlobalString('MAIN_MAXLIST_OVERLOAD', 500)); startSimpleTable("ProposalsOpened", "comm/propal/list.php", "search_status=".Propal::STATUS_VALIDATED, 4, $num); if ($num > 0) { diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 5f1a4d12c8e..b71688ae289 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1191,7 +1191,7 @@ $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('propal', 'creer')); // Fields title search -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 8f866464472..881731f4761 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -128,7 +128,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 679e0d149b9..0b88546e524 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -6,7 +6,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2020 Maxime DEMAREST * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -284,7 +284,7 @@ print '
'; // Show filter box -print ''; +print ''; print ''; print ''; diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 11accaf3601..ae73891a1bd 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -63,8 +63,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) { print ''; print ''.$langs->trans("Proposal"); if (!empty($showImportButton) && getDolGlobalInt('MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES')) { - $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; - print ' '; + $url = dolBuildUrl(DOL_URL_ROOT.'/comm/propal/card.php', ['id' => $objectlink->id, 'action' => 'selectlines'], true); + print ' '; } print ''; print ''.$objectlink->getNomUrl(1).''; @@ -77,7 +77,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { } print ''; print ''.$objectlink->getLibStatut(3).''; - print ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; + print ' $object->id, 'action' => 'dellink', 'dellinkid' => $key], true).'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; print "\n"; } if (count($linkedObjectBlock) > 1) { diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index ca9e7d12653..7d10de4ac73 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -3,8 +3,8 @@ * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2025 Frédéric France - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2025 Anthony Damhet + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Anthony Damhet * * 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 @@ -149,7 +149,8 @@ if ($action == 'confirm_split_more' && $permissiontocreate) { $res = $discount->delete($user); if ($res > 0) { $db->commit(); - header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id.($backtopage ? '&backtopage='.urlencode($backtopage) : '')); // To avoid pb with back + $query = ['id' => $id, 'backtopage' => $backtopage]; + header("Location: " . dolBuildUrl($_SERVER["PHP_SELF"], $query)); // To avoid pb with backtopage exit; } else { $db->rollback(); @@ -243,7 +244,8 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $permi $newid2 = $newdiscount2->create($user); if ($res > 0 && $newid1 > 0 && $newid2 > 0) { $db->commit(); - header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id.($backtopage ? '&backtopage='.urlencode($backtopage) : '')); // To avoid pb with back + $query = ['id' => $id, 'backtopage' => $backtopage]; + header("Location: " . dolBuildUrl($_SERVER["PHP_SELF"], $query)); // To avoid pb with back exit; } else { $db->rollback(); @@ -296,7 +298,7 @@ if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' $result = $discount->delete($user); if ($result > 0) { $db->commit(); - header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); // To avoid pb with back + header("Location: " . dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $id])); // To avoid pb with back exit; } else { setEventMessages($discount->error, $discount->errors, 'errors'); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 36d6fea35ab..e25f455c35b 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2613,7 +2613,7 @@ if ($action == 'create' && $usercancreate) { // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } // Confirmation of validation @@ -2793,7 +2793,7 @@ if ($action == 'create' && $usercancreate) { } if (!$error) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240); } } @@ -2829,12 +2829,12 @@ if ($action == 'create' && $usercancreate) { ]; } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } // Confirmation of closing if ($action == 'shipped') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } // Confirmation of cancellation @@ -2864,7 +2864,7 @@ if ($action == 'create' && $usercancreate) { ); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1); } // Confirmation to delete line @@ -2892,7 +2892,7 @@ if ($action == 'create' && $usercancreate) { $formquestion = array( array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, array(), 0, 'maxwidth300')) ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Subtotal line form diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 405f7b32c59..dd070117b55 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -529,7 +529,10 @@ class Commande extends CommonOrder $this->error = 'ErrorWrongParameters'; return -1; } - + if (!getDolGlobalBool('ORDER_NOCHECK_ONSALE_PRODUCTS_ONVALID') && !$this->checkActiveProductInLines()) { + dol_syslog(get_class($this)."::valid checkActiveProductInLines ".$this->error, LOG_INFO); + return -1; + } $now = dol_now(); $this->db->begin(); @@ -3757,6 +3760,12 @@ class Commande extends CommonOrder $labelTooltip = ''; + $paramsBadge = array('badgeParams' => array('attr' => array( + 'data-status-element' => $this->element, + 'data-billed' => (int) $billed, + 'data-status' => (int) $status + ))); + if ($status == self::STATUS_CANCELED) { $labelStatus = $langs->transnoentitiesnoconv('StatusOrderCanceled'); $labelStatusShort = $langs->transnoentitiesnoconv('StatusOrderCanceledShort'); @@ -3788,11 +3797,14 @@ class Commande extends CommonOrder $mode = 0; } + $paramsBadge['tooltip'] = $labelTooltip; + $parameters = array( 'status' => $status, 'mode' => $mode, 'billed' => $billed, - 'donotshowbilled' => $donotshowbilled + 'donotshowbilled' => $donotshowbilled, + 'paramsBadge' =>& $paramsBadge ); $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook @@ -3801,7 +3813,7 @@ class Commande extends CommonOrder return $hookmanager->resPrint; } - return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', array('tooltip' => $labelTooltip)); + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', $paramsBadge); } /** @@ -4037,9 +4049,10 @@ class Commande extends CommonOrder * Used to build previews or test instances. * id must be 0 if object instance is a specimen. * + * @param array $param Array of options * @return int */ - public function initAsSpecimen() + public function initAsSpecimen($param = array()) { global $conf, $langs; @@ -4051,6 +4064,9 @@ class Commande extends CommonOrder $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + if (array_key_exists('tosell', $param)) { + $sql .= " AND tosell = ".((int) $param['tosell']); + } $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index a2a4a63ed57..f036cebc541 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -160,7 +160,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 9e0e77c2c1e..6375076d2bc 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -139,7 +139,7 @@ if ($resql) { print_barre_liste($langs->trans("MenuOrdersToBill"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num); - print ''; + print ''; print ''; print ''; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 21fb7ce68a7..bee1eb2c27c 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -153,7 +153,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index d1c22a86195..5b6ece7adef 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -913,7 +913,7 @@ if ($resql) { $newcardbutton = '';//dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd); // Lines of title fields - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index d2094f5a819..7bac8f13265 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -6,7 +6,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2020 Maxime DEMAREST * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -327,7 +327,7 @@ print '
'; // Show filter box -print ''; +print ''; print ''; print ''; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 01f5d10fbba..405e6f83de4 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -74,7 +74,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { echo '
'; echo "\n"; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 4047d14d33f..9d8a7ba1686 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -5,7 +5,7 @@ * Copyright (C) 2013 Charles-Fr BENKE * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -107,7 +107,7 @@ llxHeader('', $title, $help_url); print load_fiche_titre($langs->trans("RubriquesTransactions"), '', 'object_category'); -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index b6e9889ed71..24dd0668443 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -565,7 +565,7 @@ class PaymentVarious extends CommonObject ); // Update fk_bank into llx_payment_various - // So we know the payment which has generate the banking ecriture + // So we know the payment which has generate the banking transaction if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); } else { diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index a47d8cecdda..36d17d937a2 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -6,7 +6,7 @@ * Copyright (C) 2017 Patrick Delcroix * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2022 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -464,7 +464,7 @@ if (empty($numref)) { $title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); print load_fiche_titre($title, $morehtmlright, ''); - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 9146ad5e612..a597468c111 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2023 Maxime Nicolas * Copyright (C) 2023 Benjamin GREMBI * Copyright (C) 2024-2025 MDW @@ -292,7 +292,7 @@ print load_fiche_titre($langs->trans("MenuBankInternalTransfer"), '', 'bank_acco print ''.$langs->trans("TransferDesc").''; print '

'; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 7ad4cc2eecb..1ce62ce4c9e 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -622,7 +622,7 @@ if ($id) { if ($permissiontoadd) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index 7943bf83ee5..b3f40d48a21 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -116,7 +116,7 @@ if ($object->id) { $langs->load("projects"); if ($user->hasRight('banque', 'modifier') && 0) { if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index 8dff526257d..e7ebe1f6817 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -85,7 +85,7 @@ if (isModEnabled('project')) { $langs->load("projects"); if ($user->hasRight('banque', 'modifier') && 0) { if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 9beaccbee7e..c9eaadf93fc 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -7,7 +7,7 @@ * Copyright (C) 2016 Marcos García * Copyright (C) 2018 Andreu Bisquerra * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -368,11 +368,11 @@ if ($action == "create" || $action == "start" || $action == 'close') { exit; } if ($syear && !$smonth) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; } elseif ($syear && $smonth && !$sday) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; } elseif ($syear && $smonth && $sday) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; } else { setEventMessages($langs->trans('YearNotDefined'), null, 'errors'); } @@ -396,7 +396,7 @@ if ($action == "create" || $action == "start" || $action == 'close') { if ($action != 'close') { print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); - print ''; + print ''; print ''; if ($contextpage == 'takepos') { print ''; diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 695537eaffb..47f8dc8da9a 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -138,7 +138,7 @@ $sql.=" OR b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CB); $sql.=" OR b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE); $sql.=")"; */ -$sql = "SELECT f.rowid as facid, f.ref, f.datef as do, pf.amount as amount, b.fk_account as bankid, cp.code"; +$sql = "SELECT f.rowid as facid, f.ref, f.datef as datef, p.datep as datep, pf.amount as amount, b.fk_account as bankid, cp.code"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as cp, ".MAIN_DB_PREFIX."bank as b"; $sql .= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement AND p.fk_bank = b.rowid"; $sql .= " AND f.module_source = '".$db->escape($posmodule)."'"; @@ -154,11 +154,11 @@ else exit; }*/ if ($syear && !$smonth) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; } elseif ($syear && $smonth && !$sday) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; } elseif ($syear && $smonth && $sday) { - $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; + $sql .= " AND datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; } else { dol_print_error(null, 'Year not defined'); } @@ -328,7 +328,7 @@ if ($resql) { // Date ope print '
\n"; if (!$i) { $totalarray['nbfield']++; diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 9f6e34be0be..4dbe1e8abe1 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -8,7 +8,7 @@ * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -122,7 +122,7 @@ if ($sortorder) { $totalnboflines = ''; $num = 0; -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 652d3d053c4..3bbfb59fb6f 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -147,7 +147,7 @@ if ($resql) { print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num); - print ''; + print ''; print '
'; // For now, shipments must stay linked to order, so link is not deletable if ($object->element != 'shipping') { - echo ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; + echo ' $object->id, 'action' => 'dellink', 'dellinkid' => $key], true).'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; } echo '
'; - print ''.dol_print_date($db->jdate($objp->do), "day").""; + print ''.dol_print_date($db->jdate($objp->datep), "day").""; print "
'; print ''; diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 159163e27f0..5c4c622cc55 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -3,7 +3,7 @@ * Copyright (c) 2004-2012 Laurent Destailleur * Copyright (C) 2012 Marcos García * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -247,7 +247,7 @@ print '
'; // Show filter box -print ''; +print ''; print ''; print ''; diff --git a/htdocs/compta/facture/admin/invoice_cust_extrafields.php b/htdocs/compta/facture/admin/invoice_cust_extrafields.php index a9209196f85..08e83d7e76f 100644 --- a/htdocs/compta/facture/admin/invoice_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoice_cust_extrafields.php @@ -73,7 +73,7 @@ $textobject = strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('', $langs->trans("BillsSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php b/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php index 65a92e02f7c..533ec4a7389 100644 --- a/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoice_rec_cust_extrafields.php @@ -74,7 +74,7 @@ $textobject = strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('', $langs->trans("BillsSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php b/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php index 3751da52696..fe4769f585b 100644 --- a/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoicedet_cust_extrafields.php @@ -74,7 +74,7 @@ $textobject = strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('', $langs->trans("BillsSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php index 5a89ee7ffc0..cdef540dec7 100644 --- a/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/invoicedet_rec_cust_extrafields.php @@ -74,7 +74,7 @@ $textobject = strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('', $langs->trans("BillsSetup")); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); diff --git a/htdocs/compta/facture/agenda-rec.php b/htdocs/compta/facture/agenda-rec.php index dfec53e54da..c2556220121 100644 --- a/htdocs/compta/facture/agenda-rec.php +++ b/htdocs/compta/facture/agenda-rec.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -169,7 +169,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/agenda.php b/htdocs/compta/facture/agenda.php index 86f3deb0fae..ad5568b4417 100644 --- a/htdocs/compta/facture/agenda.php +++ b/htdocs/compta/facture/agenda.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -164,7 +164,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 169820b5e15..54c4dc1ec21 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1042,7 +1042,7 @@ if (empty($reshook)) { $date_start_fill, $date_end_fill, (int) $fournprice, - (int) $buyingprice, + (float) $buyingprice, (int) $fk_parent_line ); @@ -1553,7 +1553,7 @@ if ($action == 'create') { if ($user->hasRight('facture', 'creer')) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2554b1a5ad7..e4cde4ac777 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5231,7 +5231,7 @@ if ($action == 'create') { if ($usercancreate) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index ceaeb4ba03f..4d795a4c99c 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1306,7 +1306,7 @@ class FactureRec extends CommonInvoice $sql .= ", total_ttc='".price2num($total_ttc)."'"; $sql .= ", date_start_fill=".((int) $date_start_fill); $sql .= ", date_end_fill=".((int) $date_end_fill); - $sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? $fk_fournprice : 'null'); + $sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? (int) $fk_fournprice : 'null'); $sql .= ", buy_price_ht=".($pa_ht ? price2num($pa_ht) : 0); $sql .= ", info_bits=".((int) $info_bits); $sql .= ", rang=".((int) $rang); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 07d518c7f6c..49beb5f65d7 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -167,7 +167,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index e00a841cebd..4ce67b885ea 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -168,7 +168,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/messaging.php b/htdocs/compta/facture/messaging.php index 3b91e447237..5120a968cad 100644 --- a/htdocs/compta/facture/messaging.php +++ b/htdocs/compta/facture/messaging.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -164,7 +164,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/note-rec.php b/htdocs/compta/facture/note-rec.php index 2159fb9231e..a8c97166379 100644 --- a/htdocs/compta/facture/note-rec.php +++ b/htdocs/compta/facture/note-rec.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -151,7 +151,7 @@ if ($id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 33420252456..2fb0377c3e8 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 81c65e01c93..df2ea7eeab9 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -386,7 +386,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { @@ -810,7 +810,7 @@ if ($object->id > 0) { } print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 980aeea27d2..eaecc303649 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -6,7 +6,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2020 Maxime DEMAREST * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -300,7 +300,7 @@ print '
'; // Show filter box -print ''; +print ''; print ''; print ''; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fcc6c564744..39a070b4cf8 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -85,7 +85,7 @@ $maxOpenCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->glob $hookmanager->initHooks(array('invoiceindex')); -$maxofloop = (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD); +$maxofloop = getDolGlobalString('MAIN_MAXLIST_OVERLOAD', 500); /* diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 3240bdecfba..a24d8f30ea6 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2014-2024 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -266,7 +266,7 @@ if ($resql) { $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('banque', 'cheque')); - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 3cf5dc2f71f..ebcd51defc6 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -421,7 +421,7 @@ if ($search_noteprivate) { // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 4b12af9085e..71e1ec9987a 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2019 Markus Welters * Copyright (C) 2024 MDW * @@ -483,7 +483,7 @@ if ($resql) { $param .= "&option=".urlencode($option); } - print ''; + print ''; print ''; print ''; if (!empty($limit)) { diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index c1ec93ef577..76cd3b0b7ef 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2017 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -296,7 +296,7 @@ if ($resql) { } // Lines of title fields - print ''; + print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index bcd5eda4523..18faedc92fa 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2016-2024 Frédéric France + * Copyright (C) 2016-2025 Frédéric France * Copyright (C) 2017-2024 Alexandre Spangaro * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW @@ -362,7 +362,7 @@ $resteapayer = 0; if ($action == 'create') { print load_fiche_titre($langs->trans("NewSocialContribution")); - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 4d08927bce3..318e44dc892 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2016-2024 Frédéric France + * Copyright (C) 2016-2025 Frédéric France * Copyright (C) 2020 Pierre Ardoin * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2021 Gauthier VERDOL @@ -408,7 +408,7 @@ if (!empty($permissiontodelete)) { $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $moreforfilter = ''; -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 8197c48151e..862845504a8 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -7,7 +7,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -143,7 +143,7 @@ if ($optioncss != '') { } $num = 0; -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index d32f585391d..ff1cd8c6247 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -2,7 +2,7 @@ /* Copyright (C) 2013 Antoine Iauch * Copyright (C) 2013-2016 Laurent Destailleur * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2022 Alexandre Spangaro * Copyright (C) 2024 Charlene Benke * Copyright (C) 2024-2025 MDW @@ -458,7 +458,7 @@ if ($modecompta == 'CREANCES-DETTES') { // Show Array $i = 0; - print ''; + print ''; print ''."\n"; // Extra parameters management foreach ($headerparams as $key => $value) { diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 343a026733e..afca100f00f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Antoine Iauch - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2022 Alexandre Spangaro * Copyright (C) 2024 MDW * @@ -252,7 +252,7 @@ if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') { $name = array(); // Show array -print ''; +print ''; print ''."\n"; // Extra parameters management foreach ($headerparams as $key => $value) { diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 5f5257460d6..e157506567c 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -5,7 +5,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Antoine Iauch * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2022 Alexandre Spangaro * Copyright (C) 2024 MDW * @@ -448,7 +448,7 @@ if ($modecompta == "RECETTES-DEPENSES") { // Show array $i = 0; -print ''; +print ''; print ''."\n"; // Extra parameters management foreach ($headerparams as $key => $value) { diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php index 66401f051f0..60b7c6dc05c 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -382,7 +382,7 @@ if ($modecompta == 'CREANCES-DETTES') { // Show array $i = 0; - print ''; + print ''; print ''."\n"; // Extra parameters management foreach ($headerparams as $key => $value) { diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index cf4a17327ba..f6b054857a1 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -2,7 +2,7 @@ /* Copyright (C) 2020 Maxime Kohlhaas * Copyright (C) 2023 Ferran Marcet * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -412,7 +412,7 @@ if ($resql) { // Show array $i = 0; -print ''; +print ''; print ''."\n"; // Extra parameters management foreach ($headerparams as $key => $value) { diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 98052f8fb0e..ef67efab917 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -6,7 +6,7 @@ * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -352,7 +352,7 @@ $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $moreforfilter = ''; -print ''; +print ''; if ($optioncss != '') { print ''; } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index d343539e114..d91e2e1f593 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -184,6 +184,9 @@ if (empty($reshook)) { $errors = $nuser->errors; $db->rollback(); } + if ($error) { + setEventMessage($langs->trans('ImpossibleToCreateUserFromContact').' : '.$nuser->errorsToString(), 'errors'); + } } else { $error = $object->error; $errors = $object->errors; @@ -664,7 +667,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''."\n"; } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 99106d0d3ee..a92cdcb4ad3 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -77,7 +77,7 @@ $help_url = 'EN:Module_Contracts|FR:Module_Contrat|ES:Contratos_de_servicio'; llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-contrat page-admin_extrafields'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup'); $head = contract_admin_prepare_head(); diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index f6018c961b2..00157e00322 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -77,7 +77,7 @@ $help_url = 'EN:Module_Contracts|FR:Module_Contrat|ES:Contratos_de_servicio'; llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-contrat page-admin_extrafields_lines'); -$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +$linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup'); $head = contract_admin_prepare_head(); diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 9172a02d173..10f95548054 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -63,8 +63,8 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$id = GETPOSTINT('id'); -$ref = GETPOST('ref', 'alpha'); +$id = GETPOSTINT('id'); +$ref = GETPOST('ref', 'alpha'); // Security check if ($user->socid) { @@ -198,7 +198,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; } // Project if (isModEnabled('project')) { @@ -207,7 +207,7 @@ if ($object->id > 0) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { @@ -263,12 +263,17 @@ if ($object->id > 0) { if (isModEnabled('agenda')) { if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { $backtopage = $_SERVER['PHP_SELF'].'?id='.$object->id; - $out = '&origin='.$object->element.'&originid='.$object->id.'&backtopage='.urlencode($backtopage); - $messagingUrl = DOL_URL_ROOT.'/contrat/messaging.php?id='.$object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/contrat/messaging.php', ['id' => $object->id]); $newcardbutton .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1); - $messagingUrl = DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id; + $messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/contrat/agenda.php', ['id' => $object->id]); $newcardbutton .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2); - $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); + $query = [ + 'action' => 'create', + 'origin' => $object->element, + 'originid' => $object->id, + 'backtopage' => $backtopage, + ]; + $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', $query)); } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index d24fe3012c7..74f82099628 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1500,7 +1500,7 @@ if ($action == 'create') { if ($permissiontoadd) { $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index ff092d6022d..d011a6489e3 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -190,7 +190,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 727a308d0ea..cc715d1df00 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -165,7 +165,7 @@ if ($object->id) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index cdb34cd858d..79794fa354c 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -12,6 +12,7 @@ * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * Copyright (C) 2024 Benjamin Falière + * Copyright (C) 2025 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 @@ -79,6 +80,9 @@ $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); $search_all = GETPOST('search_all', 'alphanohtml'); $search_status = GETPOST('search_status', 'alpha'); $search_signed_status = GETPOST('search_signed_status', 'alpha'); +$search_note_public = GETPOST('search_note_public', 'alpha'); +$search_note_private = GETPOST('search_note_private', 'alpha'); + $search_user = GETPOST('search_user', 'intcomma'); $search_sale = GETPOST('search_sale', 'intcomma'); $search_product_category = GETPOST('search_product_category', 'intcomma'); @@ -198,6 +202,8 @@ $arrayfields = array( 'c.date_contrat' => array('label' => $langs->trans("DateContract"), 'checked' => '1', 'position' => 45), 'c.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => '0', 'position' => 500), 'c.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => '0', 'position' => 500), + 'c.note_public' => array('label' => $langs->trans("NotePublic"), 'checked' => '0', 'position' => 520, 'enabled' => (string) (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'c.note_private' => array('label' => $langs->trans("NotePrivate"), 'checked' => '0', 'position' => 521, 'enabled' => (string) (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'lower_planned_end_date' => array('label' => $langs->trans("LowerDateEndPlannedShort"), 'checked' => '1', 'position' => 900, 'help' => $langs->trans("LowerDateEndPlannedShort")), 'status' => array('label' => $langs->trans("Status"), 'checked' => '1', 'position' => 1000), 'c.signed_status' => array('label' => $langs->trans('SignedStatus'), 'checked' => '0', 'position' => 1001), @@ -284,6 +290,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_date_modif_end = ""; $search_status = ""; $search_signed_status = ''; + $search_note_public = ""; + $search_note_private = ""; $toselect = array(); $searchCategoryCustomerList = array(); $search_array_options = array(); @@ -315,7 +323,7 @@ $title = ""; $sql = 'SELECT'; $sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_modification, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity, c.signed_status,"; $sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,'; -$sql .= " typent.code as typent_code,"; +$sql .= " typent.code as typent_code, c.note_public, c.note_private,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; // TODO Add a denormalized field "denormalized_lower_planned_end_date" so we can remove the HAVING and then, // remove completely the SUM and GROUP BY (faster). Status of each service can be read into the loop that build the list. @@ -393,6 +401,16 @@ if ($search_town) { if ($search_country && $search_country != '-1') { $sql .= " AND s.fk_pays IN (".$db->sanitize($search_country).')'; } +if (!empty($search_note_private)) { + $sql .= natural_search(array('c.note_private'), $search_note_private); +} +if (!empty($search_note_public)) { + $sql .= natural_search(array('c.note_public'), $search_note_public); +} + +/*if ($search_sale > 0) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); +}*/ if ($search_all) { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } @@ -507,7 +525,7 @@ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $objec $sql .= $hookmanager->resPrint; $sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity, c.signed_status,"; $sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,'; -$sql .= " typent.code,"; +$sql .= " typent.code, c.note_public, c.note_private,"; $sql .= " state.code_departement, state.nom"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -651,6 +669,12 @@ if ($search_ref_customer != '') { if ($search_ref_supplier != '') { $param .= '&search_ref_supplier='.urlencode($search_ref_supplier); } +if ($search_note_private != '') { + $param .= '&search_note_private='.urlencode($search_note_private); +} +if ($search_note_public != '') { + $param .= '&search_note_public='.urlencode($search_note_public); +} if ($search_op2df != '') { $param .= '&search_op2df='.urlencode($search_op2df); } @@ -956,6 +980,18 @@ if (!empty($arrayfields['c.signed_status']['checked'])) { print $form->selectarray('search_signed_status', $list_signed_status, $search_signed_status, 1, 0, 0, '', 1, 0, 0, '', 'search_status'); print ''; } +// Public note +if (!empty($arrayfields['c.note_public']['checked'])) { + print '
'; +} +// Private note +if (!empty($arrayfields['c.note_private']['checked'])) { + print ''; +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -1073,6 +1109,14 @@ if (!empty($arrayfields['c.signed_status']['checked'])) { print_liste_field_titre($arrayfields['c.signed_status']['label'], $_SERVER["PHP_SELF"], "c.signed_status", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } +if (!empty($arrayfields['c.note_public']['checked'])) { + print_liste_field_titre($arrayfields['c.note_public']['label'], $_SERVER["PHP_SELF"], "c.note_public", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; +} +if (!empty($arrayfields['c.note_private']['checked'])) { + print_liste_field_titre($arrayfields['c.note_private']['label'], $_SERVER["PHP_SELF"], "c.note_private", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -1332,6 +1376,20 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } + // public note + if (!empty($arrayfields['c.note_public']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // private note + if (!empty($arrayfields['c.note_private']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook diff --git a/htdocs/contrat/messaging.php b/htdocs/contrat/messaging.php index 186d4e65108..a3fce41f7a2 100644 --- a/htdocs/contrat/messaging.php +++ b/htdocs/contrat/messaging.php @@ -7,7 +7,7 @@ * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -203,7 +203,7 @@ if (isModEnabled('project')) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 7f6ff28db74..660ce00eeaa 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -136,7 +136,7 @@ if ($id > 0 || !empty($ref)) { if (0) { // @phpstan-ignore-line $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' '; } $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); } else { diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index ac8c65a0670..c536e383870 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -47,7 +47,9 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', $object->fetch($id); // Fetch may not be already done } - $result_update = $object->update_note(dol_html_entity_decode(GETPOST('note_public', 'restricthtml'), ENT_QUOTES | ENT_HTML5, 'UTF-8', 1), '_public'); + $notePublic = GETPOST('note_public', 'restricthtml'); + + $result_update = $object->update_note(dol_html_entity_decode($notePublic, ENT_QUOTES | ENT_HTML5, 'UTF-8', 1), '_public'); if ($result_update < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -82,10 +84,6 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', if ($resultGenDoc < 0) { setEventMessages($object->error, $object->errors, 'warnings'); } - - if ($result < 0) { - dol_print_error($db, $object->error, $object->errors); - } } } } elseif ($action == 'setnote_private' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) { // Set public note @@ -97,7 +95,10 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', if (empty($object->id)) { $object->fetch($id); // Fetch may not be already done } - $result = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5, 'UTF-8', 1), '_private'); + + $notePrivate = GETPOST('note_private', 'restricthtml'); + + $result = $object->update_note(dol_html_entity_decode($notePrivate, ENT_QUOTES | ENT_HTML5, 'UTF-8', 1), '_private'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 9401154cefa..a9ad73b9daf 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -232,7 +232,7 @@ class box_graph_invoices_permonth extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index b52fb20adfd..a0d52f5e07a 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -184,7 +184,7 @@ class box_graph_invoices_peryear extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index f3d556b0933..e14635cb27e 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -229,7 +229,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php index 55ba0451351..fa0480a18ad 100644 --- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php +++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php @@ -2,7 +2,7 @@ /* Module descriptor for ticket system * Copyright (C) 2013-2016 Jean-François FERRY * Copyright (C) 2016 Christophe Battarel - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software: you can redistribute it and/or modify @@ -146,7 +146,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 3a3cb66df2d..35618b54d79 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -232,7 +232,7 @@ class box_graph_orders_permonth extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 0f0e9f2df6f..5263cd32039 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -231,7 +231,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index b7e039b3fed..14e1740e75c 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -355,7 +355,7 @@ class box_graph_product_distribution extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 6948f00912f..de7ef4b2cf2 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -228,7 +228,7 @@ class box_graph_propales_permonth extends ModeleBoxes }); '; $stringtoshow .= '
'; // hideobject is to start hidden - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_last_knowledgerecord.php b/htdocs/core/boxes/box_last_knowledgerecord.php index 325c8cb8683..41f9f847445 100644 --- a/htdocs/core/boxes/box_last_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_knowledgerecord.php @@ -93,7 +93,7 @@ class box_last_knowledgerecord extends ModeleBoxes if ($user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')) { $sql = 'SELECT k.rowid as id, k.date_creation, k.ref, k.lang, k.question, k.status as status'; $sql .= " FROM ".MAIN_DB_PREFIX."knowledgemanagement_knowledgerecord as k"; - $sql .= " WHERE k.entity IN (".getEntity('knowledgemanagement').")"; + $sql .= " WHERE k.entity IN (".getEntity('knowledgerecord').")"; if ($user->socid) { $sql .= " AND k.fk_soc= ".((int) $user->socid); diff --git a/htdocs/core/boxes/box_last_modified_knowledgerecord.php b/htdocs/core/boxes/box_last_modified_knowledgerecord.php index a160bf482c4..3e1d48897b6 100644 --- a/htdocs/core/boxes/box_last_modified_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_modified_knowledgerecord.php @@ -94,7 +94,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes $sql = 'SELECT k.rowid as id, k.date_creation, GREATEST(k.tms, kef.tms) as date_modification, k.ref, k.lang, k.question, k.status as status'; $sql .= " FROM ".MAIN_DB_PREFIX."knowledgemanagement_knowledgerecord as k"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."knowledgemanagement_knowledgerecord_extrafields as kef ON kef.fk_object = k.rowid"; - $sql .= " WHERE k.entity IN (".getEntity('knowledgemanagement').")"; + $sql .= " WHERE k.entity IN (".getEntity('knowledgerecord').")"; if ($user->socid) { $sql .= " AND k.fk_soc= ".((int) $user->socid); diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index f251cd944bf..0703c3fd652 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -83,9 +83,9 @@ class box_last_ticket extends ModeleBoxes $sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label,"; $sql .= " s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_severity as severity ON severity.code=t.severity_code"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code = t.type_code AND type.entity = t.entity"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code = t.category_code AND category.entity = t.entity"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_severity as severity ON severity.code = t.severity_code AND severity.entity = t.entity"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=t.fk_soc"; $sql .= " WHERE t.entity IN (".getEntity('ticket').")"; // $sql.= " AND e.rowid = er.fk_event"; diff --git a/htdocs/core/boxes/box_members_by_tags.php b/htdocs/core/boxes/box_members_by_tags.php index 07a9e9962ad..79ec096034e 100644 --- a/htdocs/core/boxes/box_members_by_tags.php +++ b/htdocs/core/boxes/box_members_by_tags.php @@ -2,9 +2,9 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015-2025 Frédéric France * Copyright (C) 2021-2023 Waël Almoman - * Copyright (C) 2024 MDW + * 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 @@ -151,7 +151,7 @@ class box_members_by_tags extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', - 'text' => ''.dol_trunc(($adhtag->ref ? $adhtag->ref : $adhtag->label), dol_size(32)).'', + 'text' => ''.dol_trunc(($adhtag->ref ? $adhtag->ref : $adhtag->label), dol_size(32)).'', 'asis' => 1, ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 7a692b81fa7..d3f8238bf36 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1022,12 +1022,19 @@ abstract class CommonInvoice extends CommonObject } } + $paramsBadge = array('badgeParams' => array('attr' => array( + 'data-status-element' => $this->element, + 'data-already-paid' => $alreadypaid > 0 ? 1 : 0, + 'data-status' => (int) $status + ))); + $parameters = array( 'status' => $status, 'mode' => $mode, 'paye' => $paye, 'alreadypaid' => $alreadypaid, - 'type' => $type + 'type' => $type, + 'paramsBadge'=>& $paramsBadge ); $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook @@ -1052,9 +1059,7 @@ abstract class CommonInvoice extends CommonObject } //$paramsbutton = array('badgeParams' => array('attr' => array('title' => 'rrrr'))); - $paramsbutton = array('badgeParams' => array('attr' => array('title' => $titlestringtoshow))); - } else { - $paramsbutton = array(); + $paramsBadge['badgeParams' ]['attr']['title'] = $titlestringtoshow; } /* @@ -1067,7 +1072,7 @@ abstract class CommonInvoice extends CommonObject $statusType = 'status8'; } - $statusbadge = dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', $paramsbutton); + $statusbadge = dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', $paramsBadge); return $statusbadge; } @@ -1909,9 +1914,18 @@ abstract class CommonInvoice extends CommonObject // Add the bank account information include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $bankAccount = new Account($this->db); - if ($this->fk_account > 0) { - $bankAccount->fetch($this->fk_account); + + $idofbankaccountouse = $this->fk_account; + if (empty($idofbankaccountouse)) { + $idofbankaccountouse = $this->fk_bank; // for backward compatibility + } + if (empty($idofbankaccountouse)) { + $idofbankaccountouse = getDolGlobalInt('FACTURE_RIB_NUMBER'); + } + + if ($idofbankaccountouse > 0) { + $bankAccount = new Account($this->db); + $bankAccount->fetch($idofbankaccountouse); $lines[] = $bankAccount->bic; //BIC (required) if (!empty($bankAccount->owner_name)) { $lines[] = $bankAccount->owner_name; //Owner of the bank account, if present (required) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index af10c4eabeb..8a300692617 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -20,7 +20,8 @@ * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 William Mead * Copyright (C) 2025 Alexandre Janniaux - * + * Copyright (C) 2025 Vincent Maury +* * 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 @@ -11619,4 +11620,43 @@ abstract class CommonObject $this->db->commit(); return true; } + + /** + * Check if all products have the right status (on sale, on buy) called + * during validation of propal, order, supplier proposal, supplier order + * + * @global object $langs + * @param string $status onsale or onbuy + * @return bool + */ + public function checkActiveProductInLines($status = 'onsale') + { + global $langs; + + if (isModEnabled('product') || isModEnabled('service')) { + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + + $ret = true; + $tmpproduct = new Product($this->db); + foreach ($this->lines as $line) { + if ($line->fk_product > 0) { + $tmpproduct->fetch($line->fk_product); + $statustotest = ($status == 'onsale' ? 'status' : 'status_buy'); + if (!$tmpproduct->$statustotest) { + $langs->load('products'); + $statuskey4lang = ($status == 'onsale' ? 'ProductStatusNotOnSell' : 'ProductStatusNotOnBuy'); + $ret = false; + $this->errors[] = $langs->trans('ProductRef').' '.$tmpproduct->ref.' '.$langs->trans($statuskey4lang); + break; + } + } + } + if (!$ret) { + $this->error = 'ErrorOneLineContainsADisactivatedProduct'; + } + return $ret; + } else { + return true; + } + } } diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index a65a73ff76f..15cf6a59c9d 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -207,8 +207,12 @@ class DolEditor $fullpage = false; + // syntax is [] for attributes and {} for value inside style $extraAllowedContent = 'a[target];'; $extraAllowedContent .= 'section[contenteditable,id];'; + $extraAllowedContent .= 'table{border-spacing};'; + $extraAllowedContent .= 'td{padding};'; + $extraAllowedContent .= 'p{margin-left,margin-right,margin-top,margin-bottom,padding,line-height};'; $extraAllowedContent .= 'div{background-color,color,display,float,height,margin,margin-top,margin-bottom,padding,padding-left,padding-right,padding-top,padding-bottom,width,border-top-left-radius,border-top-right-radius,border-bottom-left-radius,border-bottom-right-radius,box-shadow}'; if (is_string($restrictContent)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1e275b08f14..570805aa43f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -216,7 +216,7 @@ class Form $ret .= '
'; + print ''; + print ''; + print ''; + print ''.$obj->note_public.''.$obj->note_private.''; } if ($htmlname && GETPOST('action', 'aZ09') != 'edit' . $htmlname && $perm) { - $ret .= ''; + $ret .= ' 'edit' . $htmlname, $paramid => $object->id], true) . $moreparam . '">'; $ret .= img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)); $ret .= ''; } @@ -9986,7 +9986,7 @@ class Form