diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 1eae1b063b0..d898628013e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -36,12 +36,13 @@ Definition: As the Developer: -1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr). -2. Clone your fork. -3. Choose a branch(See the [Branches](#branches) section below). -4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation). -5. Commit and push your changes. -6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request). +1. Check you agree with the terms of the [DCO - Developer's Certificate of Origin](https://github.com/Dolibarr/dolibarr/DCO) +2. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr). +3. Clone your fork. +4. Choose a branch(See the [Branches](#branches) section below). +5. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation). +6. Commit and push your changes. +7. [Make a pull request](https://help.github.com/articles/creating-a-pull-request). As the PR Maintainer: diff --git a/.github/changed-lines-count-labeler.yml b/.github/changed-lines-count-labeler.yml new file mode 100644 index 00000000000..39e663821fb --- /dev/null +++ b/.github/changed-lines-count-labeler.yml @@ -0,0 +1,3 @@ +# Add this tag for any changes for more than 1 line +"Pending analysis of PR (maintenance team)": + min: 1 diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/phpstan_baseline.yml index 618a2d26690..9503c25de77 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/phpstan_baseline.yml @@ -1,9 +1,9 @@ name: 'PHPStan baseline' on: - # Every Thursday we want to refresh the baseline + # Every day we want to refresh the baseline schedule: - - cron: '0 6 * * 4' + - cron: '0 12 * * *' # We want to be able to manually refresh the baseline too workflow_dispatch: @@ -14,18 +14,21 @@ on: required: true type: string # Run PHPStan analyse on pull requests - #pull_request: + # pull_request: + +permissions: {} # none env: PHP_VERSION: '8.2' + GH_TOKEN: ${{ github.token }} gh_event: ${{ inputs.gh_event || github.event_name }} CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }} jobs: phpstan: runs-on: ubuntu-latest - permissions: write-all - # contents: write - # pull-requests: write + permissions: + contents: write + pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 @@ -54,7 +57,7 @@ jobs: phpstan-cache-${{ env.PHP_VERSION }}- - uses: ruudk/phpstan-baseline-refresh-create-pr-action@main with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ env.GH_TOKEN }} phpstan_path: phpstan configuration_path: phpstan.neon.dist phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php @@ -63,8 +66,8 @@ jobs: commit_email: dolibarr-bot@users.noreply.github.com commit_message: PHPStan > Update baseline target_branch: develop - pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} - # pr_create: 1 + # pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} + pr_create: 1 pr_title: PHPStan > Update baseline pr_reviewer: eldy pr_body: | diff --git a/.github/workflows/pr-18-autolabel.yaml b/.github/workflows/pr-18-autolabel.yaml new file mode 100644 index 00000000000..feb9ee17c97 --- /dev/null +++ b/.github/workflows/pr-18-autolabel.yaml @@ -0,0 +1,21 @@ +name: "Set label for v18" +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - "18.0" + push: + branches: + - "18.0" + +jobs: + changed-lines-count-labeler: + runs-on: ubuntu-latest + name: An action for automatically labelling pull requests based on the changed lines count + steps: + - name: Set a label + uses: vkirilichev/changed-lines-count-labeler@v0.2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/changed-lines-count-labeler.yml + continue-on-error: true diff --git a/.github/workflows/pr-18.yaml b/.github/workflows/pr-18.yaml new file mode 100644 index 00000000000..67075183b60 --- /dev/null +++ b/.github/workflows/pr-18.yaml @@ -0,0 +1,55 @@ +name: Set reviewer for v18 +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - "18.0" + push: + branches: + - "18.0" + +jobs: + pr18: + runs-on: ubuntu-latest + + #env: + # GH_TOKEN: ${{ github.token }} + # GH_TOKENS: ${{ secrets.GITHUB_TOKEN }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install GitHub CLI + run: | + sudo apt update + sudo apt install gh -y + + - name: Assign reviewer + env: + #REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer + REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer + run: | + # shellcheck disable=2086 + echo "Run action by ${{ github.actor }}" + # shellcheck disable=2086 + echo "github.token=${{ github.token }}" + # shellcheck disable=2086 + echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" + # shellcheck disable=2086 + echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH" + # shellcheck disable=2086 + echo Get the pr_number + # shellcheck disable=2086 + pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH) + # shellcheck disable=2086 + echo "pr_number=$pr_number" + # shellcheck disable=2086 + echo Authenticate login gh + # shellcheck disable=2086 + gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}" + # shellcheck disable=2086 + gh auth setup-git + # shellcheck disable=2086 + gh pr edit $pr_number --add-reviewer "$REVIEWER" + continue-on-error: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000000..dc0bfbdf63c --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,38 @@ +name: Test github actions +on: + workflow_dispatch: + pull_request: + types: [opened, reopened, synchronize] + branches: + - "18.0" + +env: + ENVGHT: ${{ secrets.GITHUB_TOKEN }} + ENVGHU: ${{ github.token }} + VARAAA: ${{ vars.AAA }} + SECBBB: ${{ secrets.BBB }} + VARREPORGCCC: ${{ vars.CCC }} + ENVFIX: "abc" + +jobs: + testjob: + runs-on: ubuntu-latest + steps: + - name: Log + run: | + echo "Run action by ${{ github.actor }}" + echo "github.token=${{ github.token }}" + echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" + echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH" + echo "repo-token: ${{secrets.GITHUB_TOKEN}}" + echo "variable org: ${{vars.AAA}}" + echo "env prg: ${{env.AAA}}" + echo "env prg: ${{env.VARAAA}}" + echo "secret org: ${{secrets.BBB}}" + echo "variable repository of orga: ${{vars.CCC}}" + echo "ENVGHT: ${{env.ENVGHT}}" + echo "ENVGHU: ${{env.ENVGHU}}" + echo "VARAAA: ${{vars.AAA}}" + echo "ENVAAA: ${{env.VARAAA}}" + echo "VARREPORGCCC: ${{env.VARREPORGCCC}}" + echo "ENVFIX: ${{env.ENVFIX}}" diff --git a/.gitignore b/.gitignore index 830429de679..0a6e4cf6655 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,6 @@ phpstan_custom.neon /.php-cs-fixer.cache /.php_cs.cache /.cache + +# ignore .htaccess files +.htaccess diff --git a/SECURITY.md b/SECURITY.md index 809681c74d1..062578e03b9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,8 +12,9 @@ Security report are valid only on current stable version (see https://dolibarr.o To report a vulnerability, for a private report, you can: -- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody) +- Send your report on Vulnerability Disclosure Program (VDP): Link will be updated soon (recommended for everybody) - Or send an email to security@dolibarr.org with clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. diff --git a/build/phpstan/bootstrap_action.php b/build/phpstan/bootstrap_action.php index 2bcc70dd965..f1a6a638f91 100644 --- a/build/phpstan/bootstrap_action.php +++ b/build/phpstan/bootstrap_action.php @@ -27,6 +27,7 @@ if (!defined("NOHTTPSREDIRECT")) { } // Defined some constants and load Dolibarr env to reduce PHPStan bootstrap that fails to load a lot of things. +$dolibarr_main_document_root = __DIR__ . '/../../htdocs'; define('DOL_DOCUMENT_ROOT', __DIR__ . '/../../htdocs'); define('DOL_DATA_ROOT', __DIR__ . '/../../documents'); define('DOL_URL_ROOT', '/'); @@ -42,6 +43,7 @@ define('MAIN_DB_PREFIX', 'llx_'); * @var User $user */ - global $conf, $db, $hookmanager, $langs, $mysoc, $user; +global $conf, $db, $hookmanager, $langs, $mysoc, $user; +global $dolibarr_main_document_root; // include_once DOL_DOCUMENT_ROOT . '/../../htdocs/main.inc.php'; diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 7a97e63e9ee..1c7672653e5 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -1,29 +1,5 @@ parameters: ignoreErrors: - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/accountancy/admin/account.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 3 - path: ../../htdocs/accountancy/admin/account.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/accountancy/admin/account.php - - - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/accountancy/admin/account.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -252,12 +228,6 @@ parameters: count: 4 path: ../../htdocs/accountancy/bookkeeping/export.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/accountancy/bookkeeping/list.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -276,12 +246,6 @@ parameters: count: 3 path: ../../htdocs/accountancy/bookkeeping/list.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/accountancy/bookkeeping/listbyaccount.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -336,12 +300,6 @@ parameters: count: 4 path: ../../htdocs/accountancy/class/accountancycategory.class.php - - - message: '#^Property AccountancyCategory\:\:\$sdcpermonth type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../htdocs/accountancy/class/accountancycategory.class.php - - message: '#^Property AccountancyCategory\:\:\$sens \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -505,7 +463,7 @@ parameters: path: ../../htdocs/accountancy/class/accountingaccount.class.php - - message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\\}\>, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#' + message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\\}\>, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#' identifier: function.impossibleType count: 1 path: ../../htdocs/accountancy/class/accountingjournal.class.php @@ -667,7 +625,7 @@ parameters: path: ../../htdocs/accountancy/class/lettering.class.php - - message: '#^Parameter \#1 \$link_by_element of method Lettering\:\:getGroupElements\(\) expects array\\>, array\\> given\.$#' + message: '#^Parameter \#1 \$link_by_element of method Lettering\:\:getGroupElements\(\) expects array\\>, array\\> given\.$#' identifier: argument.type count: 1 path: ../../htdocs/accountancy/class/lettering.class.php @@ -816,12 +774,6 @@ parameters: count: 3 path: ../../htdocs/accountancy/journal/bankjournal.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/accountancy/journal/bankjournal.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -924,72 +876,12 @@ parameters: count: 1 path: ../../htdocs/accountancy/supplier/list.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/accountancy/tpl/export_journal.tpl.php - - message: '#^Variable \$mc might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/adherents/admin/member.php - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 23 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 23 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php - - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 27 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 26 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php - - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 30 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 28 - path: ../../htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1003,13 +895,13 @@ parameters: path: ../../htdocs/adherents/card.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 2 + count: 1 path: ../../htdocs/adherents/class/adherent.class.php - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/adherents/class/adherent.class.php @@ -1050,36 +942,12 @@ parameters: count: 5 path: ../../htdocs/adherents/class/adherent.class.php - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(Adherent\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/adherents/class/adherent.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(Adherent\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/adherents/class/adherent.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(Adherent\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/adherents/class/adherent.class.php - - message: '#^Parameter \#1 \$substitutionarray of function complete_substitutions_array expects array\, array\ given\.$#' identifier: argument.type count: 1 path: ../../htdocs/adherents/class/adherent.class.php - - - message: '#^Property Adherent\:\:\$email \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/adherents/class/adherent.class.php - - message: '#^Property Adherent\:\:\$first_subscription_amount \(int\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -1092,16 +960,10 @@ parameters: count: 1 path: ../../htdocs/adherents/class/adherent.class.php - - - message: '#^Property Adherent\:\:\$societe \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/adherents/class/adherent.class.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse - count: 2 + count: 1 path: ../../htdocs/adherents/class/adherent.class.php - @@ -1194,36 +1056,6 @@ parameters: count: 2 path: ../../htdocs/adherents/class/subscription.class.php - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/index.php - - - - message: '#^Variable \$badgeStatus4 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/index.php - - - - message: '#^Variable \$badgeStatus8 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/adherents/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1290,18 +1122,6 @@ parameters: count: 1 path: ../../htdocs/adherents/partnership.php - - - message: '#^Variable \$label might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/adherents/stats/geo.php - - - - message: '#^Variable \$theme_datacolor might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/adherents/stats/geo.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1362,18 +1182,6 @@ parameters: count: 2 path: ../../htdocs/admin/agenda.php - - - message: '#^Variable \$label might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/admin/agenda_other.php - - - - message: '#^Variable \$label might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/admin/agenda_reminder.php - - message: '#^Variable \$errorsaved in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -1602,18 +1410,6 @@ parameters: count: 1 path: ../../htdocs/admin/mails.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 3 - path: ../../htdocs/admin/mails.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 3 - path: ../../htdocs/admin/mails.php - - message: '#^Variable \$text in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -1716,12 +1512,6 @@ parameters: count: 2 path: ../../htdocs/admin/modules.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/admin/modules.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1788,24 +1578,6 @@ parameters: count: 1 path: ../../htdocs/admin/oauthlogintokens.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 5 - path: ../../htdocs/admin/openid_connect.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 5 - path: ../../htdocs/admin/openid_connect.php - - - - message: '#^Variable \$bc might not be defined\.$#' - identifier: variable.undefined - count: 10 - path: ../../htdocs/admin/openid_connect.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1836,30 +1608,6 @@ parameters: count: 1 path: ../../htdocs/admin/security_file.php - - - message: '#^Parameter \#4 \$deliveryreceipt of class CSMSFile constructor expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/admin/sms.php - - - - message: '#^Parameter \#5 \$deferred of class CSMSFile constructor expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/admin/sms.php - - - - message: '#^Parameter \#6 \$priority of class CSMSFile constructor expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/admin/sms.php - - - - message: '#^Parameter \#7 \$class of class CSMSFile constructor expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/admin/sms.php - - message: '#^Variable \$smsfile might not be defined\.$#' identifier: variable.undefined @@ -1896,12 +1644,6 @@ parameters: count: 1 path: ../../htdocs/admin/system/dbtable.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/admin/system/dolibarr.php - - message: '#^Variable \$conffiletoshowshort might not be defined\.$#' identifier: variable.undefined @@ -1986,18 +1728,6 @@ parameters: count: 1 path: ../../htdocs/admin/system/security.php - - - message: '#^Variable \$arrayofstreamtodisable might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/admin/system/security.php - - - - message: '#^Variable \$conffile might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/admin/system/security.php - - message: '#^Variable \$dolibarr_main_document_root might not be defined\.$#' identifier: variable.undefined @@ -2616,12 +2346,6 @@ parameters: count: 2 path: ../../htdocs/asset/class/asset.class.php - - - message: '#^Property Asset\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 20, notnull\: 1, visible\: 1, noteditable\: 0, index\: 1, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 1, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, fk_asset_model\: array\{type\: ''integer\:AssetModel…'', label\: ''AssetModel'', enabled\: 1, position\: 40, notnull\: 0, visible\: 1, index\: 1, validate\: 1\}, qty\: array\{type\: ''real'', label\: ''Qty'', enabled\: 1, position\: 50, notnull\: 1, visible\: 0, default\: ''1'', isameasure\: 1, \.\.\.\}, acquisition_type\: array\{type\: ''smallint'', label\: ''AssetAcquisitionType'', enabled\: 1, position\: 60, notnull\: 1, visible\: 1, arrayofkeyval\: array\{''AssetAcquisitionTyp…'', ''AssetAcquisitionTyp…''\}, validate\: 1\}, asset_type\: array\{type\: ''smallint'', label\: ''AssetType'', enabled\: 1, position\: 70, notnull\: 1, visible\: 1, arrayofkeyval\: array\{''AssetTypeIntangible'', ''AssetTypeTangible'', ''AssetTypeInProgress'', ''AssetTypeFinancial''\}, validate\: 1\}, not_depreciated\: array\{type\: ''boolean'', label\: ''AssetNotDepreciated'', enabled\: 1, position\: 80, notnull\: 0, default\: ''0'', visible\: 1, validate\: 1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/asset/class/asset.class.php - - message: '#^Property Asset\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -2688,12 +2412,6 @@ parameters: count: 2 path: ../../htdocs/asset/class/assetmodel.class.php - - - message: '#^Property AssetModel\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 20, notnull\: 1, visible\: 1, index\: 1, searchall\: 1, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 1, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, asset_type\: array\{type\: ''smallint'', label\: ''AssetType'', enabled\: 1, position\: 40, notnull\: 1, visible\: 1, arrayofkeyval\: array\{''AssetTypeIntangible'', ''AssetTypeTangible'', ''AssetTypeInProgress'', ''AssetTypeFinancial''\}, validate\: 1\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 300, notnull\: 0, visible\: 0, validate\: 1\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 301, notnull\: 0, visible\: 0, validate\: 1\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2\}, tms\: array\{type\: ''timestamp'', label\: ''DateModification'', enabled\: 1, position\: 501, notnull\: 0, visible\: \-2\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/asset/class/assetmodel.class.php - - message: '#^Property AssetModel\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -2814,66 +2532,24 @@ parameters: count: 1 path: ../../htdocs/asset/tpl/accountancy_codes_view.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/asset/tpl/depreciation_options_edit.tpl.php - - message: '#^Variable \$parameters might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/asset/tpl/depreciation_options_edit.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php - - message: '#^Variable \$db might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php - - message: '#^Variable \$parameters might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php - - - message: '#^Unable to resolve the template type T in call to function dol_sort_array$#' - identifier: argument.templateType - count: 1 - path: ../../htdocs/asset/tpl/depreciation_view.tpl.php - - - - message: '#^Variable \$assetdepreciationoptions might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/asset/tpl/depreciation_view.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/asset/tpl/depreciation_view.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/asset/tpl/depreciation_view.tpl.php - - message: '#^Variable \$parameters might not be defined\.$#' identifier: variable.undefined @@ -2928,12 +2604,6 @@ parameters: count: 1 path: ../../htdocs/blockedlog/class/blockedlog.class.php - - - message: '#^Variable \$aaa might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/blockedlog/class/blockedlog.class.php - - message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -3084,12 +2754,6 @@ parameters: count: 1 path: ../../htdocs/bom/class/bom.class.php - - - message: '#^Property BOM\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: \-2, position\: 1, notnull\: 1, index\: 1, comment\: ''Id''\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, notnull\: 1, default\: 1, index\: 1, position\: 5\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, noteditable\: 1, visible\: 4, position\: 10, notnull\: 1, default\: ''\(PROV\)'', \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, visible\: 1, position\: 30, notnull\: 1, searchall\: 1, showoncombobox\: ''2'', \.\.\.\}, bomtype\: array\{type\: ''integer'', label\: ''Type'', enabled\: 1, visible\: 1, position\: 33, notnull\: 1, default\: ''0'', arrayofkeyval\: array\{''Manufacturing'', ''Disassemble''\}, \.\.\.\}, fk_product\: array\{type\: ''integer\:Product…'', label\: ''Product'', picto\: ''product'', enabled\: 1, visible\: 1, position\: 35, notnull\: 1, index\: 1, \.\.\.\}, description\: array\{type\: ''text'', label\: ''Description'', enabled\: 1, visible\: \-1, position\: 60, notnull\: \-1\}, qty\: array\{type\: ''real'', label\: ''Quantity'', enabled\: 1, visible\: 1, default\: 1, position\: 55, notnull\: 1, isameasure\: 1, \.\.\.\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/bom/class/bom.class.php - - message: '#^Property BOM\:\:\$label \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -3120,12 +2784,6 @@ parameters: count: 1 path: ../../htdocs/bom/tpl/objectline_create.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/bom/tpl/objectline_create.tpl.php - - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined @@ -3144,144 +2802,24 @@ parameters: count: 1 path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$buyer might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - message: '#^Variable \$dateSelector might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 20 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$seller might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$var might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/bom/tpl/objectline_edit.tpl.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue count: 1 path: ../../htdocs/bom/tpl/objectline_title.tpl.php - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^Cannot access property \$id on mixed\.$#' - identifier: property.nonObject - count: 4 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^Cannot access property \$status on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^Cannot access property \$total_cost on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - message: '#^Property CommonDict\:\:\$label \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../htdocs/bom/tpl/objectline_view.tpl.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_agenda.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_agenda.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -3330,48 +2868,12 @@ parameters: count: 1 path: ../../htdocs/bookcal/availabilities_card.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_contact.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_contact.php - - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../htdocs/bookcal/availabilities_contact.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_document.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_document.php - - message: '#^Empty array passed to foreach\.$#' identifier: foreach.emptyArray count: 1 path: ../../htdocs/bookcal/availabilities_list.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/bookcal/availabilities_list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -3390,18 +2892,6 @@ parameters: count: 1 path: ../../htdocs/bookcal/availabilities_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_note.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/bookcal/availabilities_note.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -3522,12 +3012,6 @@ parameters: count: 1 path: ../../htdocs/bookcal/calendar_list.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/bookcal/calendar_list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -3636,12 +3120,6 @@ parameters: count: 1 path: ../../htdocs/bookcal/class/availabilities.class.php - - - message: '#^Property Availabilities\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 2, noteditable\: 1, index\: 1, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 20, notnull\: 0, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, fk_bookcal_calendar\: array\{type\: ''integer\:Calendar…'', label\: ''Calendar'', enabled\: 1, position\: 25, notnull\: 1, visible\: 1, css\: ''maxwidth500…'', csslist\: ''tdoverflowmax100''\}, description\: array\{type\: ''text'', label\: ''Description'', enabled\: 1, position\: 60, notnull\: 0, visible\: 3, validate\: 1\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0, cssview\: ''wordbreak'', validate\: 1\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0, cssview\: ''wordbreak'', validate\: 1\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2\}, tms\: array\{type\: ''timestamp'', label\: ''DateModification'', enabled\: 1, position\: 501, notnull\: 0, visible\: \-2\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/bookcal/class/availabilities.class.php - - message: '#^Property Availabilities\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -3871,7 +3349,7 @@ parameters: path: ../../htdocs/categories/class/categorie.class.php - - message: '#^Method Categorie\:\:get_full_arbo\(\) should return \-1\|array\ but returns array\\.$#' + message: '#^Method Categorie\:\:get_full_arbo\(\) should return \-1\|array\ but returns array\\.$#' identifier: return.type count: 1 path: ../../htdocs/categories/class/categorie.class.php @@ -3889,7 +3367,7 @@ parameters: path: ../../htdocs/categories/class/categorie.class.php - - message: '#^Property Categorie\:\:\$cats \(array\\) does not accept array\\.$#' + message: '#^Property Categorie\:\:\$cats \(array\\) does not accept array\\.$#' identifier: assign.propertyType count: 2 path: ../../htdocs/categories/class/categorie.class.php @@ -4488,12 +3966,6 @@ parameters: count: 1 path: ../../htdocs/comm/mailing/card.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/comm/mailing/cibles.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -4764,24 +4236,12 @@ parameters: count: 1 path: ../../htdocs/comm/propal/class/propal.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/comm/propal/class/propal.class.php - - message: '#^Property CommonObject\:\:\$mode_reglement_id \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../htdocs/comm/propal/class/propal.class.php - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/comm/propal/class/propal.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4950,12 +4410,6 @@ parameters: count: 1 path: ../../htdocs/comm/propal/note.php - - - message: '#^Variable \$title might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/comm/propal/stats/index.php - - message: '#^Unable to resolve the template type T in call to function dol_sort_array$#' identifier: argument.templateType @@ -4968,12 +4422,6 @@ parameters: count: 1 path: ../../htdocs/comm/propal/tpl/linkedobjectblock.tpl.php - - - message: '#^Variable \$id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/comm/recap-client.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -5184,18 +4632,6 @@ parameters: count: 1 path: ../../htdocs/commande/class/commande.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/commande/class/commande.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -5382,12 +4818,6 @@ parameters: count: 1 path: ../../htdocs/commande/note.php - - - message: '#^Variable \$type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/commande/stats/index.php - - message: '#^Unable to resolve the template type T in call to function dol_sort_array$#' identifier: argument.templateType @@ -5436,12 +4866,6 @@ parameters: count: 2 path: ../../htdocs/compta/bank/bankentries_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 2 - path: ../../htdocs/compta/bank/bankentries_list.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -5640,12 +5064,6 @@ parameters: count: 1 path: ../../htdocs/compta/bank/class/paymentvarious.class.php - - - message: '#^Call to function property_exists\(\) with \$this\(PaymentVarious\) and ''fk_bank'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/compta/bank/class/paymentvarious.class.php - - message: '#^Property PaymentVarious\:\:\$accountid \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -5724,12 +5142,6 @@ parameters: count: 3 path: ../../htdocs/compta/bank/list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 2 - path: ../../htdocs/compta/bank/releve.php - - message: '#^Variable \$buttonreconcile might not be defined\.$#' identifier: variable.undefined @@ -5856,42 +5268,12 @@ parameters: count: 1 path: ../../htdocs/compta/bank/various_payment/list.php - - - message: '#^Variable \$accountingaccount might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../htdocs/compta/bank/various_payment/list.php - - - - message: '#^Variable \$accountingjournal might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/bank/various_payment/list.php - - - - message: '#^Variable \$accountstatic might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/compta/bank/various_payment/list.php - - - - message: '#^Variable \$bankline might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/compta/bank/various_payment/list.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../htdocs/compta/bank/various_payment/list.php - - - message: '#^Variable \$variousstatic might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../htdocs/compta/bank/various_payment/list.php - - message: '#^Loose comparison using \=\= between ''card'' and ''card'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -5904,18 +5286,6 @@ parameters: count: 3 path: ../../htdocs/compta/cashcontrol/cashcontrol_card.php - - - message: '#^Variable \$posmodule might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/cashcontrol/cashcontrol_card.php - - - - message: '#^Variable \$terminaltouse might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/cashcontrol/cashcontrol_card.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -5947,7 +5317,7 @@ parameters: path: ../../htdocs/compta/cashcontrol/class/cashcontrol.class.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with non\-empty\-array\<\(float\|int\)\> will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/compta/cashcontrol/report.php @@ -5994,12 +5364,6 @@ parameters: count: 2 path: ../../htdocs/compta/clients.php - - - message: '#^Variable \$fileurl_avg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/deplacement/stats/index.php - - message: '#^Variable \$mesg might not be defined\.$#' identifier: variable.undefined @@ -6132,12 +5496,6 @@ parameters: count: 1 path: ../../htdocs/compta/facture/card.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/compta/facture/class/api_invoices.class.php - - message: '#^Method Invoices\:\:_validate\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -6237,17 +5595,11 @@ parameters: - message: '#^Parameter \#1 \$qty of function calcul_price_total expects float, string given\.$#' identifier: argument.type - count: 2 - path: ../../htdocs/compta/facture/class/facture-rec.class.php - - - - message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#' - identifier: argument.type count: 1 path: ../../htdocs/compta/facture/class/facture-rec.class.php - - message: '#^Parameter \#15 \$pu_devise of function calcul_price_total expects float, string given\.$#' + message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#' identifier: argument.type count: 1 path: ../../htdocs/compta/facture/class/facture-rec.class.php @@ -6261,12 +5613,6 @@ parameters: - message: '#^Parameter \#2 \$pu of function calcul_price_total expects float, string given\.$#' identifier: argument.type - count: 2 - path: ../../htdocs/compta/facture/class/facture-rec.class.php - - - - message: '#^Parameter \#3 \$remise_percent_ligne of function calcul_price_total expects float, string given\.$#' - identifier: argument.type count: 1 path: ../../htdocs/compta/facture/class/facture-rec.class.php @@ -6444,18 +5790,6 @@ parameters: count: 1 path: ../../htdocs/compta/facture/class/facture.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/compta/facture/class/facture.class.php - - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../htdocs/compta/facture/class/facture.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -6483,7 +5817,7 @@ parameters: - message: '#^Property Facture\:\:\$ref_client \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property - count: 2 + count: 1 path: ../../htdocs/compta/facture/class/facture.class.php - @@ -6660,12 +5994,6 @@ parameters: count: 1 path: ../../htdocs/compta/facture/list.php - - - message: '#^Variable \$numprlv might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -6696,48 +6024,12 @@ parameters: count: 1 path: ../../htdocs/compta/facture/prelevement.php - - - message: '#^Variable \$isdraft might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/facture/prelevement.php - - message: '#^Variable \$num might not be defined\.$#' identifier: variable.undefined count: 2 path: ../../htdocs/compta/facture/prelevement.php - - - message: '#^Variable \$cat_label might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/stats/index.php - - - - message: '#^Variable \$cat_type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/stats/index.php - - - - message: '#^Variable \$fileurl_avg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/stats/index.php - - - - message: '#^Variable \$fileurlamount might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/stats/index.php - - - - message: '#^Variable \$fileurlnb might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/facture/stats/index.php - - message: '#^Variable \$type might not be defined\.$#' identifier: variable.undefined @@ -6786,12 +6078,6 @@ parameters: count: 2 path: ../../htdocs/compta/journal/purchasesjournal.php - - - message: '#^Variable \$tabfac might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/journal/purchasesjournal.php - - message: '#^Variable \$tabht might not be defined\.$#' identifier: variable.undefined @@ -6828,12 +6114,6 @@ parameters: count: 3 path: ../../htdocs/compta/journal/sellsjournal.php - - - message: '#^Variable \$tabfac might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/journal/sellsjournal.php - - message: '#^Variable \$tabht might not be defined\.$#' identifier: variable.undefined @@ -6864,12 +6144,6 @@ parameters: count: 1 path: ../../htdocs/compta/journal/sellsjournal.php - - - message: '#^Variable \$accountline might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/card.php - - message: '#^Variable \$morehtmlref might not be defined\.$#' identifier: variable.undefined @@ -6912,54 +6186,6 @@ parameters: count: 2 path: ../../htdocs/compta/localtax/class/localtax.class.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$find might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$period might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$q might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$replace might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$x_coll_sum might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - - - message: '#^Variable \$x_paye_sum might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/localtax/clients.php - - message: '#^Variable \$arrayofselected might not be defined\.$#' identifier: variable.undefined @@ -7002,54 +6228,6 @@ parameters: count: 2 path: ../../htdocs/compta/paiement.php - - - message: '#^Variable \$multicurrency_creditnotes might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$multicurrency_deposits might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$multicurrency_payment might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$multicurrency_remaintopay might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$paiement_id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$sign might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$text might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/compta/paiement.php - - - - message: '#^Variable \$tootltiponmulticurrencyfullamount might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/paiement.php - - message: '#^Variable \$marginInfo might not be defined\.$#' identifier: variable.undefined @@ -7062,12 +6240,6 @@ parameters: count: 2 path: ../../htdocs/compta/paiement/card.php - - - message: '#^Variable \$site_account_payment might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/paiement/card.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -7080,12 +6252,6 @@ parameters: count: 3 path: ../../htdocs/compta/paiement/cheque/card.php - - - message: '#^Variable \$paiement might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/paiement/cheque/card.php - - message: '#^Call to function method_exists\(\) with \$this\(RemiseCheque\) and ''LibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7212,12 +6378,6 @@ parameters: count: 4 path: ../../htdocs/compta/paiement/class/cpaiement.class.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/compta/paiement/class/paiement.class.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -7272,12 +6432,6 @@ parameters: count: 1 path: ../../htdocs/compta/paiement_charge.php - - - message: '#^Variable \$sumpaid might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/compta/paiement_charge.php - - message: '#^Comparison operation "\>" between 1 and 1 is always false\.$#' identifier: greater.alwaysFalse @@ -7290,18 +6444,6 @@ parameters: count: 2 path: ../../htdocs/compta/paiement_vat.php - - - message: '#^Variable \$sumpaid might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/compta/paiement_vat.php - - - - message: '#^Variable \$outputlangs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/payment_vat/card.php - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -7314,18 +6456,6 @@ parameters: count: 1 path: ../../htdocs/compta/prelevement/card.php - - - message: '#^Variable \$thirdparty might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/prelevement/card.php - - - - message: '#^Variable \$userSalary might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/prelevement/card.php - - message: '#^Call to function method_exists\(\) with \$this\(BonPrelevement\) and ''LibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7422,18 +6552,6 @@ parameters: count: 1 path: ../../htdocs/compta/prelevement/demandes.php - - - message: '#^Variable \$invoicetmpcustomer might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/prelevement/factures.php - - - - message: '#^Variable \$invoicetmpsupplier might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/prelevement/factures.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -7446,30 +6564,6 @@ parameters: count: 1 path: ../../htdocs/compta/prelevement/orders_list.php - - - message: '#^Variable \$nbignored might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/prelevement/orders_list.php - - - - message: '#^Variable \$nbok might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/prelevement/orders_list.php - - - - message: '#^Variable \$nbtotal might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/compta/prelevement/stats.php - - - - message: '#^Variable \$total might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/compta/prelevement/stats.php - - message: '#^Offset ''checked'' on array\{label\: ''Date'', checked\: 1\} in empty\(\) always exists and is not falsy\.$#' identifier: empty.offset @@ -7488,74 +6582,32 @@ parameters: count: 2 path: ../../htdocs/compta/recap-compta.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/clientfourn.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/resultat/clientfourn.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/clientfourn.php - - - - message: '#^Variable \$period might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/clientfourn.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/resultat/clientfourn.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/index.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/resultat/index.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/index.php - - - - message: '#^Variable \$period might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/index.php - - - - message: '#^Variable \$periodlink might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/index.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined - count: 6 + count: 5 path: ../../htdocs/compta/resultat/index.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\\}\> will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with non\-empty\-array\\}\> will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/compta/resultat/result.php @@ -7566,18 +6618,6 @@ parameters: count: 1 path: ../../htdocs/compta/resultat/result.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/result.php - - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/result.php - - message: '#^Variable \$code might not be defined\.$#' identifier: variable.undefined @@ -7590,18 +6630,6 @@ parameters: count: 1 path: ../../htdocs/compta/resultat/result.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/result.php - - - - message: '#^Variable \$period might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/resultat/result.php - - message: '#^Variable \$sommes in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -7812,30 +6840,12 @@ parameters: count: 1 path: ../../htdocs/compta/stats/cabyprodserv.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyprodserv.php - - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyprodserv.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/stats/cabyprodserv.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyprodserv.php - - message: '#^Variable \$searchCategorySocieteList in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -7866,30 +6876,12 @@ parameters: count: 1 path: ../../htdocs/compta/stats/cabyuser.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyuser.php - - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyuser.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/stats/cabyuser.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/cabyuser.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -7902,30 +6894,12 @@ parameters: count: 1 path: ../../htdocs/compta/stats/casoc.php - - - message: '#^Variable \$builddate might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/casoc.php - - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/casoc.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/stats/casoc.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/casoc.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -7944,18 +6918,6 @@ parameters: count: 1 path: ../../htdocs/compta/stats/index.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/index.php - - - - message: '#^Variable \$periodlink might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/index.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -7974,18 +6936,6 @@ parameters: count: 1 path: ../../htdocs/compta/stats/supplier_turnover.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover.php - - - - message: '#^Variable \$periodlink might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -7998,30 +6948,12 @@ parameters: count: 1 path: ../../htdocs/compta/stats/supplier_turnover_by_prodserv.php - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover_by_prodserv.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/stats/supplier_turnover_by_prodserv.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover_by_prodserv.php - - - - message: '#^Variable \$q might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover_by_prodserv.php - - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -8052,24 +6984,12 @@ parameters: count: 1 path: ../../htdocs/compta/stats/supplier_turnover_by_thirdparty.php - - - message: '#^Variable \$calcmode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover_by_thirdparty.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/compta/stats/supplier_turnover_by_thirdparty.php - - - message: '#^Variable \$name might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/stats/supplier_turnover_by_thirdparty.php - - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -8100,18 +7020,6 @@ parameters: count: 1 path: ../../htdocs/compta/tva/card.php - - - message: '#^Variable \$accountline might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/compta/tva/card.php - - - - message: '#^Variable \$resteapayer might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/compta/tva/card.php - - message: '#^Property PaymentVAT\:\:\$amount \(float\|int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -8250,12 +7158,6 @@ parameters: count: 8 path: ../../htdocs/compta/tva/clients.php - - - message: '#^Variable \$my_coll_thirdpartyid might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/compta/tva/clients.php - - message: '#^Variable \$year_current might not be defined\.$#' identifier: variable.undefined @@ -8304,12 +7206,6 @@ parameters: count: 3 path: ../../htdocs/compta/tva/payments.php - - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/compta/tva/quadri_detail.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -8328,12 +7224,6 @@ parameters: count: 1 path: ../../htdocs/compta/tva/quadri_detail.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/compta/tva/quadri_detail.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -8406,60 +7296,6 @@ parameters: count: 1 path: ../../htdocs/contact/ajax/contact.php - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 24 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 24 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php - - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 31 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 29 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php - - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 34 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 32 - path: ../../htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -8496,12 +7332,6 @@ parameters: count: 1 path: ../../htdocs/contact/card.php - - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/contact/class/contact.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Contact\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -8538,33 +7368,9 @@ parameters: count: 3 path: ../../htdocs/contact/class/contact.class.php - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(Contact\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/contact/class/contact.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(Contact\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/contact/class/contact.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(Contact\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/contact/class/contact.class.php - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property - count: 2 - path: ../../htdocs/contact/class/contact.class.php - - - - message: '#^Property Contact\:\:\$email \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property count: 1 path: ../../htdocs/contact/class/contact.class.php @@ -8580,12 +7386,6 @@ parameters: count: 1 path: ../../htdocs/contact/class/contact.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/contact/class/contact.class.php - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -8598,12 +7398,6 @@ parameters: count: 1 path: ../../htdocs/contact/consumption.php - - - message: '#^Variable \$documentstaticline might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/contact/consumption.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -8826,12 +7620,6 @@ parameters: count: 1 path: ../../htdocs/contrat/class/contrat.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/contrat/class/contrat.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -9054,12 +7842,6 @@ parameters: count: 1 path: ../../htdocs/contrat/tpl/linkedobjectblock.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/actions_addupdatedelete.inc.php - - message: '#^Loose comparison using \=\= between 1 and 0 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -9193,7 +7975,7 @@ parameters: path: ../../htdocs/core/actions_linkedfiles.inc.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/core/actions_massactions.inc.php @@ -9210,12 +7992,6 @@ parameters: count: 2 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 2 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Expression "\<\<\<''EOPHAN''…" on a separate line does not do anything\.$#' identifier: expr.resultUnused @@ -9246,12 +8022,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 14 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$from might not be defined\.$#' identifier: variable.undefined @@ -9270,12 +8040,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -9288,12 +8052,6 @@ parameters: count: 2 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$pagecount might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$permissiontoadd might not be defined\.$#' identifier: variable.undefined @@ -9312,12 +8070,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$classfile might not be defined\.$#' identifier: variable.undefined @@ -9336,12 +8088,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_sendmails.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/actions_sendmails.inc.php - - message: '#^Parameter \#1 \$filenb of function dol_remove_file_process expects int, array\\|string given\.$#' identifier: argument.type @@ -9378,12 +8124,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_sendmails.inc.php - - - message: '#^Variable \$sendtosocid might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/actions_sendmails.inc.php - - message: '#^Variable \$thirdparty might not be defined\.$#' identifier: variable.undefined @@ -9402,12 +8142,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_setmoduleoptions.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/actions_setmoduleoptions.inc.php - - message: '#^Variable \$modulepart might not be defined\.$#' identifier: variable.undefined @@ -9426,12 +8160,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_setnotes.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/ajax/ajaxdirpreview.php - - message: '#^Loose comparison using \=\= between ''directory'' and ''directory'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -9480,12 +8208,6 @@ parameters: count: 1 path: ../../htdocs/core/ajax/ajaxdirpreview.php - - - message: '#^Property User\:\:\$lastname \(string\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: ../../htdocs/core/ajax/ajaxdirtree.php - - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined @@ -9498,12 +8220,6 @@ parameters: count: 2 path: ../../htdocs/core/ajax/ajaxdirtree.php - - - message: '#^Variable \$fullpathpreopened might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/ajax/ajaxdirtree.php - - message: '#^Variable \$module might not be defined\.$#' identifier: variable.undefined @@ -9576,12 +8292,6 @@ parameters: count: 1 path: ../../htdocs/core/ajax/selectobject.php - - - message: '#^Variable \$objecttmp might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/ajax/selectobject.php - - message: '#^Constructor of class box_accountancy_last_manual_entries has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9600,24 +8310,12 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_actions.php - - - message: '#^Variable \$nblines might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/boxes/box_actions.php - - message: '#^Constructor of class box_actions_future has an unused parameter \$param\.$#' identifier: constructor.unusedParameter count: 1 path: ../../htdocs/core/boxes/box_actions_future.php - - - message: '#^Variable \$nblines might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/boxes/box_actions_future.php - - message: '#^Constructor of class box_activity has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9726,12 +8424,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_dolibarr_state_board.php - - - message: '#^Property box_external_rss\:\:\$paramdef has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/boxes/box_external_rss.php - - message: '#^Constructor of class box_factures has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9828,12 +8520,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_graph_invoices_supplier_permonth.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_graph_invoices_supplier_permonth.php - - message: '#^Constructor of class box_graph_nb_ticket_last_x_days has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9870,12 +8556,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_graph_orders_permonth.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_graph_orders_permonth.php - - message: '#^Constructor of class box_graph_orders_supplier_permonth has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9894,12 +8574,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_graph_orders_supplier_permonth.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_graph_orders_supplier_permonth.php - - message: '#^Comparison operation "\>" between 0 and 0 is always false\.$#' identifier: greater.alwaysFalse @@ -9918,30 +8592,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_graph_product_distribution.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_graph_product_distribution.php - - - - message: '#^Variable \$px1 might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/boxes/box_graph_product_distribution.php - - - - message: '#^Variable \$px2 might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/boxes/box_graph_product_distribution.php - - - - message: '#^Variable \$px3 might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/boxes/box_graph_product_distribution.php - - message: '#^Constructor of class box_graph_propales_permonth has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -9954,12 +8604,6 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_graph_propales_permonth.php - - - message: '#^Variable \$mesg might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_graph_propales_permonth.php - - message: '#^Constructor of class box_graph_ticket_by_severity has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -10068,24 +8712,12 @@ parameters: count: 1 path: ../../htdocs/core/boxes/box_project.php - - - message: '#^Variable \$num might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_project.php - - message: '#^Constructor of class box_project_opportunities has an unused parameter \$param\.$#' identifier: constructor.unusedParameter count: 1 path: ../../htdocs/core/boxes/box_project_opportunities.php - - - message: '#^Variable \$num might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/boxes/box_project_opportunities.php - - message: '#^Constructor of class box_propales has an unused parameter \$param\.$#' identifier: constructor.unusedParameter @@ -10662,24 +9294,6 @@ parameters: count: 1 path: ../../htdocs/core/class/commonorder.class.php - - - message: '#^Property CommonOrderLine\:\:\$localtax1_type has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/class/commonorder.class.php - - - - message: '#^Property CommonOrderLine\:\:\$localtax2_type has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/class/commonorder.class.php - - - - message: '#^Property CommonOrderLine\:\:\$price has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/class/commonorder.class.php - - message: '#^Parameter \#2 \$pt of method CommonStickerGenerator\:\:Set_Char_Size\(\) expects int, float given\.$#' identifier: argument.type @@ -11226,12 +9840,6 @@ parameters: count: 2 path: ../../htdocs/core/class/dolgraph.class.php - - - message: '#^Property EmailSenderProfile\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', visible\: \-1, enabled\: 1, position\: 1, notnull\: 1, index\: 1, comment\: ''Id''\}, entity\: array\{type\: ''integer'', label\: ''Entity'', visible\: \-1, enabled\: 1, position\: 20, notnull\: 1, index\: 1\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', visible\: 1, enabled\: 1, position\: 30, notnull\: 1\}, email\: array\{type\: ''varchar\(255\)'', label\: ''Email'', visible\: 1, enabled\: 1, position\: 40, notnull\: \-1\}, private\: array\{type\: ''integer\:User\:user…'', label\: ''User'', visible\: 1, enabled\: 1, position\: 50, default\: ''0'', notnull\: 1\}, signature\: array\{type\: ''html'', label\: ''Signature'', visible\: 3, enabled\: 1, position\: 400, notnull\: \-1, index\: 1\}, position\: array\{type\: ''integer'', label\: ''Position'', visible\: 1, enabled\: 1, position\: 405, notnull\: \-1, index\: 1\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', visible\: \-1, enabled\: 1, position\: 500, notnull\: 1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/core/class/emailsenderprofile.class.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -11616,12 +10224,6 @@ parameters: count: 1 path: ../../htdocs/core/class/html.formorder.class.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/class/html.formother.class.php - - message: '#^Parameter \#3 \$zone of static method InfoBox\:\:listBoxes\(\) expects int, string given\.$#' identifier: argument.type @@ -11941,7 +10543,7 @@ parameters: path: ../../htdocs/core/class/notify.class.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/core/class/openid.class.php @@ -12144,12 +10746,6 @@ parameters: count: 1 path: ../../htdocs/core/commonfieldsinexport.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/commonfieldsinexport.inc.php - - message: '#^Variable \$r might not be defined\.$#' identifier: variable.undefined @@ -12222,12 +10818,6 @@ parameters: count: 2 path: ../../htdocs/core/customreports.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/customreports.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -12402,12 +10992,6 @@ parameters: count: 1 path: ../../htdocs/core/extrafieldsinexport.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/extrafieldsinexport.inc.php - - message: '#^Variable \$conf might not be defined\.$#' identifier: variable.undefined @@ -12594,12 +11178,6 @@ parameters: count: 1 path: ../../htdocs/core/lib/company.lib.php - - - message: '#^Property Contact\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 0\|1, visible\: 0\|1, position\: 1\}, name\: array\{type\: ''varchar\(128\)'', label\: ''Name'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 1, index\: 1, position\: 10, \.\.\.\}, poste\: array\{type\: ''varchar\(128\)'', label\: ''PostOrFunction'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 2, index\: 1, position\: 20\}, address\: array\{type\: ''varchar\(128\)'', label\: ''Address'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 3, index\: 1, position\: 30\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 0\|1, visible\: 3, position\: 35\}, role\: array\{type\: ''checkbox'', label\: ''Role'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 4, index\: 1, position\: 40\}, birthday\: array\{type\: ''date'', label\: ''Birthday'', enabled\: 1, visible\: \-1, notnull\: 0, position\: 45\}, statut\: array\{type\: ''integer'', label\: ''Status'', enabled\: 1, visible\: 1, notnull\: 1, default\: ''0'', index\: 1, position\: 50, \.\.\.\}\}\.$#' - identifier: assign.propertyType - count: 3 - path: ../../htdocs/core/lib/company.lib.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -13056,30 +11634,6 @@ parameters: count: 1 path: ../../htdocs/core/lib/project.lib.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 5 - path: ../../htdocs/core/lib/project.lib.php - - - - message: '#^Parameter \#1 \$inc of function projectLinesPerDay expects string, \(float\|int\) given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/core/lib/project.lib.php - - - - message: '#^Parameter \#1 \$inc of function projectLinesPerMonth expects string, \(float\|int\) given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/core/lib/project.lib.php - - - - message: '#^Parameter \#1 \$inc of function projectLinesPerWeek expects string, \(float\|int\) given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/core/lib/project.lib.php - - message: '#^Property Task\:\:\$progress \(int\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -13704,12 +12258,6 @@ parameters: count: 1 path: ../../htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php - - - message: '#^Variable \$outputlangsbis might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php - - message: '#^Property mod_asset_standard\:\:\$prefix has no type specified\.$#' identifier: missingType.property @@ -15055,7 +13603,7 @@ parameters: path: ../../htdocs/core/modules/hrm/mod_evaluation_standard.php - - message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with non\-empty\-list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/core/modules/import/import_csv.modules.php @@ -15270,12 +13818,6 @@ parameters: count: 2 path: ../../htdocs/core/modules/member/doc/pdf_standard_member.class.php - - - message: '#^Parameter \#1 \$substitutionarray of function complete_substitutions_array expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/core/modules/member/doc/pdf_standard_member.class.php - - message: '#^Parameter \#6 \$epaisseur of method CommonStickerGenerator\:\:_Croix\(\) expects int, float given\.$#' identifier: argument.type @@ -16284,54 +14826,18 @@ parameters: count: 1 path: ../../htdocs/core/modules/oauth/generic_oauthcallback.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/oauth/github_oauthcallback.php - - message: '#^Variable \$state might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/core/modules/oauth/github_oauthcallback.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/oauth/microsoft2_oauthcallback.php - - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/oauth/microsoft_oauthcallback.php - - message: '#^Strict comparison using \=\=\= between null and null will always evaluate to true\.$#' identifier: identical.alwaysTrue count: 2 path: ../../htdocs/core/modules/oauth/stripelive_oauthcallback.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/oauth/stripelive_oauthcallback.php - - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/oauth/stripetest_oauthcallback.php - - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/modules/openid_connect/callback.php - - message: '#^Property mod_payment_cicada\:\:\$prefix has no type specified\.$#' identifier: missingType.property @@ -17814,12 +16320,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/admin_extrafields_view.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/advtarget.tpl.php - - message: '#^Variable \$id might not be defined\.$#' identifier: variable.undefined @@ -17850,12 +16350,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/bloc_showhide.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/card_presend.tpl.php - - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined @@ -17958,12 +16452,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/contacts.tpl.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -18048,24 +16536,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/extrafields_add.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 2 - path: ../../htdocs/core/tpl/extrafields_edit.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/extrafields_list_array_fields.tpl.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -18240,12 +16710,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/filemanager.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/formlayoutai.tpl.php - - message: '#^Variable \$showlinktoai might not be defined\.$#' identifier: variable.undefined @@ -18282,42 +16746,6 @@ parameters: count: 2 path: ../../htdocs/core/tpl/list_print_total.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/login.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/massactions_pre.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - - - message: '#^Variable \$usercancreate might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/tpl/object_currency_amount.tpl.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -18420,12 +16848,6 @@ parameters: count: 4 path: ../../htdocs/core/tpl/objectline_create.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/objectline_edit.tpl.php - - message: '#^Variable \$buyer might not be defined\.$#' identifier: variable.undefined @@ -18480,12 +16902,6 @@ parameters: count: 1 path: ../../htdocs/core/tpl/objectline_title.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/objectline_view.tpl.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -18522,234 +16938,12 @@ parameters: count: 3 path: ../../htdocs/core/tpl/objectlinked_lineimport.tpl.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 29 - path: ../../htdocs/core/tpl/onlinepaymentlinks.tpl.php - - - - message: '#^Variable \$servicename might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../htdocs/core/tpl/onlinepaymentlinks.tpl.php - - message: '#^Variable \$langs might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/core/tpl/originproductline.tpl.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$disabled might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$dol_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$focus_element might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 10 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$mode might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$urllogo might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$username might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordforgotten.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$disabled might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$dol_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$focus_element might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 18 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$mode might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$newpass1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$newpass2 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$passworduidhash might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$setnewpassword might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$urllogo might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$username might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/passwordreset.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/tpl/resource_add.tpl.php - - - - message: '#^Variable \$element might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_add.tpl.php - - - - message: '#^Variable \$element_id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_add.tpl.php - - - - message: '#^Variable \$element_ref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_add.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/tpl/resource_add.tpl.php - - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$element might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$element_id might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$linked_resources might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$mode might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - - - message: '#^Variable \$resource_type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/core/tpl/resource_view.tpl.php - - message: '#^Variable \$shippingline might not be defined\.$#' identifier: variable.undefined @@ -18786,12 +16980,6 @@ parameters: count: 2 path: ../../htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 2 - path: ../../htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php - - message: '#^Variable \$old_MAIN_MAIL_AUTOCOPY_TO might not be defined\.$#' identifier: variable.undefined @@ -19002,18 +17190,6 @@ parameters: count: 4 path: ../../htdocs/cron/class/cronjob.class.php - - - message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/cron/class/cronjob.class.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -19032,12 +17208,6 @@ parameters: count: 1 path: ../../htdocs/cron/list.php - - - message: '#^Variable \$head might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/cron/list.php - - message: '#^Variable \$texttoshow might not be defined\.$#' identifier: variable.undefined @@ -19170,42 +17340,6 @@ parameters: count: 1 path: ../../htdocs/document.php - - - message: '#^Variable \$hidedesc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/don/card.php - - - - message: '#^Variable \$hidedetails might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/don/card.php - - - - message: '#^Variable \$hideref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/don/card.php - - - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/don/card.php - - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../htdocs/don/card.php - - - - message: '#^Variable \$totalpaid might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/don/card.php - - message: '#^Method Donations\:\:_validate\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -19254,69 +17388,9 @@ parameters: count: 1 path: ../../htdocs/don/class/api_donations.class.php - - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Don\) and ''LibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Don\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Don\) and ''amount'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Don\) and ''date'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/don/class/don.class.php - - message: '#^Call to function property_exists\(\) with \$this\(Don\) and ''societe'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 2 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(Don\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(Don\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(Don\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/don/class/don.class.php - - - - message: '#^Property Don\:\:\$email \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property count: 1 path: ../../htdocs/don/class/don.class.php @@ -19326,12 +17400,6 @@ parameters: count: 1 path: ../../htdocs/don/class/don.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/don/class/don.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -19692,12 +17760,6 @@ parameters: count: 1 path: ../../htdocs/ecm/file_card.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/ecm/file_card.php - - message: '#^Variable \$module might not be defined\.$#' identifier: variable.undefined @@ -19776,12 +17838,6 @@ parameters: count: 1 path: ../../htdocs/emailcollector/class/emailcollector.class.php - - - message: '#^Property EmailCollector\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', visible\: 2, enabled\: 1, position\: 1, notnull\: 1, index\: 1\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, default\: 1, notnull\: 1, index\: 1, position\: 20\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 1, index\: 1, position\: 10, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', visible\: 1, enabled\: 1, position\: 30, notnull\: \-1, searchall\: 1, help\: ''Example\: My Email…'', \.\.\.\}, description\: array\{type\: ''text'', label\: ''Description'', visible\: \-1, enabled\: 1, position\: 60, notnull\: \-1, cssview\: ''small'', csslist\: ''small…''\}, host\: array\{type\: ''varchar\(255\)'', label\: ''EMailHost'', visible\: 1, enabled\: 1, position\: 90, notnull\: 1, searchall\: 1, comment\: ''IMAP server'', \.\.\.\}, port\: array\{type\: ''varchar\(10\)'', label\: ''EMailHostPort'', visible\: 1, enabled\: 1, position\: 91, notnull\: 1, searchall\: 0, comment\: ''IMAP server port'', \.\.\.\}, imap_encryption\: array\{type\: ''varchar\(16\)'', label\: ''ImapEncryption'', visible\: \-1, enabled\: 1, position\: 92, searchall\: 0, comment\: ''IMAP encryption'', help\: ''ImapEncryptionHelp'', \.\.\.\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/emailcollector/class/emailcollector.class.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -19806,18 +17862,6 @@ parameters: count: 1 path: ../../htdocs/emailcollector/class/emailcollector.class.php - - - message: '#^Property EmailCollectorAction\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: \-1, position\: 1, notnull\: 1, index\: 1, comment\: ''Id''\}, fk_emailcollector\: array\{type\: ''integer'', label\: ''Id of emailcollector'', foreignkey\: ''emailcollector\.rowid''\}, type\: array\{type\: ''varchar\(128\)'', label\: ''Type'', enabled\: 1, visible\: 1, position\: 10, notnull\: 1, index\: 1\}, actionparam\: array\{type\: ''text'', label\: ''ParamForAction'', enabled\: 1, visible\: 1, position\: 40, notnull\: \-1\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, visible\: \-2, position\: 500, notnull\: 1\}, tms\: array\{type\: ''timestamp'', label\: ''DateModification'', enabled\: 1, visible\: \-2, position\: 501, notnull\: 1\}, fk_user_creat\: array\{type\: ''integer'', label\: ''UserAuthor'', enabled\: 1, visible\: \-2, position\: 510, notnull\: 1, foreignkey\: ''llx_user\.rowid''\}, fk_user_modif\: array\{type\: ''integer'', label\: ''UserModif'', enabled\: 1, visible\: \-2, position\: 511, notnull\: \-1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/emailcollector/class/emailcollectoraction.class.php - - - - message: '#^Property EmailCollectorFilter\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: \-1, position\: 1, notnull\: 1, index\: 1, comment\: ''Id''\}, fk_emailcollector\: array\{type\: ''integer'', label\: ''Id of emailcollector'', foreignkey\: ''emailcollector\.rowid''\}, type\: array\{type\: ''varchar\(128\)'', label\: ''Type'', enabled\: 1, visible\: 1, position\: 10, notnull\: 1\}, rulevalue\: array\{type\: ''varchar\(255\)'', label\: ''ValueOfRule'', enabled\: 1, visible\: 1, position\: 30, notnull\: \-1, help\: ''Value of Rule''\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, visible\: \-2, position\: 500, notnull\: 1\}, tms\: array\{type\: ''timestamp'', label\: ''DateModification'', enabled\: 1, visible\: \-2, position\: 501, notnull\: 1\}, fk_user_creat\: array\{type\: ''integer'', label\: ''UserAuthor'', enabled\: 1, visible\: \-2, position\: 510, notnull\: 1, foreignkey\: ''llx_user\.rowid''\}, fk_user_modif\: array\{type\: ''integer'', label\: ''UserModif'', enabled\: 1, visible\: \-2, position\: 511, notnull\: \-1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/emailcollector/class/emailcollectorfilter.class.php - - message: '#^Call to function method_exists\(\) with \$this\(ConferenceOrBooth\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -19866,12 +17910,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - message: '#^Property ConferenceOrBooth\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{id\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''integer'', label\: ''Ref'', enabled\: 1, position\: 1, notnull\: 1, visible\: 2, noteditable\: 1, index\: 1, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 1, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, fk_project\: array\{type\: ''integer\:Project…'', label\: ''Project'', enabled\: ''isModEnabled\(…'', position\: 52, notnull\: \-1, visible\: 1, index\: 1, picto\: ''project'', \.\.\.\}, fk_soc\: array\{type\: ''integer\:Societe…'', label\: ''ThirdParty'', enabled\: ''\$conf\-\>societe\-…'', position\: 50, notnull\: \-1, visible\: 1, index\: 1, help\: ''OrganizationEventLi…'', \.\.\.\}, note\: array\{type\: ''html'', label\: ''Description'', enabled\: 1, position\: 60, notnull\: 0, visible\: 3\}, fk_action\: array\{type\: ''sellist\:c…'', label\: ''ConferenceOrBoothFo…'', enabled\: 1, position\: 60, notnull\: 1, visible\: 1, css\: ''width200'', csslist\: ''tdoverflowmax100''\}, datep\: array\{type\: ''datetime'', label\: ''DateStart'', enabled\: 1, position\: 70, notnull\: 0, visible\: 1, showoncombobox\: ''2''\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/eventorganization/class/conferenceorbooth.class.php - - message: '#^Property ConferenceOrBooth\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -19926,12 +17964,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - message: '#^Property CommonObject\:\:\$name \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - message: '#^Property ConferenceOrBoothAttendee\:\:\$lastname \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -19992,12 +18024,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/conferenceorbooth_contact.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/eventorganization/conferenceorbooth_contact.php - - message: '#^Variable \$mode might not be defined\.$#' identifier: variable.undefined @@ -20028,12 +18054,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/conferenceorbooth_document.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/eventorganization/conferenceorbooth_document.php - - message: '#^Comparison operation "\>" between 0 and 0 is always false\.$#' identifier: greater.alwaysFalse @@ -20088,12 +18108,6 @@ parameters: count: 4 path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php - - message: '#^Variable \$text might not be defined\.$#' identifier: variable.undefined @@ -20130,12 +18144,6 @@ parameters: count: 2 path: ../../htdocs/eventorganization/conferenceorboothattendee_list.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -20166,12 +18174,6 @@ parameters: count: 1 path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - message: '#^Variable \$from might not be defined\.$#' identifier: variable.undefined @@ -20400,12 +18402,6 @@ parameters: count: 2 path: ../../htdocs/expedition/class/expedition.class.php - - - message: '#^Property Expedition\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/expedition/class/expedition.class.php - - message: '#^Property Expedition\:\:\$ref_customer \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -21774,18 +19770,6 @@ parameters: count: 1 path: ../../htdocs/fourn/class/fournisseur.commande.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/fourn/class/fournisseur.commande.class.php - - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/fourn/class/fournisseur.commande.class.php - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -22020,18 +20004,6 @@ parameters: count: 1 path: ../../htdocs/fourn/class/fournisseur.facture.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/fourn/class/fournisseur.facture.class.php - - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/fourn/class/fournisseur.facture.class.php - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -22224,12 +20196,6 @@ parameters: count: 1 path: ../../htdocs/fourn/class/fournisseur.product.class.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/fourn/class/paiementfourn.class.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -22380,42 +20346,6 @@ parameters: count: 1 path: ../../htdocs/fourn/commande/document.php - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus4 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus9 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/fourn/commande/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -22449,7 +20379,7 @@ parameters: - message: '#^Variable \$billed might not be defined\.$#' identifier: variable.undefined - count: 2 + count: 1 path: ../../htdocs/fourn/commande/list.php - @@ -22800,114 +20730,18 @@ parameters: count: 1 path: ../../htdocs/fourn/facture/paiement.php - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 2 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$formquestion might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/facture/paiement.php - - message: '#^Variable \$moreforfilter might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/fourn/facture/paiement.php - - - message: '#^Variable \$multicurrency_creditnotes might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$multicurrency_deposits might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$multicurrency_payment might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$multicurrency_remaintopay might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$objcanvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$ref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$sign might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/fourn/facture/paiement.php - - - - message: '#^Variable \$text might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/fourn/facture/paiement.php - - message: '#^Variable \$obj might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/fourn/facture/rapport.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -23025,42 +20859,6 @@ parameters: - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse - count: 2 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 8 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$canread might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$endhalfdaykey might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/holiday/card.php - - - - message: '#^Variable \$starthalfdaykey might not be defined\.$#' - identifier: variable.undefined count: 1 path: ../../htdocs/holiday/card.php @@ -23334,12 +21132,6 @@ parameters: count: 1 path: ../../htdocs/hrm/class/evaluation.class.php - - - message: '#^Property Evaluation\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 20, notnull\: 1, visible\: 4, noteditable\: 1, default\: ''\(PROV\)'', \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 0, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, description\: array\{type\: ''text'', label\: ''Description'', enabled\: 1, position\: 60, notnull\: 0, visible\: 3\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2\}, tms\: array\{type\: ''timestamp'', label\: ''DateModification'', enabled\: 1, position\: 501, notnull\: 0, visible\: \-2\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/hrm/class/evaluation.class.php - - message: '#^Property Evaluation\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -23784,12 +21576,6 @@ parameters: count: 2 path: ../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - message: '#^Variable \$colwidth might not be defined\.$#' identifier: variable.undefined @@ -24042,12 +21828,6 @@ parameters: count: 1 path: ../../htdocs/hrm/skill_tab.php - - - message: '#^Variable \$head might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/hrm/skill_tab.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -24957,7 +22737,7 @@ parameters: - message: '#^Variable \$groupby might not be defined\.$#' identifier: variable.undefined - count: 2 + count: 1 path: ../../htdocs/intracommreport/list.php - @@ -25116,48 +22896,6 @@ parameters: count: 1 path: ../../htdocs/knowledgemanagement/knowledgerecord_list.php - - - message: '#^Variable \$staytopay might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/loan/card.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Loan\) and ''LibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Loan\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Loan\) and ''capital'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Loan\) and ''dateend'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Loan\) and ''datestart'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - - - message: '#^Parameter \#2 \$alreadypaid of method Loan\:\:getLibStatut\(\) expects int, float given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/loan/class/loan.class.php - - message: '#^Property Loan\:\:\$account_capital \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -25302,36 +23040,6 @@ parameters: count: 3 path: ../../htdocs/loan/class/paymentloan.class.php - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/document.php - - - - message: '#^Variable \$morehtmlright might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/document.php - - - - message: '#^Variable \$search_all might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/list.php - - - - message: '#^Variable \$formproject might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/note.php - - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/note.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -25380,12 +23088,6 @@ parameters: count: 4 path: ../../htdocs/loan/payment/payment.php - - - message: '#^Variable \$maxlength might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/loan/schedule.php - - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -25603,31 +23305,7 @@ parameters: path: ../../htdocs/master.inc.php - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_url_root_alt might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/master.inc.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/master.inc.php - - - - message: '#^Variable \$head might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/modulebuilder/admin/setup.php - - - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/modulebuilder/index.php @@ -25950,12 +23628,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/class/myobject.class.php - - - message: '#^Property MyObject\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 20, notnull\: 1, visible\: 1, index\: 1, searchall\: 1, \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 0, visible\: 1, alwayseditable\: ''1'', searchall\: 1, \.\.\.\}, amount\: array\{type\: ''price'', label\: ''Amount'', enabled\: 1, position\: 40, notnull\: 0, visible\: 1, default\: ''null'', isameasure\: 1, \.\.\.\}, qty\: array\{type\: ''real'', label\: ''Qty'', enabled\: 1, position\: 45, notnull\: 0, visible\: 1, default\: ''0'', isameasure\: 1, \.\.\.\}, fk_soc\: array\{type\: ''integer\:Societe…'', label\: ''ThirdParty'', picto\: ''company'', enabled\: ''isModEnabled\(…'', position\: 50, notnull\: \-1, visible\: 1, index\: 1, \.\.\.\}, fk_project\: array\{type\: ''integer\:Project…'', label\: ''Project'', picto\: ''project'', enabled\: ''isModEnabled\(…'', position\: 52, notnull\: \-1, visible\: ''\-1'', index\: 1, \.\.\.\}, description\: array\{type\: ''text'', label\: ''Description'', enabled\: 1, position\: 60, notnull\: 0, visible\: ''3'', validate\: 1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/modulebuilder/template/class/myobject.class.php - - message: '#^Property MyObject\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -26016,12 +23688,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - - message: '#^Parameter \#3 \$tab_height of method pdf_standard_myobject\:\:_tableau\(\) expects int, float given\.$#' - identifier: argument.type - count: 6 - path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - message: '#^Property pdf_standard_myobject\:\:\$cols \(array\\) does not accept non\-empty\-array\\.$#' identifier: assign.propertyType @@ -26082,12 +23748,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26142,18 +23802,6 @@ parameters: count: 2 path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_agenda.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26175,19 +23823,7 @@ parameters: - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse - count: 3 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 + count: 2 path: ../../htdocs/modulebuilder/template/myobject_card.php - @@ -26220,30 +23856,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_card.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 5 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^Variable \$permissiontoadd in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26262,24 +23874,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../htdocs/modulebuilder/template/myobject_contact.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_document.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_document.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26310,18 +23904,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26340,24 +23922,6 @@ parameters: count: 1 path: ../../htdocs/modulebuilder/template/myobject_list.php - - - message: '#^Variable \$permissiontodelete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_list.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_note.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/modulebuilder/template/myobject_note.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -26814,12 +24378,6 @@ parameters: count: 1 path: ../../htdocs/opensurvey/card.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/opensurvey/card.php - - message: '#^Variable \$id might not be defined\.$#' identifier: variable.undefined @@ -26910,66 +24468,18 @@ parameters: count: 1 path: ../../htdocs/opensurvey/class/opensurveysondage.class.php - - - message: '#^Empty array passed to foreach\.$#' - identifier: foreach.emptyArray - count: 1 - path: ../../htdocs/opensurvey/list.php - - - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/opensurvey/list.php - - - - message: '#^Variable \$nbuser might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/opensurvey/list.php - - - - message: '#^Variable \$search_all might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/opensurvey/list.php - - message: '#^Offset int\<0, max\> on array\, int\<0, max\>\> in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset count: 1 path: ../../htdocs/opensurvey/results.php - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/opensurvey/results.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/opensurvey/results.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/opensurvey/results.php - - message: '#^Variable \$cleinsertion might not be defined\.$#' identifier: variable.undefined count: 2 path: ../../htdocs/opensurvey/results.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/opensurvey/results.php - - message: '#^Variable \$erreur_ajout_date in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -27018,12 +24528,6 @@ parameters: count: 1 path: ../../htdocs/opensurvey/wizard/create_survey.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/partnership/admin/website.php - - message: '#^Left side of && is always false\.$#' identifier: booleanAnd.leftAlwaysFalse @@ -27138,12 +24642,6 @@ parameters: count: 1 path: ../../htdocs/partnership/class/partnership.class.php - - - message: '#^Property Partnership\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 10, notnull\: 1, visible\: 4, noteditable\: 1, default\: ''\(PROV\)'', \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: ''isModEnabled\(…'', position\: 15, notnull\: 1, visible\: \-2, default\: ''1'', index\: 1\}, fk_type\: array\{type\: ''integer…'', label\: ''Type'', enabled\: 1, position\: 20, notnull\: 1, visible\: 1, csslist\: ''tdoverflowmax125''\}, fk_soc\: array\{type\: ''integer\:Societe…'', label\: ''ThirdParty'', picto\: ''company'', enabled\: 1, position\: 50, notnull\: \-1, visible\: 1, index\: 1, \.\.\.\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2, csslist\: ''nowraponall''\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/partnership/class/partnership.class.php - - message: '#^Property Partnership\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -27360,12 +24858,6 @@ parameters: count: 1 path: ../../htdocs/product/admin/product_tools.php - - - message: '#^Variable \$arrayresult might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/ajax/products.php - - message: '#^Property ActionsCardProduct\:\:\$field_list has no type specified\.$#' identifier: missingType.property @@ -27684,12 +25176,6 @@ parameters: count: 1 path: ../../htdocs/product/class/product.class.php - - - message: '#^Property Product\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: \-2, notnull\: 1, index\: 1, position\: 1, comment\: ''Id''\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 1, index\: 1, position\: 10, \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, default\: ''1'', notnull\: 1, index\: 1, position\: 5\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, visible\: 1, notnull\: 1, showoncombobox\: 2, position\: 15, csslist\: ''tdoverflowmax250''\}, barcode\: array\{type\: ''varchar\(255\)'', label\: ''Barcode'', enabled\: ''isModEnabled\(…'', position\: 20, visible\: \-1, showoncombobox\: 3, cssview\: ''tdwordbreak'', csslist\: ''tdoverflowmax125''\}, fk_barcode_type\: array\{type\: ''integer'', label\: ''BarcodeType'', enabled\: 1, position\: 21, notnull\: 0, visible\: \-1\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, visible\: 0, position\: 61\}, note\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, visible\: 0, position\: 62\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Property Product\:\:\$fk_default_bom \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -27708,36 +25194,6 @@ parameters: count: 1 path: ../../htdocs/product/class/product.class.php - - - message: '#^Property Product\:\:\$stats_bom has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$stats_facture_fournisseur has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$stats_facturerec has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$stats_mrptoconsume has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$stats_mrptoproduce has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Property Product\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -27750,66 +25206,30 @@ parameters: count: 1 path: ../../htdocs/product/class/product.class.php - - - message: '#^Property Product\:\:\$type \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Result of && is always true\.$#' identifier: booleanAnd.alwaysTrue count: 1 path: ../../htdocs/product/class/product.class.php - - - message: '#^Result of \|\| is always true\.$#' - identifier: booleanOr.alwaysTrue - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue count: 1 path: ../../htdocs/product/class/product.class.php - - - message: '#^Strict comparison using \!\=\= between mixed~\(0\.0\|''''\|''0''\|array\{\}\|false\|null\) and '''' will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 2 path: ../../htdocs/product/class/product.class.php - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - path: ../../htdocs/product/class/product.class.php - - - - message: '#^Variable \$prodDurationHours might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/class/product.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue count: 1 path: ../../htdocs/product/class/productbatch.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../htdocs/product/class/productbatch.class.php - - message: '#^Property Productbatch\:\:\$batch \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -27840,12 +25260,6 @@ parameters: count: 6 path: ../../htdocs/product/class/productcustomerprice.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../htdocs/product/class/productcustomerprice.class.php - - message: '#^Property ProductCustomerPrice\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -27996,12 +25410,6 @@ parameters: count: 3 path: ../../htdocs/product/class/propalmergepdfproduct.class.php - - - message: '#^Property CommonObject\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/product/class/propalmergepdfproduct.class.php - - message: '#^Property Propalmergepdfproduct\:\:\$file_name \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -28323,7 +25731,7 @@ parameters: - message: '#^Variable \$type might not be defined\.$#' identifier: variable.undefined - count: 6 + count: 1 path: ../../htdocs/product/reassort.php - @@ -28353,7 +25761,7 @@ parameters: - message: '#^Variable \$type might not be defined\.$#' identifier: variable.undefined - count: 6 + count: 1 path: ../../htdocs/product/reassortlot.php - @@ -28476,24 +25884,6 @@ parameters: count: 1 path: ../../htdocs/product/stats/facturerec.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../htdocs/product/stats/mo.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stats/mo.php - - - - message: '#^Variable \$sortorder in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stats/mo.php - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -28626,12 +26016,6 @@ parameters: count: 2 path: ../../htdocs/product/stock/class/entrepot.class.php - - - message: '#^Property Entrepot\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''ID'', enabled\: 1, visible\: 0, notnull\: 1, position\: 10\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, default\: ''1'', notnull\: 1, index\: 1, position\: 15\}, ref\: array\{type\: ''varchar\(255\)'', label\: ''Ref'', enabled\: 1, visible\: 1, showoncombobox\: 1, position\: 25, searchall\: 1\}, description\: array\{type\: ''text'', label\: ''Description'', enabled\: 1, visible\: \-2, position\: 35, searchall\: 1\}, lieu\: array\{type\: ''varchar\(64\)'', label\: ''LocationSummary'', enabled\: 1, visible\: 1, position\: 40, showoncombobox\: 2, searchall\: 1\}, fk_parent\: array\{type\: ''integer\:Entrepot…'', label\: ''ParentWarehouse'', enabled\: 1, visible\: \-2, position\: 41\}, fk_project\: array\{type\: ''integer\:Project…'', label\: ''Project'', enabled\: ''\$conf\-\>project\-…'', visible\: \-1, position\: 42\}, address\: array\{type\: ''varchar\(255\)'', label\: ''Address'', enabled\: 1, visible\: \-2, position\: 45, searchall\: 1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/product/stock/class/entrepot.class.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -28926,12 +26310,6 @@ parameters: count: 3 path: ../../htdocs/product/stock/movement_card.php - - - message: '#^Variable \$optioncss might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/product/stock/movement_card.php - - message: '#^Variable \$result1 might not be defined\.$#' identifier: variable.undefined @@ -29058,12 +26436,6 @@ parameters: count: 1 path: ../../htdocs/product/stock/movement_list.php - - - message: '#^Variable \$whClass might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/movement_list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -29148,30 +26520,12 @@ parameters: count: 1 path: ../../htdocs/product/stock/productlot_card.php - - - message: '#^Variable \$batch might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/productlot_document.php - - - - message: '#^Variable \$productid might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/productlot_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../htdocs/product/stock/productlot_list.php - - - message: '#^Variable \$show_files might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/productlot_list.php - - message: '#^Variable \$draftchecked in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -29196,114 +26550,6 @@ parameters: count: 1 path: ../../htdocs/product/stock/replenishorders.php - - - message: '#^Variable \$morehtmlref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/commande_fournisseur.php - - - - message: '#^Variable \$option might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/commande_fournisseur.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/commande_fournisseur.php - - - - message: '#^Variable \$sortorder in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/commande_fournisseur.php - - - - message: '#^Variable \$morehtmlref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/expedition.php - - - - message: '#^Variable \$option might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/expedition.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/expedition.php - - - - message: '#^Variable \$sortorder in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/expedition.php - - - - message: '#^Variable \$batch might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$morehtmlref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$objectid might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$sortorder in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/mo.php - - - - message: '#^Variable \$morehtmlref might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/reception.php - - - - message: '#^Variable \$option might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/stock/stats/reception.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/reception.php - - - - message: '#^Variable \$sortorder in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/product/stock/stats/reception.php - - message: '#^Variable \$nbofmovement might not be defined\.$#' identifier: variable.undefined @@ -29412,18 +26658,6 @@ parameters: count: 1 path: ../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - - message: '#^Variable \$sortfield might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - - - message: '#^Variable \$sortorder might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - message: '#^Variable \$text might not be defined\.$#' identifier: variable.undefined @@ -29460,24 +26694,12 @@ parameters: count: 1 path: ../../htdocs/product/stock/stocktransfer/stocktransfer_list.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/product/stock/tpl/extrafields_add.tpl.php - - message: '#^Variable \$extrafields might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/product/stock/tpl/extrafields_add.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/product/stock/tpl/stockcorrection.tpl.php - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' identifier: argument.type @@ -29502,12 +26724,6 @@ parameters: count: 2 path: ../../htdocs/product/stock/tpl/stockcorrection.tpl.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/product/stock/tpl/stocktransfer.tpl.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -29544,12 +26760,6 @@ parameters: count: 1 path: ../../htdocs/projet/activity/perday.php - - - message: '#^Parameter \#1 \$inc of function projectLinesPerDay expects string, int given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/projet/activity/perday.php - - message: '#^Parameter \#11 \$isavailable of function projectLinesPerDay expects array\, afternoon\: int\<0, 1\>\}\>, non\-empty\-array\ given\.$#' identifier: argument.type @@ -29628,12 +26838,6 @@ parameters: count: 1 path: ../../htdocs/projet/activity/permonth.php - - - message: '#^Parameter \#1 \$inc of function projectLinesPerMonth expects string, int given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/projet/activity/permonth.php - - message: '#^Parameter \#14 \$arrayfields of function projectLinesPerMonth expects array\, array\\> given\.$#' identifier: argument.type @@ -29688,12 +26892,6 @@ parameters: count: 1 path: ../../htdocs/projet/activity/perweek.php - - - message: '#^Parameter \#1 \$inc of function projectLinesPerWeek expects string, int given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/projet/activity/perweek.php - - message: '#^Parameter \#11 \$isavailable of function projectLinesPerWeek expects array\, afternoon\: int\<0, 1\>\}\>, non\-empty\-array\ given\.$#' identifier: argument.type @@ -29754,12 +26952,6 @@ parameters: count: 1 path: ../../htdocs/projet/admin/project.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/projet/admin/website.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -29910,12 +27102,6 @@ parameters: count: 1 path: ../../htdocs/projet/class/project.class.php - - - message: '#^Property Project\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''ID'', enabled\: 1, visible\: \-1, notnull\: 1, position\: 10\}, fk_project\: array\{type\: ''integer'', label\: ''Parent'', enabled\: 1, visible\: 1, notnull\: 0, position\: 12\}, ref\: array\{type\: ''varchar\(50\)'', label\: ''Ref'', enabled\: 1, visible\: 1, showoncombobox\: 1, position\: 15, searchall\: 1\}, title\: array\{type\: ''varchar\(255\)'', label\: ''ProjectLabel'', enabled\: 1, visible\: 1, notnull\: 1, position\: 17, showoncombobox\: 2, searchall\: 1\}, entity\: array\{type\: ''integer'', label\: ''Entity'', default\: ''1'', enabled\: 1, visible\: 3, notnull\: 1, position\: 19\}, fk_soc\: array\{type\: ''integer'', label\: ''Thirdparty'', enabled\: 1, visible\: 0, position\: 20\}, dateo\: array\{type\: ''date'', label\: ''DateStart'', enabled\: 1, visible\: \-1, position\: 30\}, datee\: array\{type\: ''date'', label\: ''DateEnd'', enabled\: 1, visible\: 1, position\: 35\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/projet/class/project.class.php - - message: '#^Property Project\:\:\$ip \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -30258,12 +27444,6 @@ parameters: count: 1 path: ../../htdocs/projet/list.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/projet/list.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -30360,12 +27540,6 @@ parameters: count: 1 path: ../../htdocs/projet/tasks.php - - - message: '#^Parameter \#1 \$inc of function projectLinesa expects string, int given\.$#' - identifier: argument.type - count: 1 - path: ../../htdocs/projet/tasks.php - - message: '#^Parameter \#13 \$arrayfields of function projectLinesa expects array\, array\\> given\.$#' identifier: argument.type @@ -30390,12 +27564,6 @@ parameters: count: 2 path: ../../htdocs/projet/tasks.php - - - message: '#^Variable \$param might not be defined\.$#' - identifier: variable.undefined - count: 17 - path: ../../htdocs/projet/tasks.php - - message: '#^Variable \$permissiontodelete might not be defined\.$#' identifier: variable.undefined @@ -30768,12 +27936,6 @@ parameters: count: 1 path: ../../htdocs/public/bookcal/index.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 9 - path: ../../htdocs/public/clicktodial/cidlookup.php - - message: '#^Variable \$langs might not be defined\.$#' identifier: variable.undefined @@ -30784,78 +27946,6 @@ parameters: message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 11 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$ext in empty\(\) always exists and is always falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 23 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$php_self might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/company/new.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/public/company/new.php - - - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/public/cron/cron_run_jobs_by_url.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 5 path: ../../htdocs/public/cron/cron_run_jobs_by_url.php - @@ -30882,30 +27972,6 @@ parameters: count: 1 path: ../../htdocs/public/demo/index.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 21 - path: ../../htdocs/public/demo/index.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/demo/index.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/public/demo/index.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../htdocs/public/demo/index.php - - message: '#^Variable \$conf might not be defined\.$#' identifier: variable.undefined @@ -30930,18 +27996,6 @@ parameters: count: 7 path: ../../htdocs/public/donations/donateurs_code.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 9 - path: ../../htdocs/public/emailing/mailing-read.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../htdocs/public/emailing/mailing-unsubscribe.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -31032,12 +28086,6 @@ parameters: count: 2 path: ../../htdocs/public/fichinter/agendaexport.php - - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/public/members/new.php - - message: '#^Call to preg_quote\(\) is missing delimiter / to be effective\.$#' identifier: argument.invalidPregQuote @@ -31056,12 +28104,6 @@ parameters: count: 1 path: ../../htdocs/public/members/new.php - - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/public/members/public_card.php - - message: '#^Property Adherent\:\:\$photo \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -31080,42 +28122,6 @@ parameters: count: 17 path: ../../htdocs/public/members/public_card.php - - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/public/members/public_list.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/members/public_list.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../htdocs/public/members/public_list.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../htdocs/public/members/public_list.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/notice.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/notice.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -31212,54 +28218,12 @@ parameters: count: 1 path: ../../htdocs/public/payment/newpayment.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/public/payment/newpayment.php - - message: '#^Parameter \#1 \$paymentAmount of function print_paypal_redirect expects float, string given\.$#' identifier: argument.type count: 1 path: ../../htdocs/public/payment/newpayment.php - - - message: '#^Variable \$PAYPAL_API_KO might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/payment/newpayment.php - - - - message: '#^Variable \$PAYPAL_API_OK might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/payment/newpayment.php - - - - message: '#^Variable \$PAYPAL_API_PASSWORD might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/payment/newpayment.php - - - - message: '#^Variable \$PAYPAL_API_SANDBOX might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/payment/newpayment.php - - - - message: '#^Variable \$PAYPAL_API_SIGNATURE might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/payment/newpayment.php - - - - message: '#^Variable \$PAYPAL_API_USER might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/payment/newpayment.php - - message: '#^Variable \$attendee might not be defined\.$#' identifier: variable.undefined @@ -31704,18 +28668,6 @@ parameters: count: 2 path: ../../htdocs/public/test/test_arrays.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/test/test_arrays.php - - - - message: '#^Variable \$dolibarr_main_prod might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/test/test_arrays.php - - message: '#^Variable \$filter might not be defined\.$#' identifier: variable.undefined @@ -31728,30 +28680,12 @@ parameters: count: 1 path: ../../htdocs/public/test/test_arrays.php - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/test/test_arrays.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 24 - path: ../../htdocs/public/test/test_arrays.php - - message: '#^Variable \$moreforfilter in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../htdocs/public/test/test_arrays.php - - - message: '#^Variable \$optioncss might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/public/test/test_arrays.php - - message: '#^Variable \$param might not be defined\.$#' identifier: variable.undefined @@ -32058,24 +28992,6 @@ parameters: count: 1 path: ../../htdocs/public/website/styles.css.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/public/website/styles.css.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/website/styles.css.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/public/website/styles.css.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -32214,12 +29130,6 @@ parameters: count: 2 path: ../../htdocs/reception/class/reception.class.php - - - message: '#^Property Reception\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/reception/class/reception.class.php - - message: '#^Property Reception\:\:\$ref_supplier \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -32640,12 +29550,6 @@ parameters: count: 1 path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - message: '#^Call to function property_exists\(\) with \$this\(RecruitmentCandidature\) and ''phone'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - message: '#^Call to function property_exists\(\) with RecruitmentCandidature and ''date_creation'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -32688,24 +29592,6 @@ parameters: count: 1 path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - message: '#^Property CommonObject\:\:\$name \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - - message: '#^Property RecruitmentCandidature\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, position\: 5, notnull\: 1, default\: ''1'', index\: 1\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 10, notnull\: 1, visible\: 4, noteditable\: 1, default\: ''\(PROV\)'', \.\.\.\}, fk_recruitmentjobposition\: array\{type\: ''integer…'', label\: ''Job'', enabled\: 1, position\: 15, notnull\: 0, visible\: 1, index\: 1, picto\: ''recruitmentjobposit…'', \.\.\.\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0\}, fk_user_creat\: array\{type\: ''integer\:User\:user…'', label\: ''UserAuthor'', enabled\: 1, position\: 510, notnull\: \-1, visible\: \-2, foreignkey\: ''user\.rowid'', csslist\: ''tdoverflowmax100''\}, fk_user_modif\: array\{type\: ''integer\:User\:user…'', label\: ''UserModif'', enabled\: 1, position\: 511, notnull\: \-1, visible\: \-2, csslist\: ''tdoverflowmax100''\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - - message: '#^Property RecruitmentCandidature\:\:\$lastname \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/recruitment/class/recruitmentcandidature.class.php - - message: '#^Property RecruitmentCandidature\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -32772,36 +29658,18 @@ parameters: count: 1 path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - message: '#^Property CommonObject\:\:\$ismultientitymanaged \(int\<0, 1\>\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - - message: '#^Property RecruitmentJobPosition\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, position\: 5, notnull\: 1, default\: ''1'', index\: 1\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 10, notnull\: 1, visible\: 4, noteditable\: 1, default\: ''\(PROV\)'', \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''JobLabel'', enabled\: 1, position\: 30, notnull\: 1, visible\: 1, searchall\: 1, css\: ''minwidth500'', \.\.\.\}, qty\: array\{type\: ''integer'', label\: ''NbOfEmployeesExpect…'', enabled\: 1, position\: 45, notnull\: 1, visible\: 1, default\: ''1'', isameasure\: 1, \.\.\.\}, fk_project\: array\{type\: ''integer\:Project…'', label\: ''Project'', enabled\: ''\$conf\-\>project\-…'', position\: 52, notnull\: \-1, visible\: \-1, index\: 1, css\: ''maxwidth500'', \.\.\.\}, fk_user_recruiter\: array\{type\: ''integer\:User\:user…'', label\: ''ResponsibleOfRecrui…'', enabled\: 1, position\: 54, notnull\: 1, visible\: 1, foreignkey\: ''user\.rowid'', css\: ''maxwidth500'', \.\.\.\}, email_recruiter\: array\{type\: ''varchar\(255\)'', label\: ''EmailRecruiter'', enabled\: 1, position\: 54, notnull\: 0, visible\: \-1, help\: ''ToUseAGenericEmail'', picto\: ''email''\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - message: '#^Property RecruitmentJobPosition\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - - message: '#^Variable \$error in empty\(\) always exists and is always falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/recruitment/class/recruitmentjobposition.class.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, RecruitmentJobPosition given\.$#' identifier: argument.type @@ -32850,12 +29718,6 @@ parameters: count: 1 path: ../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php - - - message: '#^Variable \$outputlangsbis might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' identifier: variable.undefined @@ -33060,30 +29922,6 @@ parameters: count: 1 path: ../../htdocs/resource/card.php - - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/resource/class/dolresource.class.php - - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(Dolresource\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/resource/class/dolresource.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(Dolresource\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/resource/class/dolresource.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(Dolresource\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/resource/class/dolresource.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -33123,7 +29961,7 @@ parameters: - message: '#^Property Dolresource\:\:\$email \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property - count: 3 + count: 2 path: ../../htdocs/resource/class/dolresource.class.php - @@ -33168,12 +30006,6 @@ parameters: count: 2 path: ../../htdocs/resource/class/dolresource.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/resource/class/dolresource.class.php - - message: '#^Call to function is_numeric\(\) with float\|int\\|int\<1, max\>\|\(non\-falsy\-string&numeric\-string\) will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -33486,12 +30318,6 @@ parameters: count: 1 path: ../../htdocs/salaries/list.php - - - message: '#^Variable \$resteapayer might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/salaries/list.php - - message: '#^Variable \$selected might not be defined\.$#' identifier: variable.undefined @@ -33510,24 +30336,12 @@ parameters: count: 2 path: ../../htdocs/salaries/paiement_salary.php - - - message: '#^Variable \$sumpaid might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/salaries/paiement_salary.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 2 path: ../../htdocs/salaries/payments.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../htdocs/salaries/payments.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -33612,30 +30426,6 @@ parameters: count: 1 path: ../../htdocs/societe/ajax/company.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/societe/canvas/actions_card_common.class.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/societe/canvas/company/tpl/card_create.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/societe/canvas/company/tpl/card_edit.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/societe/canvas/company/tpl/card_view.tpl.php - - message: '#^Variable \$db might not be defined\.$#' identifier: variable.undefined @@ -33948,18 +30738,6 @@ parameters: count: 1 path: ../../htdocs/societe/class/companybankaccount.class.php - - - message: '#^Property CompanyBankAccount\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/societe/class/companybankaccount.class.php - - - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Societe\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -33996,24 +30774,6 @@ parameters: count: 6 path: ../../htdocs/societe/class/societe.class.php - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(Societe\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(Societe\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(Societe\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - message: '#^Property Contact\:\:\$roles \(array\\) does not accept non\-empty\-list\\.$#' identifier: assign.propertyType @@ -34032,22 +30792,10 @@ parameters: count: 1 path: ../../htdocs/societe/class/societe.class.php - - - message: '#^Property Societe\:\:\$email \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - message: '#^Property Societe\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property - count: 3 - path: ../../htdocs/societe/class/societe.class.php - - - - message: '#^Property Societe\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept non\-empty\-array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\.$#' - identifier: assign.propertyType - count: 3 + count: 2 path: ../../htdocs/societe/class/societe.class.php - @@ -34080,18 +30828,6 @@ parameters: count: 1 path: ../../htdocs/societe/class/societe.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/societe/class/societe.class.php - - - - message: '#^Property SocieteAccount\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', visible\: \-2, enabled\: 1, position\: 1, notnull\: 1, index\: 1, comment\: ''Id''\}, entity\: array\{type\: ''integer'', label\: ''Entity'', visible\: 0, enabled\: 1, position\: 5, default\: 1\}, login\: array\{type\: ''varchar\(64\)'', label\: ''Login'', visible\: 1, enabled\: 1, notnull\: 1, position\: 10, showoncombobox\: 1, autofocusoncreate\: 1\}, pass_encoding\: array\{type\: ''varchar\(24\)'', label\: ''PassEncoding'', visible\: 0, enabled\: 1, position\: 30\}, pass_crypted\: array\{type\: ''password'', label\: ''Password'', visible\: \-1, enabled\: 1, position\: 31, notnull\: 1\}, pass_temp\: array\{type\: ''varchar\(128\)'', label\: ''Temp'', visible\: 0, enabled\: 0, position\: 32, notnull\: \-1\}, fk_soc\: array\{type\: ''integer\:Societe…'', label\: ''ThirdParty'', visible\: 1, enabled\: 1, position\: 40, notnull\: \-1, index\: 1, picto\: ''company'', \.\.\.\}, site\: array\{type\: ''varchar\(128\)'', label\: ''WebsiteTypeLabel'', visible\: 0, enabled\: 0, position\: 41, notnull\: 1, default\: '''', help\: ''Name of the website…'', \.\.\.\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/societe/class/societeaccount.class.php - - message: '#^Loose comparison using \=\= between 0 and 1 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -34177,7 +30913,7 @@ parameters: path: ../../htdocs/societe/notify/card.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../htdocs/societe/paymentmodes.php @@ -34206,24 +30942,6 @@ parameters: count: 1 path: ../../htdocs/societe/paymentmodes.php - - - message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - - - message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - - - message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\\|string given\.$#' - identifier: argument.type - count: 3 - path: ../../htdocs/societe/paymentmodes.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -34266,18 +30984,6 @@ parameters: count: 2 path: ../../htdocs/societe/price.php - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 14 - path: ../../htdocs/societe/price.php - - - - message: '#^Variable \$extralabels might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/societe/price.php - - message: '#^Variable \$prodcustprice might not be defined\.$#' identifier: variable.undefined @@ -34860,12 +31566,6 @@ parameters: count: 3 path: ../../htdocs/takepos/pay.php - - - message: '#^Variable \$servicestatus might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../htdocs/takepos/pay.php - - message: '#^Variable \$stripeacc might not be defined\.$#' identifier: variable.undefined @@ -34878,18 +31578,6 @@ parameters: count: 1 path: ../../htdocs/takepos/printbox.php - - - message: '#^Path in require\(\) "//takepos/invoice\.php" is not a file or it does not exist\.$#' - identifier: require.fileNotFound - count: 1 - path: ../../htdocs/takepos/public/auto_order.php - - - - message: '#^Path in require\(\) "//takepos/phone\.php" is not a file or it does not exist\.$#' - identifier: require.fileNotFound - count: 1 - path: ../../htdocs/takepos/public/auto_order.php - - message: '#^Parameter \#2 \$addpercent of function vatrate expects bool, int given\.$#' identifier: argument.type @@ -34926,12 +31614,6 @@ parameters: count: 2 path: ../../htdocs/takepos/split.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/theme/eldy/badges.inc.php - - message: '#^Variable \$fontlist might not be defined\.$#' identifier: variable.undefined @@ -34986,12 +31668,6 @@ parameters: count: 1 path: ../../htdocs/theme/eldy/dropdown.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/theme/eldy/global.inc.php - - message: '#^Parameter \#2 \$steps of function colorAdjustBrightness expects int, string given\.$#' identifier: argument.type @@ -35058,24 +31734,12 @@ parameters: count: 1 path: ../../htdocs/theme/eldy/progress.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/theme/eldy/style.css.php - - message: '#^Variable \$menumanager might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../htdocs/theme/eldy/style.css.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/theme/md/badges.inc.php - - message: '#^Variable \$badgeDanger might not be defined\.$#' identifier: variable.undefined @@ -35208,12 +31872,6 @@ parameters: count: 1 path: ../../htdocs/theme/md/flags-sprite.inc.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/theme/md/info-box.inc.php - - message: '#^Variable \$left might not be defined\.$#' identifier: variable.undefined @@ -35238,12 +31896,6 @@ parameters: count: 1 path: ../../htdocs/theme/md/progress.inc.php - - - message: '#^Expression "''…" on a separate line does not do anything\.$#' - identifier: expr.resultUnused - count: 1 - path: ../../htdocs/theme/md/style.css.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -35454,18 +32106,6 @@ parameters: count: 1 path: ../../htdocs/ticket/class/ticket.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/ticket/class/ticket.class.php - - - - message: '#^Property CommonObject\:\:\$model_pdf \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../htdocs/ticket/class/ticket.class.php - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -35676,18 +32316,6 @@ parameters: count: 1 path: ../../htdocs/ticket/index.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 3 - path: ../../htdocs/ticket/list.php - - - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/ticket/list.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -35790,12 +32418,6 @@ parameters: count: 1 path: ../../htdocs/user/class/api_users.class.php - - - message: '#^Call to function is_array\(\) with array\{\}\|array\{mixed\} will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../htdocs/user/class/user.class.php - - message: '#^Call to function method_exists\(\) with \$this\(User\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -35820,36 +32442,12 @@ parameters: count: 3 path: ../../htdocs/user/class/user.class.php - - - message: '#^PHPDoc tag @var with type Contact is not subtype of native type \$this\(User\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/user/class/user.class.php - - - - message: '#^PHPDoc tag @var with type Societe is not subtype of native type \$this\(User\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/user/class/user.class.php - - - - message: '#^PHPDoc tag @var with type User is not subtype of native type \$this\(User\)\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../htdocs/user/class/user.class.php - - message: '#^Parameter \#1 \$array of function dol_sort_array contains unresolvable type\.$#' identifier: argument.unresolvableType count: 1 path: ../../htdocs/user/class/user.class.php - - - message: '#^Property User\:\:\$email \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../htdocs/user/class/user.class.php - - message: '#^Property User\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -35916,12 +32514,6 @@ parameters: count: 1 path: ../../htdocs/user/class/user.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../htdocs/user/class/user.class.php - - message: '#^Variable \$whereforadd in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -36072,12 +32664,6 @@ parameters: count: 2 path: ../../htdocs/user/home.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../htdocs/user/list.php - - message: '#^Offset ''u\.salary'' on array\{u\.salary\: \(float\|int\)\} in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset @@ -36276,54 +32862,6 @@ parameters: count: 1 path: ../../htdocs/variants/list.php - - - message: '#^Variable \$rowid might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/variants/list.php - - - - message: '#^Cannot access property \$lines on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_create.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/variants/tpl/productattributevalueline_title.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/variants/tpl/productattributevalueline_title.tpl.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -36618,12 +33156,6 @@ parameters: count: 1 path: ../../htdocs/webportal/class/webportalmember.class.php - - - message: '#^Property WebPortalMember\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: 0, notnull\: 1, position\: 10\}, ref\: array\{type\: ''varchar\(30\)'', label\: ''Ref'', default\: ''1'', enabled\: 1, visible\: 5, notnull\: 1, position\: 12, index\: 1, \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', default\: ''1'', enabled\: 1, visible\: \-2, notnull\: 1, position\: 15, index\: 1\}, lastname\: array\{type\: ''varchar\(50\)'', label\: ''Lastname'', enabled\: 1, visible\: 4, position\: 30, showonheader\: 1\}, firstname\: array\{type\: ''varchar\(50\)'', label\: ''Firstname'', enabled\: 1, visible\: 4, position\: 35, showonheader\: 1\}, gender\: array\{type\: ''varchar\(10\)'', label\: ''Gender'', enabled\: 1, visible\: 4, position\: 50, arrayofkeyval\: array\{man\: ''Genderman'', woman\: ''Genderwoman'', other\: ''Genderother''\}, showonheader\: 1\}, company\: array\{type\: ''varchar\(128\)'', label\: ''Societe'', enabled\: 1, visible\: 4, position\: 65, showonheader\: 1\}, address\: array\{type\: ''text'', label\: ''Address'', enabled\: 1, visible\: 4, position\: 75, showonheader\: 1\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/webportal/class/webportalmember.class.php - - message: '#^Strict comparison using \=\=\= between ''nolink'' and ''nolink'' will always evaluate to true\.$#' identifier: identical.alwaysTrue @@ -36684,12 +33216,6 @@ parameters: count: 1 path: ../../htdocs/webportal/class/webportalpartnership.class.php - - - message: '#^Property WebPortalPartnership\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 10, notnull\: 1, visible\: 5, noteditable\: 1, default\: ''\(PROV\)'', \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, position\: 15, notnull\: 1, visible\: \-2, default\: ''1'', index\: 1\}, fk_type\: array\{type\: ''integer…'', label\: ''Type'', enabled\: 1, position\: 20, notnull\: 1, visible\: 5, csslist\: ''''\}, fk_soc\: array\{type\: ''integer\:Societe…'', label\: ''ThirdParty'', picto\: ''company'', enabled\: 1, position\: 50, notnull\: \-1, visible\: 5, index\: 1, \.\.\.\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/webportal/class/webportalpartnership.class.php - - message: '#^Call to function method_exists\(\) with \$this\(WebPortalPropal\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -36858,12 +33384,6 @@ parameters: count: 1 path: ../../htdocs/website/class/websitepage.class.php - - - message: '#^Property WebsitePage\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, visible\: \-1, notnull\: 1, index\: 1, position\: 1, comment\: ''Id''\}, pageurl\: array\{type\: ''varchar\(16\)'', label\: ''WEBSITE_PAGENAME'', enabled\: 1, visible\: 1, notnull\: 1, index\: 1, position\: 10, searchall\: 1, \.\.\.\}, aliasalt\: array\{type\: ''varchar\(255\)'', label\: ''AliasAlt'', enabled\: 1, visible\: 1, notnull\: 1, index\: 0, position\: 11, searchall\: 0, \.\.\.\}, type_container\: array\{type\: ''varchar\(16\)'', label\: ''Type'', enabled\: 1, visible\: 1, notnull\: 1, index\: 0, position\: 12, comment\: ''Type of container''\}, title\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, visible\: 1, position\: 30, searchall\: 1, help\: ''UseTextBetween5And7…''\}, description\: array\{type\: ''varchar\(255\)'', label\: ''Description'', enabled\: 1, visible\: 1, position\: 30, searchall\: 1\}, image\: array\{type\: ''varchar\(255\)'', label\: ''Image'', enabled\: 1, visible\: 1, position\: 32, searchall\: 0, help\: ''Relative path of…''\}, keywords\: array\{type\: ''varchar\(255\)'', label\: ''Keywords'', enabled\: 1, visible\: 1, position\: 45, searchall\: 0\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/website/class/websitepage.class.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -37116,12 +33636,6 @@ parameters: count: 1 path: ../../htdocs/workstation/class/workstation.class.php - - - message: '#^Property Workstation\:\:\$fields \(array\\|string, position\: int, notnull\?\: int, visible\: int\<\-2, 5\>\|string, noteditable\?\: int\<0, 1\>, default\?\: string, \.\.\.\}\>\) does not accept default value of type array\{rowid\: array\{type\: ''integer'', label\: ''TechnicalID'', enabled\: 1, position\: 1, notnull\: 1, visible\: 0, noteditable\: 1, index\: 1, \.\.\.\}, entity\: array\{type\: ''integer'', label\: ''Entity'', enabled\: 1, visible\: 0, position\: 5, notnull\: 1, default\: ''1'', index\: 1\}, ref\: array\{type\: ''varchar\(128\)'', label\: ''Ref'', enabled\: 1, position\: 10, notnull\: 1, visible\: 1, noteditable\: 0, default\: '''', \.\.\.\}, label\: array\{type\: ''varchar\(255\)'', label\: ''Label'', enabled\: 1, position\: 30, notnull\: 1, visible\: 1, searchall\: 1, css\: ''minwidth300'', \.\.\.\}, type\: array\{type\: ''varchar\(8\)'', label\: ''Type'', enabled\: 1, position\: 32, default\: ''1'', notnull\: 1, visible\: 1, arrayofkeyval\: array\{HUMAN\: ''Human'', MACHINE\: ''Machine'', BOTH\: ''HumanMachine''\}\}, note_public\: array\{type\: ''html'', label\: ''NotePublic'', enabled\: 1, position\: 61, notnull\: 0, visible\: 0\}, note_private\: array\{type\: ''html'', label\: ''NotePrivate'', enabled\: 1, position\: 62, notnull\: 0, visible\: 0\}, date_creation\: array\{type\: ''datetime'', label\: ''DateCreation'', enabled\: 1, position\: 500, notnull\: 1, visible\: \-2, csslist\: ''nowraponall''\}, \.\.\.\}\.$#' - identifier: property.defaultValue - count: 1 - path: ../../htdocs/workstation/class/workstation.class.php - - message: '#^Property Workstation\:\:\$ismultientitymanaged \(int\<0, 1\>\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -37224,144 +33738,24 @@ parameters: count: 1 path: ../../htdocs/zapier/class/api_zapier.class.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/bank/export-bank-receipts.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 27 - path: ../../scripts/bank/export-bank-receipts.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/bank/export-bank-receipts.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 9 - path: ../../scripts/bank/export-bank-receipts.php - - message: '#^Variable \$num in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable count: 1 path: ../../scripts/bank/export-bank-receipts.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../scripts/company/sync_contacts_dolibarr2ldap.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../scripts/company/sync_contacts_dolibarr2ldap.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/company/sync_contacts_dolibarr2ldap.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/company/sync_contacts_dolibarr2ldap.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/company/sync_contacts_dolibarr2ldap.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/contracts/email_expire_services_to_customers.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../scripts/contracts/email_expire_services_to_customers.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/contracts/email_expire_services_to_customers.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/contracts/email_expire_services_to_customers.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/contracts/email_expire_services_to_representatives.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/contracts/email_expire_services_to_representatives.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/contracts/email_expire_services_to_representatives.php - - message: '#^Result of \|\| is always false\.$#' identifier: booleanOr.alwaysFalse count: 1 path: ../../scripts/doc/regenerate_docs.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/doc/regenerate_docs.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/doc/regenerate_docs.php - - message: '#^Variable \$dir in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../scripts/doc/regenerate_docs.php - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/doc/regenerate_docs.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/doc/regenerate_docs.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -37380,30 +33774,6 @@ parameters: count: 1 path: ../../scripts/emailings/mailing-send.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/emailings/mailing-send.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/emailings/mailing-send.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/emailings/mailing-send.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/emailings/mailing-send.php - - message: '#^Variable \$mesg might not be defined\.$#' identifier: variable.undefined @@ -37422,84 +33792,6 @@ parameters: count: 1 path: ../../scripts/emailings/reset-invalid-emails.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 21 - path: ../../scripts/emailings/reset-invalid-emails.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/emailings/reset-invalid-emails.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/invoices/rebuild_merge_pdf.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../scripts/invoices/rebuild_merge_pdf.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/invoices/rebuild_merge_pdf.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/invoices/rebuild_merge_pdf.php - - message: '#^Variable \$user might not be defined\.$#' identifier: variable.undefined @@ -37536,54 +33828,18 @@ parameters: count: 1 path: ../../scripts/product/migrate_picture_path.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/product/migrate_picture_path.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/product/migrate_picture_path.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/product/migrate_picture_path.php - - message: '#^Result of \|\| is always false\.$#' identifier: booleanOr.alwaysFalse count: 1 path: ../../scripts/product/regenerate_thumbs.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/product/regenerate_thumbs.php - - message: '#^Variable \$dir in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../scripts/product/regenerate_thumbs.php - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/product/regenerate_thumbs.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/product/regenerate_thumbs.php - - message: '#^Variable \$subdir in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -37596,44 +33852,8 @@ parameters: count: 1 path: ../../scripts/user/migrate_picture_path.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../scripts/user/migrate_picture_path.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/user/migrate_picture_path.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../scripts/user/migrate_picture_path.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/user/sync_groups_dolibarr2ldap.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/user/sync_users_dolibarr2ldap.php - - message: '#^Unable to resolve the template type T in call to function array_values$#' identifier: argument.templateType count: 1 path: ../../scripts/user/sync_users_ldap2dolibarr.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../scripts/user/sync_users_ldap2dolibarr.php diff --git a/dev/initdemo/README.md b/dev/initdemo/README.md index de796d36066..3ec1de227f0 100644 --- a/dev/initdemo/README.md +++ b/dev/initdemo/README.md @@ -10,7 +10,7 @@ Init demo The script `initdemo.sh` will erase the current database with data from `dev/initdemo/mysqldump_dolibarr_x.y.z.sql` and copy files from `documents_demo` to the official document directory. -You many to execute `chmod 700 initdemo.sh` +You may need to execute `chmod 700 initdemo.sh` then run `./initdemo.sh` to launch the Graphical User Interface. After loading the demo files, the admin login may be one of the following: diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index ef30d8686f1..59a11351760 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -51,6 +51,13 @@ then fi +# ----------------------------- check if dialog available +command -v dialog >/dev/null 2>&1 || { + echo "Error: command dialog not found. On Linux, you can install it with: apt install dialog" + exit +} + + # ----------------------------- if no params on command line if [ "$passwd" = "" ] then @@ -179,17 +186,19 @@ fi if [ "$passwd" != "" ] then export passwd="-p$passwd" + export passwdshown="-p*****" fi #echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile" #mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile #echo "drop old table" +echo "drop table" echo "drop table if exists llx_accounting_account;" | mysql "-P$port" "-u$admin" "$passwd" "$base" -echo "mysql -P$port -u$admin -p***** $base < '$mydir/$dumpfile'" +echo "mysql -P$port -u$admin $passwdshown $base < '$mydir/$dumpfile'" mysql "-P$port" "-u$admin" "$passwd" "$base" < "$mydir/$dumpfile" export res=$? if [ $res -ne 0 ]; then - echo "Error to load database dump with mysql -P$port -u$admin -p***** $base < '$mydir/$dumpfile'" + echo "Error to load database dump with: mysql -P$port -u$admin $passwdshown $base < '$mydir/$dumpfile'" exit fi diff --git a/dev/initdemo/mysqldump_dolibarr_3.5.0.sql b/dev/initdemo/mysqldump_dolibarr_3.5.0.sql index c6d16c22e45..f94c3238db3 100644 --- a/dev/initdemo/mysqldump_dolibarr_3.5.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_3.5.0.sql @@ -1150,7 +1150,7 @@ CREATE TABLE `llx_c_field_list` ( LOCK TABLES `llx_c_field_list` WRITE; /*!40000 ALTER TABLE `llx_c_field_list` DISABLE KEYS */; -INSERT INTO `llx_c_field_list` VALUES (1,'2011-02-06 11:18:30','product_default',1,'p.ref','ref','Ref','left',1,1,'1',1),(2,'2011-02-06 11:18:30','product_default',1,'p.label','label','Label','left',1,1,'1',2),(3,'2011-02-06 11:18:30','product_default',1,'p.barcode','barcode','BarCode','center',1,1,'$conf->barcode->enabled',3),(4,'2011-02-06 11:18:30','product_default',1,'p.tms','datem','DateModification','center',1,0,'1',4),(5,'2011-02-06 11:18:30','product_default',1,'p.price','price','SellingPriceHT','right',1,0,'1',5),(6,'2011-02-06 11:18:30','product_default',1,'p.price_ttc','price_ttc','SellingPriceTTC','right',1,0,'1',6),(7,'2011-02-06 11:18:30','product_default',1,'p.stock','stock','Stock','right',0,0,'$conf->stock->enabled',7),(8,'2011-02-06 11:18:30','product_default',1,'p.envente','status','Status','right',1,0,'1',8); +INSERT INTO `llx_c_field_list` VALUES (1,'2011-02-06 11:18:30','product_default',1,'p.ref','ref','Ref','left',1,1,'1',1),(2,'2011-02-06 11:18:30','product_default',1,'p.label','label','Label','left',1,1,'1',2),(3,'2011-02-06 11:18:30','product_default',1,'p.barcode','barcode','BarCode','center',1,1,'isModEnabled("barcode")',3),(4,'2011-02-06 11:18:30','product_default',1,'p.tms','datem','DateModification','center',1,0,'1',4),(5,'2011-02-06 11:18:30','product_default',1,'p.price','price','SellingPriceHT','right',1,0,'1',5),(6,'2011-02-06 11:18:30','product_default',1,'p.price_ttc','price_ttc','SellingPriceTTC','right',1,0,'1',6),(7,'2011-02-06 11:18:30','product_default',1,'p.stock','stock','Stock','right',0,0,'isModEnabled("stock")',7),(8,'2011-02-06 11:18:30','product_default',1,'p.envente','status','Status','right',1,0,'1',8); /*!40000 ALTER TABLE `llx_c_field_list` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/setup/pre-commit/README.md b/dev/setup/pre-commit/README.md index 5dd6defd12a..f256cbf26e8 100644 --- a/dev/setup/pre-commit/README.md +++ b/dev/setup/pre-commit/README.md @@ -27,10 +27,10 @@ the project: `pre-commit-config.yaml`. If you do not have python installed, install [python](https://www.python.org) first.\ `sudo apt install python3` - If you do not have [`pip`](https://pypi.org/project/pip), install that as well.\\ - `sudo apt install pip` + If you do not have [`pip`](https://pypi.org/project/pip), install that as well.\ + `sudo apt install pip` - Then you can install pre-commit tool: + Then you can install pre-commit tool:\ `python3 -m pip install pre-commit` 2. In your local git clone of the project, run `pre-commit install` to add the hooks @@ -96,4 +96,6 @@ CI also runs pre-commit to help maintain code quality. Note: Code for precommits are saved into: -.cache/pre-commit/repo*/py_env-python3/lib/python*/site-packages/pre_commit_hooks/no_commit_to_branch.py +.cache/pre-commit/repo.../pre_commit_hooks/php-....sh +and +.cache/pre-commit/repo.../py_env-python3/lib/python.../site-packages/pre_commit_hooks/no_commit_to_branch.py diff --git a/dev/tools/apstats.php b/dev/tools/apstats.php index 79549d03b3f..825257dadbe 100755 --- a/dev/tools/apstats.php +++ b/dev/tools/apstats.php @@ -149,7 +149,7 @@ $phpstanversion = $output_arrtd[0]; $output_arrtd = array(); if ($dirphpstan != 'disabled') { - $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$PHPSTANLEVEL.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 8G --error-format=github'; + $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$PHPSTANLEVEL.' -v analyze -a build/phpstan/bootstrap.php --memory-limit 8G --error-format=github -c ~/preview.dolibarr.org/dolibarr/dev/tools/phpstan/phpstan_v1_apstats.neon'; print 'Execute PHPStan to get the technical debt: '.$commandcheck."\n"; $resexectd = 0; exec($commandcheck, $output_arrtd, $resexectd); @@ -883,7 +883,7 @@ $html .= '

'.$title_security $html .= '
'."\n"; $html .= '
'."\n"; $html .= ''."\n"; -$html .= ''."\n"; +$html .= ''."\n"; foreach ($arrayofalerts as $key => $alert) { $cve = ''; $yogosha = empty($alert['issueidyogosha']) ? '' : $alert['issueidyogosha']; diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index f013fa5ede5..b7cfa4033c0 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -55,7 +55,7 @@ preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg); print ''.$langs->trans("TransferStock").''; print ''.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).''; - print ''; + print ''; "sme", $action = 'transfert'; $cle_rib = strtolower(checkES($rib, $CCC)); @@ -71,7 +71,7 @@ $reday = GETPOSTINT('reday'); $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; - $sql .= ", '".$this->db->idate($this->periode)."'"; + $sql .= ", '".$this->db->idate($this->period)."'"; $sql .= ", cs.libelle as label, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode as period, cs.import_key"; $sql .= ", periode = '".$this->db->idate($this->period ? $this->period : $this->periode)."'"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, fk_account, fk_mode_reglement, libelle, date_ech, periode, amount, fk_projet, entity, fk_user_author, fk_user, date_creation)"; @@ -83,14 +83,12 @@ $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Referers'); $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Referers'); $title = $langs->transnoentities("Balance")." - ".$langs->transnoentities("AllTime"); - // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire if (!empty($arrayfields['cs.periode']['checked'])) { if ($newamount == 0 || empty($this->date_ech) || (empty($this->period) && empty($this->periode))) { if ($user->hasRight('stock', 'mouvement', 'creer')) { if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) { if (empty($reyear) || empty($remonth) || empty($reday)) { * @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing. - $date = $obj->periode; $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); $datepaye = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); @@ -128,7 +126,6 @@ print ''; print ''; - print '\n"; print ajax_combobox("mouvement"); print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname,cs.periode", "", $param, 'class="left"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['cs.amount']['label'], $_SERVER["PHP_SELF"], "cs.amount,cs.periode", '', $param, 'class="right"', $sortfield, $sortorder); @@ -150,8 +147,8 @@ $permissiontoadd = $user->hasRight('stock', 'mouvement', 'creer'); $permissiontodelete = $user->hasRight('stock', 'mouvement', 'creer'); // There is no deletion permission for stock movement as we should never delete $permissiontoread = $user->hasRight('stock', 'mouvement', 'lire'); $sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, cs.fk_account, c.libelle, c.accountancy_code, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code"; -$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode, cs.fk_account,"; -$sql .= " cs.rowid, cs.libelle as label_sc, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total, cs.paye,"; +$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode as period, cs.fk_account,"; +$sql .= " cs.rowid, cs.libelle as label_sc, cs.fk_type as type, cs.periode as period, cs.date_ech, cs.amount as total, cs.paye,"; $sql = "SELECT id_users, nom as name, id_sondage, reponses"; $sql = 'SELECT nom as name, reponses'; $title = $langs->trans("Referers", $object->name); diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 85e1a4e33c7..6d3df7446b4 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -10,47 +10,46 @@ return [ // # Issue statistics: // PhanUndeclaredProperty : 560+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 500+ occurrences - // PhanUndeclaredGlobalVariable : 350+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 270+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 320+ occurrences + // PhanUndeclaredGlobalVariable : 290+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 230+ occurrences // PhanPluginUnknownArrayMethodReturnType : 180+ occurrences - // PhanTypeMismatchProperty : 140+ occurrences - // PhanPluginUnknownPropertyType : 130+ occurrences + // PhanTypeMismatchProperty : 130+ occurrences // PhanPluginUnknownArrayMethodParamType : 120+ occurrences - // PhanPossiblyUndeclaredVariable : 110+ occurrences - // PhanPluginUndeclaredVariableIsset : 65+ occurrences + // PhanPluginUnknownPropertyType : 110+ occurrences + // PhanPossiblyUndeclaredVariable : 65+ occurrences // PhanRedefineFunction : 45+ occurrences // PhanTypeExpectedObjectPropAccess : 45+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 45+ occurrences - // PhanTypeInvalidDimOffset : 35+ occurrences - // PhanPluginEmptyStatementIf : 30+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 40+ occurrences + // PhanPluginSuspiciousParamOrder : 35+ occurrences + // PhanTypeInvalidDimOffset : 30+ occurrences // PhanTypeMismatchDimFetch : 30+ occurrences - // PhanUndeclaredConstant : 15+ occurrences - // PhanEmptyForeach : 10+ occurrences + // PhanPluginEmptyStatementIf : 15+ occurrences // PhanPluginUnknownObjectMethodCall : 10+ occurrences - // PhanTypeArraySuspiciousNull : 10+ occurrences // PhanTypeComparisonFromArray : 10+ occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences // PhanUndeclaredMethod : 10+ occurrences - // PhanPluginBothLiteralsBinaryOp : 8 occurrences + // PhanEmptyForeach : 8 occurrences + // PhanPluginBothLiteralsBinaryOp : 7 occurrences // PhanPluginDuplicateExpressionBinaryOp : 7 occurrences // PhanPluginSuspiciousParamPosition : 7 occurrences + // PhanTypeArraySuspiciousNull : 6 occurrences + // PhanParamTooMany : 5 occurrences // PhanPossiblyNullTypeMismatchProperty : 5 occurrences - // PhanParamTooMany : 4 occurrences - // PhanPluginDuplicateArrayKey : 4 occurrences // PhanEmptyFQSENInClasslike : 3 occurrences // PhanInvalidFQSENInClasslike : 3 occurrences // PhanTypeMismatchReturn : 3 occurrences - // PhanPluginUnknownArrayPropertyType : 2 occurrences // PhanTypeExpectedObjectPropAccessButGotNull : 2 occurrences // PhanTypeMismatchDimAssignment : 2 occurrences // PhanTypeSuspiciousStringExpression : 2 occurrences + // PhanUndeclaredTypeParameter : 2 occurrences // PhanAccessMethodProtected : 1 occurrence + // PhanPluginUnknownArrayPropertyType : 1 occurrence // PhanTypeConversionFromArray : 1 occurrence + // PhanTypeMismatchArgumentInternalProbablyReal : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ - 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'], 'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/adherents/type.php' => ['PhanTypeMismatchProperty'], @@ -61,7 +60,7 @@ return [ 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeInvalidDimOffset'], + 'htdocs/asset/class/asset.class.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'], 'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -107,111 +106,39 @@ return [ 'htdocs/compta/bank/various_payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], - 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/compta/cashcontrol/cashcontrol_list.php' => ['PhanTypeMismatchProperty'], - 'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/deplacement/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/compta/facture/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/facture/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/prelevement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/index.php' => ['PhanRedefineFunction'], + 'htdocs/compta/localtax/card.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/compta/localtax/clients.php' => ['PhanTypeExpectedObjectPropAccess'], 'htdocs/compta/localtax/list.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], - 'htdocs/compta/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/compta/paiement/cheque/card.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/compta/paiement.php' => ['PhanTypeMismatchDimFetch'], + 'htdocs/compta/paiement/card.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/paiement/cheque/list.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/payment_vat/card.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/prelevement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/prelevement/demandes.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/prelevement/factures.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/prelevement/line.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/prelevement/orders_list.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/prelevement/stats.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/resultat/clientfourn.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/resultat/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], - 'htdocs/compta/sociales/list.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'], - 'htdocs/compta/stats/cabyprodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/cabyuser.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/casoc.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/tva/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/tva/index.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/tva/clients.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'], 'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'], - 'htdocs/contact/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contact/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'], 'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/contrat/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_comments.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/core/actions_lineupdown.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/actions_massactions.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_massactions.inc.php' => ['PhanUndeclaredProperty'], 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/core/boxes/box_actions.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_actions_future.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_nb_tickets_type.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_new_vs_close_ticket.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_orders_permonth.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_orders_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_product_distribution.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_propales_permonth.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_graph_ticket_by_severity.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_last_modified_ticket.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_last_ticket.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_project.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_project_opportunities.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_services_contracts.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/actions_sendmails.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'], 'htdocs/core/class/ccountry.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/cgenericdic.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/conf.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], @@ -224,6 +151,7 @@ return [ 'htdocs/core/class/html.formcompany.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/html.formfile.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/html.formmail.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/class/ldap.class.php' => ['PhanTypeMismatchArgumentInternalProbablyReal'], 'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/smtps.class.php' => ['PhanTypeConversionFromArray'], 'htdocs/core/class/timespent.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], @@ -241,49 +169,65 @@ return [ 'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/xcal.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/modules/barcode/doc/phpbarcode.modules.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanPluginSuspiciousParamOrder'], + 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/cheque/mod_chequereceipt_thyme.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/commande/mod_commande_saphir.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/commande/modules_commande.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/modules/contract/mod_contract_magre.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/expedition/mod_expedition_ribera.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expensereport/mod_expensereport_sand.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/fichinter/mod_arctic.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/holiday/mod_holiday_immaculate.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanTypeMismatchProperty'], 'htdocs/core/modules/mailings/contacts1.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/modules/payment/mod_payment_ant.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/product/mod_codeproduct_elephant.php' => ['PhanPluginSuspiciousParamOrder'], + 'htdocs/core/modules/product_batch/mod_lot_advanced.php' => ['PhanPluginSuspiciousParamOrder'], + 'htdocs/core/modules/product_batch/mod_sn_advanced.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/project/mod_project_universal.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/project/task/mod_task_universal.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/propale/mod_propale_saphir.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/propale/modules_propale.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/modules/reception/mod_reception_moonstone.php' => ['PhanPluginSuspiciousParamOrder'], + 'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], @@ -292,25 +236,24 @@ return [ 'htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/supplier_order/modules_commandefournisseur.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginDuplicateArrayKey'], + 'htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php' => ['PhanPluginSuspiciousParamOrder'], + 'htdocs/core/modules/takepos/mod_takepos_ref_universal.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/ticket/mod_ticket_universal.php' => ['PhanPluginSuspiciousParamOrder'], 'htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/core/search_page.php' => ['PhanEmptyForeach', 'PhanPluginBothLiteralsBinaryOp'], - 'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/bloc_comment.tpl.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/extrafields_edit.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/core/tpl/extrafields_list_search_title.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], + 'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/list_print_total.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/tpl/notes.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/tpl/notes.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/tpl/object_discounts.tpl.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -334,11 +277,10 @@ return [ 'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/document.php' => ['PhanRedefineFunction'], 'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'], - 'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/don/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'], 'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/don/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/don/info.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/list.php' => ['PhanTypeMismatchProperty'], 'htdocs/don/note.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -349,9 +291,9 @@ return [ 'htdocs/ecm/dir_card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanUndeclaredTypeParameter'], 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/conferenceorbooth_card.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/eventorganization/conferenceorbooth_contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/eventorganization/conferenceorboothattendee_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -375,12 +317,12 @@ return [ 'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/fichinter/card-rec.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], 'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'], 'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/filefunc.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/filefunc.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], @@ -397,13 +339,12 @@ return [ 'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], 'htdocs/fourn/facture/list-rec.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/fourn/facture/paiement.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/fourn/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/fourn/paiement/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ftp/admin/ftpclient.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/holiday/card_group.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/holiday/view_log.php' => ['PhanTypeMismatchDimFetch'], @@ -426,23 +367,20 @@ return [ 'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/imports/import.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/install/fileconf.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/install/inc.php' => ['PhanPluginUndeclaredVariableIsset'], + 'htdocs/install/fileconf.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/install/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/install/repair.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/install/repair.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/install/step2.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], - 'htdocs/install/step5.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanUndeclaredProperty'], 'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/loan/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/loan/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/loan/note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/loan/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/loan/document.php' => ['PhanUndeclaredProperty'], + 'htdocs/loan/note.php' => ['PhanUndeclaredProperty'], 'htdocs/loan/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/loan/schedule.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/margin/customerMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'], @@ -450,7 +388,7 @@ return [ 'htdocs/mrp/class/mo.class.php' => ['PhanTypeMismatchProperty'], 'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], - 'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/mrp/mo_production.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/mrp/tpl/originproductline.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], @@ -458,7 +396,6 @@ return [ 'htdocs/opcachepreload.php' => ['PhanEmptyForeach'], 'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanTypeMismatchProperty'], - 'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -469,18 +406,17 @@ return [ 'htdocs/partnership/partnership_list.php' => ['PhanUndeclaredProperty'], 'htdocs/printing/index.php' => ['PhanUndeclaredProperty'], 'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/ajax/products.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], 'htdocs/product/class/html.formproduct.class.php' => ['PhanUndeclaredProperty'], 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/inventory/class/inventory.class.php' => ['PhanUndeclaredProperty'], 'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/product/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/product/stats/card.php' => ['PhanTypeComparisonFromArray'], @@ -491,8 +427,8 @@ return [ 'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -516,7 +452,7 @@ return [ 'htdocs/projet/element.php' => ['PhanUndeclaredProperty'], 'htdocs/projet/ganttchart.inc.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/ganttview.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/graph_opportunities.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/projet/graph_opportunities.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/projet/index.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/projet/list.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -527,11 +463,11 @@ return [ 'htdocs/projet/tasks/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/projet/tasks/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/task.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'], 'htdocs/public/bookcal/index.php' => ['PhanRedefineFunction'], - 'htdocs/public/company/new.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], + 'htdocs/public/company/new.php' => ['PhanRedefineFunction'], 'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanUndeclaredProperty'], 'htdocs/public/demo/index.php' => ['PhanRedefineFunction'], 'htdocs/public/donations/donateurs_code.php' => ['PhanRedefineFunction'], @@ -554,8 +490,6 @@ return [ 'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], 'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'], @@ -567,15 +501,15 @@ return [ 'htdocs/reception/class/reception.class.php' => ['PhanUndeclaredProperty'], 'htdocs/reception/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/reception/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/reception/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/reception/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach'], 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach'], 'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredProperty'], 'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/recruitment/recruitmentcandidature_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentcandidature_list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -589,7 +523,7 @@ return [ 'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/salaries/paiement_salary.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/salaries/paiement_salary.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/societe/admin/societe.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -597,9 +531,9 @@ return [ 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/societe/class/societe.class.php' => ['PhanTypeMismatchProperty'], 'htdocs/societe/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/societe/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/paymentmodes.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'], - 'htdocs/societe/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/societe/price.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition'], @@ -611,22 +545,19 @@ return [ 'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/takepos/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/takepos/invoice.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/takepos/split.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction'], 'htdocs/theme/eldy/btn.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/theme/eldy/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/main_menu_fa_icons.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/badges.inc.php' => ['PhanRedefineFunction'], 'htdocs/theme/md/btn.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/ticket/card.php' => ['PhanUndeclaredProperty'], 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanUndeclaredProperty'], @@ -640,7 +571,6 @@ return [ 'htdocs/user/class/api_users.class.php' => ['PhanTypeMismatchProperty'], 'htdocs/user/class/user.class.php' => ['PhanUndeclaredProperty'], 'htdocs/user/class/usergroup.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], @@ -675,7 +605,6 @@ return [ 'htdocs/workstation/workstation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/zapier/class/api_zapier.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/zapier/class/hook.class.php' => ['PhanUndeclaredProperty'], - 'internal' => ['PhanUndeclaredConstant'], ], // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. // (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases) diff --git a/dev/tools/phpstan/phpstan_v1_apstats.neon b/dev/tools/phpstan/phpstan_v1_apstats.neon new file mode 100644 index 00000000000..6b599560309 --- /dev/null +++ b/dev/tools/phpstan/phpstan_v1_apstats.neon @@ -0,0 +1,98 @@ +parameters: + tmpDir: ./.github/tmp + parallel: + # Commented some of the settings, reminding the defaults: + # should adapt better to target machines + # jobSize: 8 # default is 20 + processTimeout: 600.0 + # maximumNumberOfProcesses: 20 # default is 32 + # minimumNumberOfJobsPerProcess: 2 # default is 2 + # buffer: 134217728 # 128 MB # Not documented + customRulesetUsed: true + level: 9 + fileExtensions: + - php + paths: + - htdocs + - scripts + excludePaths: + analyseAndScan: + - htdocs/custom/* + - htdocs/documents/* + - htdocs/install/doctemplates/* + - htdocs/langs/* + - htdocs/modulebuilder/template/test/* + - htdocs/support/* + analyse: + - htdocs/includes/* + - htdocs/core/class/lessc.class.php + checkAlwaysTrueCheckTypeFunctionCall: false + checkAlwaysTrueInstanceof: false + checkAlwaysTrueStrictComparison: false + checkClassCaseSensitivity: true + checkFunctionArgumentTypes: true + checkFunctionNameCase: true + checkArgumentsPassedByReference: true + checkMaybeUndefinedVariables: true + checkNullables: false + checkThisOnly: true + checkUnionTypes: false + checkExplicitMixedMissingReturn: true + reportMaybes: false + reportMaybesInMethodSignatures: false + reportStaticMethodSignatures: false + polluteScopeWithLoopInitialAssignments: true + polluteScopeWithAlwaysIterableForeach: true + reportMagicMethods: false + reportMagicProperties: false + treatPhpDocTypesAsCertain: false + ignoreErrors: + - '#.*phan-var#' + - '#is always#' + internalErrorsCountLimit: 50 + cache: + nodesByFileCountMax: 512 + nodesByStringCountMax: 512 + reportUnmatchedIgnoredErrors: false + universalObjectCratesClasses: + - stdClass + - SimpleXMLElement + earlyTerminatingMethodCalls: [] + dynamicConstantNames: + - ICONV_IMPL + - PHP_VERSION + - PHP_MAJOR_VERSION + - PHP_MINOR_VERSION + - PHP_RELEASE_VERSION + - PHP_VERSION_ID + - PHP_EXTRA_VERSION + - PHP_ZTS + - PHP_DEBUG + - PHP_MAXPATHLEN + - PHP_OS + - PHP_OS_FAMILY + - PHP_SAPI + - PHP_EOL + - PHP_INT_MAX + - PHP_INT_MIN + - PHP_INT_SIZE + - PHP_FLOAT_DIG + - PHP_FLOAT_EPSILON + - PHP_FLOAT_MIN + - PHP_FLOAT_MAX + - DEFAULT_INCLUDE_PATH + - PEAR_INSTALL_DIR + - PEAR_EXTENSION_DIR + - PHP_EXTENSION_DIR + - PHP_PREFIX + - PHP_BINDIR + - PHP_BINARY + - PHP_MANDIR + - PHP_LIBDIR + - PHP_DATADIR + - PHP_SYSCONFDIR + - PHP_LOCALSTATEDIR + - PHP_CONFIG_FILE_PATH + - PHP_CONFIG_FILE_SCAN_DIR + - PHP_SHLIB_SUFFIX + - PHP_FD_SETSIZE diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index d870ff1504b..9a34c97bc3f 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -580,7 +580,6 @@ NewProperty NoActiveEstablishmentDefined NoAddMember NoAuthorityURLDefined -NoBankAccountFound NoCurrencyRateSelected NoEntriesToShow NoEstablishmentFound diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 77f3fb2f042..8b1eebb24c3 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -71,9 +71,10 @@ $permissiontodelete = $user->hasRight('accounting', 'chartofaccount'); if ($user->socid > 0) { accessforbidden(); } -if (!$user->hasRight('accounting', 'chartofaccount')) { +if (!$permissiontoadd) { accessforbidden(); } +// now $permissiontoadd or $user->hasRight('accounting', 'chartofaccount') are always equal to 1 // Load variable for pagination $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; @@ -162,7 +163,7 @@ if (empty($reshook)) { || (GETPOSTINT('chartofaccounts') > 0 && GETPOSTINT('chartofaccounts') != getDolGlobalInt('CHARTOFACCOUNTS'))) { // a submit of form is done and chartofaccounts combo has been modified $error = 0; - if ($chartofaccounts > 0 && $permissiontoadd) { + if ($chartofaccounts > 0 /* && $permissiontoadd */) { $country_code = ''; // Get language code for this $chartofaccounts $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a'; @@ -209,7 +210,7 @@ if (empty($reshook)) { } } - if ($action == 'disable' && $permissiontoadd) { + if ($action == 'disable' /* && $permissiontoadd */) { if ($accounting->fetch($id)) { $mode = GETPOSTINT('mode'); $result = $accounting->accountDeactivate($id, $mode); @@ -219,7 +220,7 @@ if (empty($reshook)) { } $action = 'update'; - } elseif ($action == 'enable' && $permissiontoadd) { + } elseif ($action == 'enable' /* && $permissiontoadd */) { if ($accounting->fetch($id)) { $mode = GETPOSTINT('mode'); $result = $accounting->accountActivate($id, $mode); @@ -350,7 +351,8 @@ if ($resql) { $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + // if null contextpage is forced to 'accountingaccountlist' so never empty + if (/* !empty($contextpage) && */$contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { @@ -398,9 +400,9 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array(); - if ($user->hasRight('accounting', 'chartofaccount')) { - $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); - } + // if ($permissiontoadd) { // test is always true + $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + // } if (in_array($massaction, array('presend', 'predelete', 'closed'))) { $arrayofmassactions = array(); } @@ -471,20 +473,21 @@ if ($resql) { $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); - $moreforfilter = ''; - if ($moreforfilter) { - print '
'; - print $moreforfilter; - print '
'; - } - $accountstatic = new AccountingAccount($db); $accountparent = new AccountingAccount($db); $totalarray = array(); $totalarray['nbfield'] = 0; + $moreforfilter = ''; + // if ($moreforfilter) { + // print '
'; + // print $moreforfilter; + // print '
'; + // } + print '
'; - print '
Commit IDDateReported on
Yogosha
Reported on
GIT
Reported on
CVE
TitleBranch of fix
Commit IDDateReported on
Yogosha
Reported on
GIT
Reported on
CVE
TitleBranch of fix
'.dol_print_date($db->jdate($obj->periode), 'day').''.dol_print_date($db->jdate($obj->period), 'day').''.$langs->trans("Referers").''.$langs->trans("NbOfMembers").' ('.$langs->trans("AllTime").')
'.$langs->trans("Period")."".dol_print_date($charge->periode, 'day')."
'."\n"; + // print '
'."\n"; + print '
'."\n"; // Fields title search // -------------------------------------------------------------------- @@ -623,7 +626,7 @@ if ($resql) { // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''."\n"; if (!$i) { $totalarray['nbfield']++; @@ -779,7 +782,7 @@ if ($resql) { // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''."\n"; if (!$i) { $totalarray['nbfield']++; diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index e5a37b8b709..8790cb6c9bc 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -54,14 +54,6 @@ $search_subaccount = GETPOST('search_subaccount', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $search_type = GETPOST('search_type', 'intcomma'); -// Security check -if ($user->socid > 0) { - accessforbidden(); -} -if (!$user->hasRight('accounting', 'chartofaccount')) { - accessforbidden(); -} - // Load variable for pagination $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -92,6 +84,14 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { unset($arrayfields['reconcilable']); } +// Security check +if ($user->socid > 0) { + accessforbidden(); +} +if (!$user->hasRight('accounting', 'chartofaccount')) { // after this test, $user->hasRight('accounting', 'chartofaccount') is always valid + accessforbidden(); +} + /* * Actions @@ -124,6 +124,13 @@ if (empty($reshook)) { $search_type = ""; $search_array_options = array(); } + + if ($action == 'enable' /* && $user->hasRight('accounting', 'chartofaccount') */) { // test useless + setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'errors'); + } + if ($action == 'disable' /* && $user->hasRight('accounting', 'chartofaccount') */) { + setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'errors'); + } } @@ -142,7 +149,7 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-adm // Customer -$sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '1' as type, sa.entity, sa.client as nature"; +$sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '1' as type, sa.entity, sa.client as nature, sa.fournisseur as nature2"; $sql .= " FROM ".MAIN_DB_PREFIX."societe sa"; $sql .= " WHERE sa.entity IN (".getEntity('societe').")"; $sql .= " AND sa.code_compta <> ''"; @@ -163,7 +170,6 @@ if (strlen(trim($search_subaccount))) { } } - //var_dump($search_subaccount); exit; if ($search_subaccount_tmp) { if ($weremovedsomezero) { $search_subaccount_tmp_clean = $search_subaccount_tmp; @@ -190,7 +196,8 @@ if (!empty($search_type) && $search_type >= 0) { // Supplier $sql .= " UNION "; -$sql .= " SELECT sa.rowid, sa.nom as label, sa.code_compta_fournisseur as subaccount, '2' as type, sa.entity, '0' as nature FROM ".MAIN_DB_PREFIX."societe sa"; +$sql .= " SELECT sa.rowid, sa.nom as label, sa.code_compta_fournisseur as subaccount, '2' as type, sa.entity, sa.client as nature, sa.fournisseur as nature2"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe sa"; $sql .= " WHERE sa.entity IN (".getEntity('societe').")"; $sql .= " AND sa.code_compta_fournisseur <> ''"; //print $sql; @@ -237,7 +244,8 @@ if (!empty($search_type) && $search_type >= 0) { // User - Employee $sql .= " UNION "; -$sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '3' as type, u.entity, '0' as nature FROM ".MAIN_DB_PREFIX."user u"; +$sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '3' as type, u.entity, '0' as nature, '0' as nature2"; +$sql .= " FROM ".MAIN_DB_PREFIX."user u"; $sql .= " WHERE u.entity IN (".getEntity('user').")"; $sql .= " AND u.accountancy_code <> ''"; //print $sql; @@ -368,7 +376,7 @@ if ($resql) { print ''; } if (!empty($arrayfields['type']['checked'])) { - print ''; + print ''; } if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { if (!empty($arrayfields['reconcilable']['checked'])) { @@ -409,12 +417,25 @@ if ($resql) { } print "\n"; + $companystatic = new Societe($db); + $totalarray = array(); $totalarray['nbfield'] = 0; $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); + if ($obj->type == 1) { + $companystatic->id = $obj->id; + $companystatic->client = $obj->nature; + $companystatic->fournisseur = 0; + } + if ($obj->type == 2) { + $companystatic->id = $obj->id; + $companystatic->client = 0; + $companystatic->fournisseur = $obj->nature2; + } + print ''; // Action column @@ -466,7 +487,12 @@ if ($resql) { // Customer if ($obj->type == 1) { - $s .= ''.$langs->trans("Customer").''; + $s .= ''; + $s .= $langs->trans("Customer"); + $s .= ''; + if ($obj->nature == 2) { + $s .= ' ('.$langs->trans("Prospect").')'; + } } elseif ($obj->type == 2) { // Supplier $s .= ''.$langs->trans("Supplier").''; @@ -475,9 +501,6 @@ if ($resql) { $s .= ''.$langs->trans("Employee").''; } print $s; - if ($obj->nature == 2) { - print ' ('.$langs->trans("Prospect").')'; - } print ''; if (!$i) { $totalarray['nbfield']++; @@ -489,11 +512,11 @@ if ($resql) { if (!empty($arrayfields['reconcilable']['checked'])) { print '\n"; // Publish member information on public annuary -$linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModEnabled('multicompany')) ? '?entity='.((int) $conf->entity) : ''); -print '\n"; +/* Feature disabled by default for security purpose. + $linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModEnabled('multicompany')) ? '?entity='.((int) $conf->entity) : ''); + print '\n"; +*/ // Allow members to change type on renewal forms /* To test during next beta diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index e80c263c78e..630205413d3 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -19,8 +19,11 @@ /** * @var Adherent $object + * @var Canvas $this * @var Conf $conf * @var Translate $langs + * + * @var string $canvas */ // Protection to avoid direct call of template diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 0b19fcb851a..626833d8385 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012 Philippe Grand +/* Copyright (C) 2010 Regis Houssin + * Copyright (C) 2012 Philippe Grand * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -19,8 +19,11 @@ /** * @var Adherent $object + * @var Canvas $this * @var Conf $conf * @var Translate $langs + * + * @var string $canvas */ // Protection to avoid direct call of template diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index 30bd5eded83..54c3acafa6a 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012-2022 Philippe Grand +/* Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2012-2022 Philippe Grand * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -19,9 +19,12 @@ /** * @var Adherent $object + * @var Canvas $this * @var Conf $conf * @var Translate $langs * @var User $user + * + * @var string $canvas */ // Protection to avoid direct call of template diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 37c52af55e8..0910e85b9d3 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1126,9 +1126,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // State if (!getDolGlobalString('MEMBER_DISABLE_STATE')) { print ''; +print ''; // Other attributes $cols = 2; @@ -617,7 +617,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Third party Dolibarr if (isModEnabled('societe')) { print ''; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index bc8a42046a2..2b2c1d0a198 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -335,6 +335,7 @@ class FormProduct } } + $out .= ''; $out .= ''; print ''; @@ -2580,7 +2581,10 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT print ''; if (!empty($extralabels)) { foreach ($extralabels as $key) { - print ''; + // Show field if not hidden + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + print ''; + } } } if ($user->hasRight('produit', 'supprimer') || $user->hasRight('service', 'supprimer')) { diff --git a/htdocs/product/price_suppliers.php b/htdocs/product/price_suppliers.php index 82c500e09c1..220f9f667dc 100644 --- a/htdocs/product/price_suppliers.php +++ b/htdocs/product/price_suppliers.php @@ -700,7 +700,13 @@ if ($id > 0 || $ref) { } print $form->selectMultiCurrency($currencycodetouse, "multicurrency_code", 1); print '     '.$langs->trans("CurrencyRate").' '; - print ''; + print ''; print ''; print ''; @@ -709,7 +715,7 @@ if ($id > 0 || $ref) { $pricesupplierincurrencytouse = (GETPOST('multicurrency_price') ? GETPOST('multicurrency_price') : (isset($object->fourn_multicurrency_price) ? $object->fourn_multicurrency_price : '')); print ''; // Price qty min @@ -718,7 +724,7 @@ if ($id > 0 || $ref) { print ''; print ''; print ' '; - print $form->selectPriceBaseType('', "disabled_price_base_type"); + print $form->selectPriceBaseType('', "disabled_price_base_type", 1); print ''; $currencies = array(); @@ -780,7 +786,7 @@ if ($id > 0 || $ref) { print ''; print ''; } diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index a0d2cf1a04a..f2708e0df27 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -217,7 +217,7 @@ if ($result || !($id > 0)) { // Product print ''; // Tag diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 69603ef5bdd..23a987a6243 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -49,6 +49,8 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); + +$socid = 0; if ($user->socid) { $socid = $user->socid; } @@ -60,6 +62,12 @@ $hookmanager->initHooks(array('productstatsmo')); $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); +if (empty($sortorder)) { + $sortorder = "DESC"; +} +if (empty($sortfield)) { + $sortfield = "c.date_valid"; +} $page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); if (empty($page) || $page == -1) { $page = 0; @@ -67,12 +75,6 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) { - $sortorder = "DESC"; -} -if (!$sortfield) { - $sortfield = "c.date_valid"; -} $search_month = GETPOSTINT('search_month'); $search_year = GETPOSTINT('search_year'); @@ -82,8 +84,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_year = ''; } -$socid = 0; - $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); @@ -167,7 +167,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(c.date_valid) IN ('.$db->sanitize($search_year).')'; } - if ($socid) { + if ($socid > 0) { $sql .= " AND s.rowid = ".((int) $socid); } $sql .= " GROUP BY c.rowid, c.ref, c.date_valid, c.status"; @@ -205,12 +205,8 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; print ''; - if (!empty($sortfield)) { - print ''; - } - if (!empty($sortorder)) { - print ''; - } + print ''; + print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index ba632ea3a59..df00f9381a6 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -108,7 +108,7 @@ if ($id > 0 || !empty($ref)) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } - llxHeader("", "", $langs->trans("CardProduct".$product->type), '', 0, 0, '', '', '', '', 'mod-product page-stats_supplier_proposal'); + llxHeader("", $langs->trans("CardProduct".$product->type), '', '', 0, 0, '', '', '', 'mod-product page-stats_supplier_proposal'); if ($result > 0) { $head = product_prepare_head($product); diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 4736a24eff0..1914448023d 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -114,7 +114,7 @@ $usercandelete = $user->hasRight('stock', 'supprimer'); $error = 0; -$parameters = array('id' => $id, 'ref' => $ref); +$parameters = array('context' => 'warehousecard', 'id' => $id, 'ref' => $ref); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -439,7 +439,7 @@ if ($action == 'create') { } // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm); + $parameters = array('context' => 'warehousecard', 'formConfirm' => $formconfirm); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $formconfirm .= $hookmanager->resPrint; @@ -599,7 +599,7 @@ if ($action == 'create') { */ print "
\n"; - $parameters = array(); + $parameters = array('context' => 'warehousecard'); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { if (empty($action) || $action == 'classin') { @@ -634,7 +634,7 @@ if ($action == 'create') { print '
'; print '
'; - if ($user->hasRight('accounting', 'chartofaccount')) { + // if ($permissiontoadd) { // test is always true print ''; print img_edit(); print ''; @@ -632,14 +635,14 @@ if ($resql) { print img_delete(); print ''; print ' '; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { - $selected = 1; - } - print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; } + print ''; } + // } print ''; - if ($user->hasRight('accounting', 'chartofaccount')) { + // if ($permissiontoadd) { // test is always true print ''; print img_edit(); print ''; @@ -788,14 +791,14 @@ if ($resql) { print img_delete(); print ''; print ' '; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { - $selected = 1; - } - print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; } + print ''; } + // } print ''.$form->selectarray('search_type', array('1'=>$langs->trans('Customer'), '2'=>$langs->trans('Supplier'), '3'=>$langs->trans('Employee')), $search_type, 1).''.$form->selectarray('search_type', array('1'=>$langs->trans('Customer').' / '.$langs->trans("Prospect"), '2'=>$langs->trans('Supplier'), '3'=>$langs->trans('Employee')), $search_type, 1).'
'; if (empty($obj->reconcilable)) { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index ebf0dec3396..60409e47f0f 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -495,6 +495,8 @@ if (empty($reshook)) { $permissiontodelete = $user->hasRight('societe', 'supprimer'); $permissiontoadd = $user->hasRight('societe', 'creer'); $uploaddir = $conf->societe->dir_output; + + global $error; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) { diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 62c058fbf95..7834b2a6d0f 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -459,6 +459,8 @@ if (empty($reshook)) { $permissiontodelete = $user->hasRight('societe', 'supprimer'); $permissiontoadd = $user->hasRight('societe', 'creer'); $uploaddir = $conf->societe->dir_output; + + global $error; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if (!$error && $action == 'deletebookkeepingwriting' && $confirm == "yes" && $user->hasRight('accounting', 'mouvements', 'supprimer')) { diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 0bf41cf2e42..379e2b802e1 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Jamal Elbaz * Copyright (C) 2016-2017 Alexandre Spangaro * Copyright (C) 2018-2024 Frédéric France - * 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 @@ -129,7 +129,7 @@ class AccountancyCategory // extends CommonObject public $sdc; /** - * @var array Sum debit credit per month + * @var array Sum debit credit per month */ public $sdcpermonth; @@ -775,10 +775,11 @@ class AccountancyCategory // extends CommonObject * * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @param int $active 1= active, 0=not active + * @param int $id_report id of the report * @return never|array|int Array of groups or -1 if error * @see getCatsCpts(), getCptsCat() */ - public function getCats($categorytype = -1, $active = 1) + public function getCats($categorytype = -1, $active = 1, $id_report = 1) { global $conf, $mysoc; @@ -790,6 +791,7 @@ class AccountancyCategory // extends CommonObject $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens"; $sql .= " FROM ".$this->db->prefix().$this->table_element." as c"; $sql .= " WHERE c.active = " . (int) $active; + $sql .= " AND c.fk_report=".((int) $id_report); $sql .= " AND c.entity = ".$conf->entity; if ($categorytype >= 0) { $sql .= " AND c.category_type = 1"; diff --git a/htdocs/accountancy/class/accountancyimport.class.php b/htdocs/accountancy/class/accountancyimport.class.php index bcf7905f223..a35235e0218 100644 --- a/htdocs/accountancy/class/accountancyimport.class.php +++ b/htdocs/accountancy/class/accountancyimport.class.php @@ -136,7 +136,7 @@ class AccountancyImport $sens = 'C'; } - return "'" . $this->db->escape($sens) . "'"; + return $sens; } return "''"; diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 980779ff254..8fdbd1a300c 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -1,9 +1,9 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2023 Frédéric France - * Copyright (C) 2024 Alexandre Janniaux +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2023-2024 Frédéric France + * Copyright (C) 2024 Alexandre Janniaux * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 53e6efa4934..f8573c3f75e 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -3,7 +3,8 @@ * Copyright (C) 2015-2022 Alexandre Spangaro * Copyright (C) 2015-2020 Florian Henry * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Jose MARTINEZ * * 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 @@ -68,7 +69,7 @@ class BookKeeping extends CommonObject public $doc_date; /** - * @var int Deadline for payment + * @var int|null|'' Deadline for payment */ public $date_lim_reglement; @@ -324,7 +325,7 @@ class BookKeeping extends CommonObject $this->piece_num = 0; // First check if line not yet already in bookkeeping. - // Note that we must include 'doc_type - fk_doc - numero_compte - label' to be sure to have unicity of line (because we may have several lines + // Note that we must include 'doc_type - fk_doc - numero_compte - label - subledger_account (if not empty)' to be sure to have unicity of line (because we may have several lines // with same doc_type, fk_doc, numero_compte for 1 invoice line when using localtaxes with same account) // WARNING: This is not reliable, label may have been modified. This is just a small protection. // The page that make transfer make the test on couple (doc_type - fk_doc) only. @@ -338,6 +339,9 @@ class BookKeeping extends CommonObject } $sql .= " AND numero_compte = '".$this->db->escape($this->numero_compte)."'"; $sql .= " AND label_operation = '".$this->db->escape($this->label_operation)."'"; + if (!empty($this->subledger_account)) { + $sql .= " AND subledger_account = '".$this->db->escape($this->subledger_account)."'"; + } $sql .= " AND entity = ".$conf->entity; // Do not use getEntity for accounting features $resql = $this->db->query($sql); @@ -2863,10 +2867,8 @@ class BookKeeping extends CommonObject $sql = 'SELECT'; $sql .= " t.numero_compte,"; - $sql .= " t.label_compte,"; if ($separate_auxiliary_account) { - $sql .= " t.subledger_account,"; - $sql .= " t.subledger_label,"; + $sql .= " NULLIF(t.subledger_account, '') as subledger_account,"; // fix db issues with Null or "" values } $sql .= " aa.pcg_type,"; $sql .= " (SUM(t.credit) - SUM(t.debit)) as opening_balance"; @@ -2878,10 +2880,11 @@ class BookKeeping extends CommonObject $sql .= ' AND aa.pcg_type IN (' . $this->db->sanitize(implode(',', $pcg_type_filter), 1) . ')'; $sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($fiscal_period->date_start) . "'"; $sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($fiscal_period->date_end) . "'"; - $sql .= ' GROUP BY t.numero_compte, t.label_compte, aa.pcg_type'; + $sql .= ' GROUP BY t.numero_compte, aa.pcg_type'; if ($separate_auxiliary_account) { - $sql .= ' ,t.subledger_account, t.subledger_label'; + $sql .= " , NULLIF(t.subledger_account, '')"; } + $sql .= ' HAVING (SUM(t.credit) - SUM(t.debit)) != 0 '; // Exclude rows with opening_balance = 0 $sql .= $this->db->order("t.numero_compte", "ASC"); $resql = $this->db->query($sql); @@ -2902,24 +2905,41 @@ class BookKeeping extends CommonObject $bookkeeping = new BookKeeping($this->db); $bookkeeping->doc_date = $new_fiscal_period->date_start; - $bookkeeping->date_lim_reglement = 0; - $bookkeeping->doc_ref = $new_fiscal_period->label; + + $bookkeeping->date_lim_reglement = ''; + $bookkeeping->doc_ref = $fiscal_period->label; + $bookkeeping->date_creation = $now; $bookkeeping->doc_type = 'closure'; - $bookkeeping->fk_doc = $new_fiscal_period->id; + $bookkeeping->fk_doc = $fiscal_period->id; $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add $bookkeeping->thirdparty_code = ''; if ($separate_auxiliary_account) { $bookkeeping->subledger_account = $obj->subledger_account; - $bookkeeping->subledger_label = $obj->subledger_label; + $sql = 'SELECT'; + $sql .= " subledger_label"; + $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; + $sql .= " WHERE subledger_account = '" . $this->db->escape($obj->subledger_account) . "'"; + $sql .= " ORDER BY doc_date DESC"; + $sql .= " LIMIT 1"; + $result = $this->db->query($sql); + if (!$result) { + $this->errors[] = 'Error: ' . $this->db->lasterror(); + dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR); + $error++; + } + $objtmp = $this->db->fetch_object($result); + $bookkeeping->subledger_label = $objtmp->subledger_label; // latest subledger label used } else { - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; + $bookkeeping->subledger_account = null; + $bookkeeping->subledger_label = null; } $bookkeeping->numero_compte = $obj->numero_compte; - $bookkeeping->label_compte = $obj->label_compte; + $accountingaccount = new AccountingAccount($this->db); + $accountingaccount->fetch(0, $obj->numero_compte); + $bookkeeping->label_compte = $accountingaccount->label; // latest account label used $bookkeeping->label_operation = $new_fiscal_period->label; $bookkeeping->montant = $mt; @@ -2933,8 +2953,7 @@ class BookKeeping extends CommonObject $result = $bookkeeping->create($user); if ($result < 0) { - $this->error = $bookkeeping->error; - $this->errors = $bookkeeping->errors; + $this->setErrorsFromObject($bookkeeping); $error++; break; } @@ -2949,21 +2968,35 @@ class BookKeeping extends CommonObject $bookkeeping = new BookKeeping($this->db); $bookkeeping->doc_date = $new_fiscal_period->date_start; - $bookkeeping->date_lim_reglement = 0; - $bookkeeping->doc_ref = $new_fiscal_period->label; + + $bookkeeping->date_lim_reglement = ''; + $bookkeeping->doc_ref = $fiscal_period->label; + $bookkeeping->date_creation = $now; $bookkeeping->doc_type = 'closure'; - $bookkeeping->fk_doc = $new_fiscal_period->id; + $bookkeeping->fk_doc = $fiscal_period->id; $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add $bookkeeping->thirdparty_code = ''; if ($separate_auxiliary_account) { - $bookkeeping->subledger_label = ''; $bookkeeping->subledger_account = $obj->subledger_account; - $bookkeeping->subledger_label = $obj->subledger_label; + $sql = 'SELECT'; + $sql .= " subledger_label"; + $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; + $sql .= " WHERE subledger_account = '" . $this->db->escape($obj->subledger_account) . "'"; + $sql .= " ORDER BY doc_date DESC"; + $sql .= " LIMIT 1"; + $result = $this->db->query($sql); + if (!$result) { + $this->errors[] = 'Error: ' . $this->db->lasterror(); + dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR); + $error++; + } + $objtmp = $this->db->fetch_object($result); + $bookkeeping->subledger_label = $objtmp->subledger_label; // latest subledger label used } else { - $bookkeeping->subledger_account = ''; - $bookkeeping->subledger_label = ''; + $bookkeeping->subledger_account = null; + $bookkeeping->subledger_label = null; } $bookkeeping->numero_compte = $accountingaccount->account_number; @@ -2981,8 +3014,7 @@ class BookKeeping extends CommonObject $result = $bookkeeping->create($user); if ($result < 0) { - $this->error = $bookkeeping->error; - $this->errors = $bookkeeping->errors; + $this->setErrorsFromObject($bookkeeping); $error++; } } diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 923f977c544..964369fb545 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -864,14 +864,14 @@ class Lettering extends BookKeeping $sql = "SELECT DISTINCT tl2.fk_link, tl2.fk_doc"; $sql .= " FROM ("; // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset - $sql .= " SELECT DISTINCT " . $this->db->ifsql("tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tl.".$this->db->sanitize($linked_info['fk_link']))." AS fk_link, tl.".$this->db->sanitize($linked_info['fk_doc'])." AS fk_doc"; + $sql .= " SELECT DISTINCT " . $this->db->ifsql("tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent'])." IS NOT NULL", "tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tl.".$this->db->sanitize($linked_info['fk_link']))." AS fk_link, tl.".$this->db->sanitize($linked_info['fk_doc'])." AS fk_doc"; $sql .= " FROM " . MAIN_DB_PREFIX .$this->db->sanitize($linked_info['table'])." AS tl"; // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $this->db->sanitize($linked_info['table_link_line']) . " AS tll ON tll.".$this->db->sanitize($linked_info['fk_table_link_line']) . " = tl.".$this->db->sanitize($linked_info['fk_line_link']); $sql .= ") AS tl"; $sql .= " LEFT JOIN ("; // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset - $sql .= " SELECT DISTINCT " . $this->db->ifsql("tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tl.".$this->db->sanitize($linked_info['fk_link']))." AS fk_link, tl.".$this->db->sanitize($linked_info['fk_doc'])." AS fk_doc"; + $sql .= " SELECT DISTINCT " . $this->db->ifsql("tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent'])." IS NOT NULL", "tll.".$this->db->sanitize($linked_info['fk_table_link_line_parent']), "tl.".$this->db->sanitize($linked_info['fk_link']))." AS fk_link, tl.".$this->db->sanitize($linked_info['fk_doc'])." AS fk_doc"; $sql .= " FROM " . MAIN_DB_PREFIX .$this->db->sanitize($linked_info['table'])." AS tl"; // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $this->db->sanitize($linked_info['table_link_line']) . " AS tll ON tll.".$this->db->sanitize($linked_info['fk_table_link_line']) . " = tl.".$this->db->sanitize($linked_info['fk_line_link']); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index ecf9ce56121..2b166dff8d9 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -461,12 +461,12 @@ SELECT fk_facture, COUNT(fd.rowid) as nb FROM - ".MAIN_DB_PREFIX."facturedet as fd + ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.product_type <= 2 AND fd.fk_code_ventilation <= 0 AND fd.total_ttc <> 0 - AND fk_facture IN (".$db->sanitize(implode(",", array_keys($tabfac))).") + AND fk_facture IN (".$db->sanitize(implode(",", array_keys($tabfac))).") GROUP BY fk_facture "; $resql = $db->query($sql); diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 472a376635a..b8d13a37377 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -127,7 +127,9 @@ if ($action == 'set_default') { $res3 = dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity); $res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity); $res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity); - $res7 = dolibarr_set_const($db, 'MEMBER_PUBLIC_ENABLED', GETPOST('MEMBER_PUBLIC_ENABLED', 'alpha'), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MEMBER_PUBLIC_ENABLED')) { + $res7 = dolibarr_set_const($db, 'MEMBER_PUBLIC_ENABLED', GETPOST('MEMBER_PUBLIC_ENABLED', 'alpha'), 'chaine', 0, '', $conf->entity); + } $res8 = dolibarr_set_const($db, 'MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF', GETPOST('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF', 'alpha'), 'chaine', 0, '', $conf->entity); $res9 = dolibarr_set_const($db, 'MEMBER_SUBSCRIPTION_START_AFTER', GETPOST('MEMBER_SUBSCRIPTION_START_AFTER', 'alpha'), 'chaine', 0, '', $conf->entity); // Use vat for invoice creation @@ -138,7 +140,7 @@ if ($action == 'set_default') { $res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity); } } - if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0 || $res7 < 0) { + if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0 || $res7 < 0 || $res8 < 0 || $res9 < 0) { setEventMessages('ErrorFailedToSaveData', null, 'errors'); $db->rollback(); } else { @@ -549,10 +551,12 @@ print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL', getDolGlobalInt('ADH print "
'.$langs->trans("Public", getDolGlobalString('MAIN_INFO_SOCIETE_NOM'), $linkofpubliclist).''; -print $form->selectyesno('MEMBER_PUBLIC_ENABLED', getDolGlobalInt('MEMBER_PUBLIC_ENABLED'), 1, false, 0, 1); -print "
'.$langs->trans("Public", getDolGlobalString('MAIN_INFO_SOCIETE_NOM'), $linkofpubliclist).''; + print $form->selectyesno('MEMBER_PUBLIC_ENABLED', getDolGlobalInt('MEMBER_PUBLIC_ENABLED'), 1, false, 0, 1); + print "
'.$langs->trans('State').''; - if ($soc->country_id) { + if ($soc->country_id || GETPOSTISSET('country_id')) { print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, $soc->country_code); + print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOSTINT('state_id') : $soc->state_id, GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $soc->country_code); } else { print $countrynotdefined; } @@ -1623,7 +1623,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (isModEnabled('mailman') && getDolGlobalString('ADHERENT_USE_SPIP')) { $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value' => ''); } - print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 220); + print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 250); } // Confirm resiliate diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 63ec5e4c772..26833536fee 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonpeople.class.php'; /** - * Class to manage members of a foundation + * Class to manage members of a foundation. */ class Adherent extends CommonObject { @@ -112,14 +112,14 @@ class Adherent extends CommonObject public $civility; /** - * @var string company name + * @var ?string company name * @deprecated Use $company * @see $company */ public $societe; /** - * @var string company name + * @var ?string company name */ public $company; @@ -317,7 +317,7 @@ class Adherent extends CommonObject /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10), @@ -374,7 +374,7 @@ class Adherent extends CommonObject */ const STATUS_VALIDATED = 1; /** - * Resiliated + * Resiliated (membership end and was not renew) */ const STATUS_RESILIATED = 0; /** @@ -626,7 +626,9 @@ class Adherent extends CommonObject $now = dol_now(); // Clean parameters - $this->import_key = trim($this->import_key); + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } // Check parameters if (getDolGlobalString('ADHERENT_MAIL_REQUIRED') && !isValidEmail($this->email)) { @@ -644,6 +646,9 @@ class Adherent extends CommonObject } } + // setEntity will set entity with the right value if empty or change it for the right value if multicompany module is active + $this->entity = setEntity($this); + $this->db->begin(); // Insert member @@ -656,7 +661,7 @@ class Adherent extends CommonObject $sql .= ", ".($user->id > 0 ? $user->id : "null"); // Can be null because member can be created by a guest or a script $sql .= ", null, null, '".$this->db->escape($this->morphy)."'"; $sql .= ", ".((int) $this->typeid); - $sql .= ", ".$conf->entity; + $sql .= ", ".((int) $this->entity); $sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); $sql .= ", ".(!empty($this->ip) ? "'".$this->db->escape($this->ip)."'" : "null"); $sql .= ")"; @@ -824,7 +829,8 @@ class Adherent extends CommonObject $sql .= ", fk_user_mod = ".($user->id > 0 ? $user->id : 'null'); // Can be null because member can be create by a guest $sql .= " WHERE rowid = ".((int) $this->id); - // If we change the type of membership, we set also label of new type + // If we change the type of membership, we set also label of new type.. + '@phan-var-force Adherent $oldcopy'; if (!empty($this->oldcopy) && $this->typeid != $this->oldcopy->typeid) { $sql2 = "SELECT libelle as label"; $sql2 .= " FROM ".MAIN_DB_PREFIX."adherent_type"; @@ -3071,11 +3077,13 @@ class Adherent extends CommonObject $tmp = dol_getdate($now); $datetosearchfor = dol_time_plus_duree(dol_mktime(0, 0, 0, $tmp['mon'], $tmp['mday'], $tmp['year'], 'tzserver'), (int) $daysbeforeend, 'd'); + $datetosearchforend = dol_time_plus_duree(dol_mktime(23, 59, 59, $tmp['mon'], $tmp['mday'], $tmp['year'], 'tzserver'), (int) $daysbeforeend, 'd'); $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'adherent'; $sql .= " WHERE entity = ".((int) $conf->entity); // Do not use getEntity('adherent').")" here, we want the batch to be on its entity only; $sql .= " AND statut = 1"; - $sql .= " AND datefin = '".$this->db->idate($datetosearchfor)."'"; + $sql .= " AND datefin >= '".$this->db->idate($datetosearchfor)."'"; + $sql .= " AND datefin <= '".$this->db->idate($datetosearchforend)."'"; if ((int) $fk_adherent_type > 0) { $sql .= " AND fk_adherent_type = ".((int) $fk_adherent_type); } @@ -3099,11 +3107,14 @@ class Adherent extends CommonObject $nbko++; $listofmembersko[$adherent->id] = $adherent->id; } else { - $adherent->fetch_thirdparty(); - - // Language code to use ($languagecodeformember) is default language of thirdparty, if no thirdparty, the language found from country of member then country of thirdparty, and if still not found we use the language of company. - $languagefromcountrycode = getLanguageCodeFromCountryCode($adherent->country_code ? $adherent->country_code : $adherent->thirdparty->country_code); - $languagecodeformember = (empty($adherent->thirdparty->default_lang) ? ($languagefromcountrycode ? $languagefromcountrycode : $mysoc->default_lang) : $adherent->thirdparty->default_lang); + $thirdpartyres = $adherent->fetch_thirdparty(); + if ($thirdpartyres === -1) { + $languagecodeformember = $mysoc->default_lang; + } else { + // Language code to use ($languagecodeformember) is default language of thirdparty, if no thirdparty, the language found from country of member then country of thirdparty, and if still not found we use the language of company. + $languagefromcountrycode = getLanguageCodeFromCountryCode($adherent->country_code ? $adherent->country_code : $adherent->thirdparty->country_code); + $languagecodeformember = (empty($adherent->thirdparty->default_lang) ? ($languagefromcountrycode ? $languagefromcountrycode : $mysoc->default_lang) : $adherent->thirdparty->default_lang); + } // Send reminder email $outputlangs = new Translate('', $conf); @@ -3295,7 +3306,7 @@ class Adherent extends CommonObject $return .= '
'; $return .= ''; if (property_exists($this, 'photo') || !empty($this->photo)) { - $return .= Form::showphoto('memberphoto', $this, 0, 60, 0, 'photokanban photoref photowithmargin photologintooltip', 'small', 0, 1); + $return .= Form::showphoto('memberphoto', $this, 0, 60, 0, 'photokanban photowithmargin photologintooltip', 'small', 0, 1); } else { $return .= img_picto('', 'user'); } diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index dee174fb5db..f31f75ea7b1 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -98,7 +98,7 @@ class Subscription extends CommonObject public $fk_bank; /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10), diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index bc86a13d033..05f86c5989d 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -136,6 +136,13 @@ if ($conf->use_javascript_ajax) { $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusExcluded"), $sumMembers['total']['members_excluded']); $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), $sumMembers['total']['members_resiliated']); + /** + * @var string $badgeStatus0 + * @var string $badgeStatus1 + * @var string $badgeStatus4 + * @var string $badgeStatus6 + * @var string $badgeStatus8 + */ include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 8769e9916cc..26c7594192c 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -280,7 +280,6 @@ if (empty($reshook)) { $search_filter = ""; $search_status = ""; $search_import_key = ''; - $catid = ""; $search_all = ""; $toselect = array(); $search_datec_start = ''; @@ -523,7 +522,7 @@ if ($search_firstname) { $sql .= natural_search("d.firstname", $search_firstname); } if ($search_lastname) { - $sql .= natural_search(array("d.firstname", "d.lastname", "d.societe"), $search_lastname); + $sql .= natural_search("d.lastname", $search_lastname); } if ($search_gender != '' && $search_gender != '-1') { $sql .= natural_search("d.gender", $search_gender); @@ -532,7 +531,7 @@ if ($search_login) { $sql .= natural_search("d.login", $search_login); } if ($search_company) { - $sql .= natural_search("s.nom", $search_company); + $sql .= natural_search(array("s.nom", "d.societe"), $search_company); } if ($search_email) { $sql .= natural_search("d.email", $search_email); diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 3f0ebd040f2..8e5362fdeec 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -95,6 +95,7 @@ print load_fiche_titre($title, '', $memberstatic->picto); //dol_mkdir($dir); $data = array(); $tab = null; +$label = ''; if ($mode) { // Define sql @@ -263,6 +264,7 @@ if ($mode && !count($data)) { // Show graphics if (count($arrayjs) && $mode == 'memberbycountry') { + global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; if (is_readable($color_file)) { include $color_file; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index a4d7451af03..3b7b80d6935 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -608,7 +608,7 @@ if (getDolGlobalInt('MAIN_MULTILANGS')) { // Public $linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModEnabled('multicompany')) ? '?entity='.$conf->entity : ''); -print '
'.$form->textwithpicto($langs->trans("PublicFile"), $langs->trans("Public", getDolGlobalString('MAIN_INFO_SOCIETE_NOM'), $linkofpubliclist), 1, 'help', '', 0, 3, 'publicfile').''.yn($object->public).'
'.$form->textwithpicto($langs->trans("MembershipPublic"), $langs->trans("Public", getDolGlobalString('MAIN_INFO_SOCIETE_NOM'), $linkofpubliclist), 1, 'help', '', 0, 3, 'publicfile').''.yn($object->public).'
'; - print ''; print ''; // Min price @@ -1794,6 +1797,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print ''; print '
'; + print ''; if ($action != 'editthirdparty' && $user->hasRight('adherent', 'creer')) { @@ -638,9 +638,9 @@ if (isModEnabled('societe')) { print ''; print '
'; print $langs->trans("LinkedToDolibarrThirdParty"); print '
'; } else { - if ($object->fk_soc) { + if ($object->socid > 0) { $company = new Societe($db); - $result = $company->fetch($object->fk_soc); + $result = $company->fetch($object->socid); print $company->getNomUrl(1); // Show link to invoices @@ -659,7 +659,7 @@ if (isModEnabled('societe')) { // Login Dolibarr - Link to user print '
'; -print ''; - print ''; // Default from type $liste = array(); $liste['user'] = $langs->trans('UserEmail'); - $liste['company'] = $langs->trans('CompanyEmail').' ('.(!getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') ? $langs->trans("NotDefined") : $conf->global->MAIN_INFO_SOCIETE_MAIL).')'; + $liste['company'] = $langs->trans('CompanyEmail').' ('.(!getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') ? $langs->trans("NotDefined") : getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')).')'; print ''; } else { - print ''; + print ''; } @@ -724,7 +724,7 @@ if ($action == 'edit') { if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { //print ''; } else { - print ''; + print ''; } // AUTH method @@ -909,7 +909,7 @@ if ($action == 'edit') { print ''; @@ -957,7 +957,7 @@ if ($action == 'edit') { // Errors To print ''; print ''; @@ -1003,7 +1003,7 @@ if ($action == 'edit') { if (!getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) { if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') != 'mail' || !$linuxlike) { - if (function_exists('fsockopen') && $port && $server) { + if (function_exists('fsockopen') /* && $port && $server */) { // $port and $server can't be empty print ''.$langs->trans("DoTestServerAvailability").''; } } else { @@ -1044,24 +1044,39 @@ if ($action == 'edit') { // mthode php mail if (getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD')) { // Not defined by default. Depend on platform. // List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPFDMARC"); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPFDMARC"); } else { // MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'. if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // List of IP shown as record to add in SPF if we use the mail method - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPFDMARC"); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPFDMARC"); } } } else { // method smtps or swiftmail if (getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server. // List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com' - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')); + $text .= /* ($text ? '

' : ''). */$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')); } if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform. + $ipstoshow = ''; // List of IP shown as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]' - // TODO Add a key to allow to show the IP/name of server detected dynamically - $text .= ($text ? '

' : '').$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')); + $arrayipstoshow = explode(',', getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')); + foreach ($arrayipstoshow as $iptoshow) { + // If MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is an URL to get/show the public IP/name of server detected dynamically + if (preg_match('/^http/i', $iptoshow)) { + $tmpresult = getURLContent($iptoshow, 'GET', '', 1, array(), array('http', 'https'), 0); + if (!empty($tmpresult['content'])) { + $iptoshow = $tmpresult['content']; + } else { + $iptoshow = ''; // Failed to get IP + } + } + $ipstoshow .= ($ipstoshow ? ', ' : '').trim($iptoshow); + } + if ($ipstoshow) { + $text .= ($text ? '

' : '').$langs->trans("WarningPHPMail2", $ipstoshow); + } } } diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 78d1e381804..e91f1058b3d 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -363,7 +363,7 @@ if ($action == 'edit') { // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_EMAILING); + print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')); } else { $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')]; if (empty($text)) { @@ -386,7 +386,7 @@ if ($action == 'edit') { print ''; } else { print ''; // AUTH method - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { print ''; } // PW - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING'); print ''; } else { - print ''; + print ''; } // Port if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail')) { //print ''; } else { - print ''; + print ''; } // AUTH method @@ -618,12 +618,12 @@ if ($action == 'edit') { } // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') != "XOAUTH2") { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') != "XOAUTH2") { print ''; } @@ -641,7 +641,7 @@ if ($action == 'edit') { // Nothing } else { print ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -118,7 +118,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode // Parametrage du prefix suppliers $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; // Date of switch to that numbering model diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 0161aff09d6..868488bd4a2 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -87,7 +87,6 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode */ public function info($langs) { - global $conf; global $form; $langs->load("companies"); @@ -100,8 +99,8 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $texte .= ''; $texte .= ''; $texte .= '
'; +print ''; if ($action != 'editlogin' && $user->hasRight('adherent', 'creer')) { diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index c4490d27cb8..e0cff71b11e 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -223,11 +223,11 @@ if ($selectedvalue == 1) { $selectedvalue = 1; } -print "
'; print $langs->trans("LinkedToDolibarrUser"); print '
"; +print "
"; print ""; print '"; -print '"; +print ''; print ""; // Show external agenda diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index fcf6023b834..5f50050e53c 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -53,6 +53,7 @@ $langs->loadLangs(array('admin', 'other', 'agenda', 'users')); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$label = GETPOST('label', 'alpha'); $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php $param = GETPOST('param', 'alpha'); @@ -221,7 +222,7 @@ $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = 'action'"; -$sql .= " AND entity = ".$conf->entity; +$sql .= " AND entity = ".((int) $conf->entity); $resql = $db->query($sql); if ($resql) { @@ -346,7 +347,7 @@ print '
'.$langs->trans("Parameter")."'.$langs->trans("Value")."
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; // AGENDA_DEFAULT_VIEW diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index d27d081d66e..14821a3da45 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -48,6 +48,7 @@ $langs->loadLangs(array("admin", "other", "agenda")); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); +$label = GETPOST('label', 'alpha'); $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php $param = GETPOST('param', 'alpha'); @@ -182,7 +183,7 @@ print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; // AGENDA REMINDER BROWSER diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 6c065ba69e3..3d380e11344 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -121,7 +121,7 @@ print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'; print ''; print ""; -print ""; +print ""; //print ""; print ""; print ""; @@ -180,8 +180,8 @@ print "\n"; clearstatcache(); -//if ($mesg) print "
$mesg
"; -print "
"; + +print "

"; // Define $urlwithroot diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 9ce6cbdf83e..c6aad6f2e1c 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -390,7 +390,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; } else { print ''; @@ -532,7 +532,7 @@ if ($action == 'edit') { // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE); + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')); } else { $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')]; if (empty($text)) { @@ -549,7 +549,7 @@ if ($action == 'edit') { print ''; - print ''; // DKIM Selector print ''; - print ''; // DKIM PRIVATE KEY print ''; - print ''; print '
".$langs->trans("Parameter")."".$langs->trans("Value")."".$langs->trans("Examples")." 
'; - if ($conf->global->BANKADDON_PDF == $name) { + if (getDolGlobalString('BANKADDON_PDF') == $name) { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; @@ -499,13 +499,13 @@ print load_fiche_titre($langs->trans("Other"), '', ''); print '
'; print ''."\n"; print ''."\n"; -print ''; -print ''; -print '\n"; +print ''; +print "\n"; print "\n"; +// Disable direct input print ''; -print ''; +print ''; if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) { print ''; -print ''; // Active @@ -539,10 +538,9 @@ print "\n"; // Allow SEPA Mandate OnLine Sign if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT')) { print ''; - print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index d850d5f6eb3..f60f8cb8d44 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -540,14 +540,18 @@ print ''; print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3eb837e7a5f..ffabe10d68d 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1146,7 +1146,7 @@ if (empty($reshook)) { $tablename = preg_replace('/^'.preg_quote(MAIN_DB_PREFIX, '/').'/', '', $tablename); if ($rowid) { - $sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + $sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 1 WHERE ".$db->escape($rowidcol)." = '".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); } elseif ($code) { $sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET active = 1 WHERE code = '".$db->escape(dol_escape_htmltag($code))."'".($entity != '' ? " AND entity = ".(int) $entity : ''); } else { @@ -1158,7 +1158,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1187,7 +1187,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1216,7 +1216,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1245,7 +1245,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1274,7 +1274,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1303,7 +1303,7 @@ if (empty($reshook)) { if (!$result) { dol_print_error($db); } - } { + } else { dol_print_error(null, "No DB entry or no code"); } } @@ -1381,7 +1381,26 @@ if ($id > 0) { $tablecode = 't.code'; $tableprefix = ''; - $tableprefixarray = array(DICT_FORME_JURIDIQUE => 'f.code', DICT_DEPARTEMENTS => 'd.code_departement', DICT_REGIONS => 'r.code_region', DICT_COUNTRY => 'c.code', DICT_CIVILITY => 'c.code', DICT_ACTIONCOMM => 'a.code', DICT_CURRENCIES => 'code_iso', DICT_ECOTAXE => 'e.code', DICT_HOLIDAY_TYPES => 'h.code', DICT_CHARGESOCIALES => 'a.code', DICT_HRM_PUBLIC_HOLIDAY => 'a.code', DICT_UNITS => 'r.code', DICT_SOCIALNETWORKS => 's.code', 45 => 'f.code', 46 => 'f.code', 47 => 'f.code', 48 => 'f.code'); + $tableprefixarray = array( + DICT_FORME_JURIDIQUE => 'f.code', + DICT_DEPARTEMENTS => 'd.code_departement', + DICT_REGIONS => 'r.code_region', + DICT_COUNTRY => 'c.code', + DICT_CIVILITY => 'c.code', + DICT_ACTIONCOMM => 'a.code', + DICT_CHARGESOCIALES => 'a.code', + DICT_TYPENT => 't.code', + DICT_CURRENCIES => 'c.code_iso', + DICT_ECOTAXE => 'e.code', + DICT_HOLIDAY_TYPES => 'h.code', + DICT_HRM_PUBLIC_HOLIDAY => 'a.code', + DICT_UNITS => 'r.code', + DICT_SOCIALNETWORKS => 's.code', + 45 => 'f.code', + 46 => 'f.code', + 47 => 'f.code', + 48 => 'f.code', + ); if (!empty($tableprefixarray[$id])) { $tablecode = $tableprefixarray[$id]; $tableprefix = preg_replace('/\..*$/', '.', $tablecode); diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index f18c2c4b7bd..45c74c98523 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -487,7 +487,7 @@ print ''; print ''; print ''; print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Parameter").'
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''; print img_picto($langs->trans("Activated"), 'switch_on'); @@ -517,9 +517,8 @@ if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) { } print '
'; -print $langs->trans('AccountStatement'); -print "\n"; +// Autofill bank statement +print '
'."\n"; print $langs->trans('AutoReportLastAccountStatement'); print '
'.$langs->trans("AllowOnLineSign").''.$langs->trans("AllowOnLineSignDesc").''.$form->textwithpicto($langs->trans("AllowOnLineSign"), $langs->trans("AllowOnLineSignDesc")).''; - print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1); + print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature")); print '
'.$langs->trans("AllowOnlineSign").''; -if (getDolGlobalString('CONTRACT_ALLOW_ONLINESIGN')) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('CONTRACT_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature")); } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; + if (getDolGlobalString('CONTRACT_ALLOW_ONLINESIGN')) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } } print '
'.$langs->trans("AllowOnLineSign"); print ''; -print ajax_constantonoff('EXPEDITION_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1); +print ajax_constantonoff('EXPEDITION_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature")); print '
'; diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 2fe24da05e9..0aa392a0c52 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -61,16 +61,16 @@ print load_fiche_titre($langs->trans("SetupArea"), '', 'tools'); if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) { - $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('//i', '
', $conf->global->MAIN_MOTD_SETUPPAGE); + $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('//i', '
', getDolGlobalString('MAIN_MOTD_SETUPPAGE')); if (getDolGlobalString('MAIN_MOTD_SETUPPAGE')) { $i = 0; $reg = array(); - while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) { + while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', getDolGlobalString('MAIN_MOTD_SETUPPAGE'), $reg) && $i < 100) { $tmp = explode('|', $reg[1]); if (!empty($tmp[1])) { $langs->load($tmp[1]); } - $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE); + $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), getDolGlobalString('MAIN_MOTD_SETUPPAGE')); $i++; } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index da7e77b2810..afda0e31733 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -55,7 +55,7 @@ if (!$user->admin) { $usersignature = $user->signature; // For action = test or send, we ensure that content is not html, even for signature, because for this we want a test with NO html. -if ($action == 'test' || ($action == 'send' && $trackid = 'test')) { +if ($action == 'test' || ($action == 'send' && $trackid == 'test')) { $usersignature = dol_string_nohtmltag($usersignature, 2); } @@ -412,7 +412,7 @@ if ($action == 'edit') { print '
'; - $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER') ? $conf->global->MAIN_MAIL_SMTP_SERVER : ''); + $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER'); $smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -443,7 +443,7 @@ if ($action == 'edit') { print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { - $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT') ? $conf->global->MAIN_MAIL_SMTP_PORT : ''); + $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT'); $smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -495,14 +495,14 @@ if ($action == 'edit') { // ID if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { - $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID') ? $conf->global->MAIN_MAIL_SMTPS_ID : ''); + $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID'); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID'), $htmltext, 1, 'superadmin'); print ''; } print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS') ? $conf->global->MAIN_MAIL_EMAIL_TLS : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -562,7 +562,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -575,7 +575,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -588,7 +588,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").''; if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('swiftmailer')))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED', (getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') ? $conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED', (getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') ? getDolGlobalString('MAIN_MAIL_EMAIL_DKIM_ENABLED') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -599,17 +599,17 @@ if ($action == 'edit') { // DKIM Domain print '
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_DOMAIN").'
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_SELECTOR").'
'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY").''; + print ''; print '
'; @@ -632,13 +632,13 @@ if ($action == 'edit') { print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined")); print ' '.$help; print '
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE', $liste, getDolGlobalString('MAIN_MAIL_DEFAULT_FROMTYPE'), 0); @@ -716,7 +716,7 @@ if ($action == 'edit') { if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail')) { //print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER') ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_SERVER').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_PORT') ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_PORT').'
' . getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM')) { print img_warning($langs->trans("Mandatory")); - } elseif (!isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) { + } elseif (!isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM'))) { print img_warning($langs->trans("ErrorBadEMail")); } print '
'.$langs->trans("MAIN_MAIL_ERRORS_TO").''.(getDolGlobalString('MAIN_MAIL_ERRORS_TO')); - if (getDolGlobalString('MAIN_MAIL_ERRORS_TO') && !isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) { + if (getDolGlobalString('MAIN_MAIL_ERRORS_TO') && !isValidEmail(getDolGlobalString('MAIN_MAIL_ERRORS_TO'))) { print img_warning($langs->trans("ErrorBadEMail")); } print '
'; - $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : ''); + $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING'); $smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -418,7 +418,7 @@ if ($action == 'edit') { print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { - $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : ''); + $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT_EMAILING'); $smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -441,7 +441,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING'; if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { @@ -469,22 +469,22 @@ if ($action == 'edit') { } // ID - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { - $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING') ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : ''); + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { + $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING'); print '
' . $langs->trans("MAIN_MAIL_SMTPS_ID") . ''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING'), $htmltext, 1, 'superadmin'); print ''; } print '
' . $langs->trans("MAIN_MAIL_SMTPS_PW") . ''; // SuperAdministrator access only @@ -499,13 +499,13 @@ if ($action == 'edit') { } // OAUTH service provider - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { // @phan-suppress-next-line PhanPluginSuspiciousParamOrder - print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING); + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING')); } else { $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING')]; if (empty($text)) { @@ -521,9 +521,9 @@ if ($action == 'edit') { // TLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_EMAILING') ? $conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_EMAILING') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS_EMAILING') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -534,9 +534,9 @@ if ($action == 'edit') { // STARTTLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_EMAILING') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_EMAILING') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_EMAILING') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -547,9 +547,9 @@ if ($action == 'edit') { // SMTP_ALLOW_SELF_SIGNED_EMAILING print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -593,14 +593,14 @@ if ($action == 'edit') { if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') == 'mail')) { //print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : '').'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_EMAILING') ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_PORT_EMAILING').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING').'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING')).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_EMAILING')); } else { @@ -658,7 +658,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_EMAILING')); } else { @@ -675,7 +675,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING')); } else { @@ -773,8 +773,8 @@ if ($action == 'edit') { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); - $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM); - $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); + $formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); $formmail->fromid = $user->id; $formmail->fromalsorobot = 1; $formmail->withfromreadonly = 0; diff --git a/htdocs/admin/mails_ingoing.php b/htdocs/admin/mails_ingoing.php index 12bd4d93ce8..734d83f619c 100644 --- a/htdocs/admin/mails_ingoing.php +++ b/htdocs/admin/mails_ingoing.php @@ -127,7 +127,7 @@ print ''; // SMTPS oauth service if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') === "XOAUTH2") { - $text = $oauthservices[$conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE]; + $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')]; if (empty($text)) { $text = $langs->trans("Undefined").img_warning(); } diff --git a/htdocs/admin/mails_passwordreset.php b/htdocs/admin/mails_passwordreset.php index 29c8d203342..5f3b07ce7ee 100644 --- a/htdocs/admin/mails_passwordreset.php +++ b/htdocs/admin/mails_passwordreset.php @@ -358,7 +358,7 @@ if ($action == 'edit') { // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE_PASSWORDRESET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET); + print $form->selectarray('MAIN_MAIL_SENDMODE_PASSWORDRESET', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')); } else { $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET')]; if (empty($text)) { @@ -381,7 +381,7 @@ if ($action == 'edit') { print ''; } else { print ''; // AUTH method - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { print ''; } // PW - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET'); print ''; } else { - print ''; + print ''; } // Port if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) { //print ''; } else { - print ''; + print ''; } // AUTH method @@ -612,12 +612,12 @@ if ($action == 'edit') { } // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') != "XOAUTH2") { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET') != "XOAUTH2") { print ''; } @@ -635,7 +635,7 @@ if ($action == 'edit') { // Nothing } else { print ''."\n"; } diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index aff41e9c1cd..6f79d58551a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -496,6 +496,9 @@ if (empty($reshook)) { if ($field == 'content_lines') { $_POST['content_lines'] = GETPOST('content_lines-'.$rowid, 'restricthtml'); } + if ($field == 'email_from') { + $_POST['email_from'] = GETPOST('email_from-'.$rowid, 'restricthtml'); + } if ($i) { $sql .= ", "; @@ -1138,6 +1141,10 @@ if ($num) { if (getDolGlobalString('MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES')) { $fieldsforcontent[] = 'content_lines'; } + + $parameters = array('fieldsforcontent' => &$fieldsforcontent, 'tabname' => $tabname[$id]); + $hookmanager->executeHooks('editEmailTemplateFieldsForContent', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + foreach ($fieldsforcontent as $tmpfieldlist) { $showfield = 1; $css = "left"; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index 4ffa822f966..6666861cf89 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -358,7 +358,7 @@ if ($action == 'edit') { // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_TICKET); + print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')); } else { $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')]; if (empty($text)) { @@ -381,7 +381,7 @@ if ($action == 'edit') { print ''; } else { print ''; // AUTH method - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { print ''; } // PW - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET'); print ''; } else { - print ''; + print ''; } // Port if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) { //print ''; } else { - print ''; + print ''; } // AUTH method @@ -610,12 +610,12 @@ if ($action == 'edit') { } // SMTPS ID - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { - print ''; + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { + print ''; } // SMTPS PW - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") { print ''; } @@ -633,7 +633,7 @@ if ($action == 'edit') { // Nothing } else { print ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index dfcba97ccaf..18a33833ed3 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -86,7 +86,7 @@ class mod_sn_advanced extends ModeleNumRefBatch // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 2be62efa5f3..4132956f86e 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -92,7 +92,7 @@ class mod_project_universal extends ModeleNumRefProjects // Prefix settings $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 08cee523fec..4fcb310c941 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -87,7 +87,7 @@ class mod_task_universal extends ModeleNumRefTask // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 3e363c3be54..c52dc1b2c16 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -81,7 +81,6 @@ class pdf_cyan extends ModelePDFPropales */ public $cols; - /** * Constructor * @@ -194,10 +193,7 @@ class pdf_cyan extends ModelePDFPropales $nblines = count($object->lines); - $hidetop = 0; - if (getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE')) { - $hidetop = getDolGlobalString('MAIN_PDF_DISABLE_COL_HEAD_TITLE'); - } + $hidetop = getDolGlobalInt('MAIN_PDF_DISABLE_COL_HEAD_TITLE'); // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); @@ -361,6 +357,10 @@ class pdf_cyan extends ModelePDFPropales $tab_top = 90 + $top_shift; $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); + if (!$hidetop && getDolGlobalInt('MAIN_PDF_ENABLE_COL_HEAD_TITLE_REPEAT')) { + // TODO : make this hidden conf the default behavior for each PDF when each PDF managed this new Display + $tab_top_newpage+= $this->tabTitleHeight; + } $nexY = $tab_top; @@ -558,8 +558,25 @@ class pdf_cyan extends ModelePDFPropales // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; + for ($i = 0; $i < $nblines; $i++) { + $linePosition = $i + 1; $curY = $nexY; + + // in First Check line page break and add page if needed + if (isset($object->lines[$i]->pagebreak) && $object->lines[$i]->pagebreak) { + // New page + $pdf->AddPage(); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + + $pdf->setPage($pdf->getNumPages()); + $nexY = $tab_top_newpage; + } + + $this->resetAfterColsLinePositionsData($nexY, $pdf->getPage()); + $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -570,112 +587,78 @@ class pdf_cyan extends ModelePDFPropales } $pdf->setTopMargin($tab_top_newpage); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pageposbefore = $pdf->getPage(); + $curYBefore = $curY; + + // Allows data in the first page if description is long enough to break in multiples pages + $showpricebeforepagebreak = getDolGlobalInt('MAIN_PDF_DATA_ON_FIRST_PAGE'); - $showpricebeforepagebreak = 1; $posYAfterImage = 0; - $posYAfterDescription = 0; if ($this->getColumnStatus('photo')) { // We start with Photo of product line - if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page + $imageTopMargin = 1; + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imageTopMargin + $imglinesize['height']) > ($this->page_hauteur - $heightforfooter)) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } $pdf->setPage($pageposbefore + 1); - + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $curY = $tab_top_newpage; - - // Allows data in the first page if description is long enough to break in multiples pages - if (getDolGlobalString('MAIN_PDF_DATA_ON_FIRST_PAGE')) { - $showpricebeforepagebreak = 1; - } else { - $showpricebeforepagebreak = 0; - } + $showpricebeforepagebreak = 0; } - + $pdf->setPageOrientation('', 0, $heightforfooter + $heightforfreetext); // The only function to edit the bottom margin of current page to set it. if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height'])) { - $pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY + 1, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi + $pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY + $imageTopMargin, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually $posYAfterImage = $curY + $imglinesize['height']; + + $this->setAfterColsLinePositionsData('photo', $posYAfterImage, $pdf->getPage()); } } - // Description of product line + // restore Page orientation for text + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + if ($this->getColumnStatus('desc')) { - $pdf->startTransaction(); - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); - $pageposafter = $pdf->getPage(); - - if ($pageposafter > $pageposbefore) { // There is a pagebreak (not enough space for total+free text+footer) - $pdf->rollbackTransaction(true); - - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it to simple footer, so we can retry as if we have just the simple footer. - - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); - - $pageposafter = $pdf->getPage(); - $posyafter = $pdf->GetY(); - //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // There is no space left for total+free text but no page break. - if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page manually because no break page was done automatically for the last part. - $pdf->AddPage('', '', true); - if (!empty($tplidx)) { - $pdf->useTemplate($tplidx); - } - $pdf->setPage($pageposafter + 1); - } - } else { - // We found a page break that was done automatically and there is ow enough space for total+free text+footer. - // Allows data in the first page if description is long enough to break in multiples pages - if (getDolGlobalString('MAIN_PDF_DATA_ON_FIRST_PAGE')) { - $showpricebeforepagebreak = 1; - } else { - $showpricebeforepagebreak = 0; - } - } - } else { // No pagebreak - $pdf->commitTransaction(); - } - $posYAfterDescription = $pdf->GetY(); + $this->setAfterColsLinePositionsData('desc', $pdf->GetY(), $pdf->getPage()); } - $nexY = $pdf->GetY(); - $pageposafter = $pdf->getPage(); - + $afterPosData = $this->getMaxAfterColsLinePositionsData(); $pdf->setPage($pageposbefore); $pdf->setTopMargin($this->marge_haute); - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + $curY = $curYBefore; + $pdf->setPageOrientation('', 0, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - // We suppose that a too long description or photo were moved completely on next page, so we set the value for $curY and current page that will be used by the following output. - if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); + + // We suppose that a too long description or photo were moved completely on next page + if ($afterPosData['page'] > $pageposbefore && (empty($showpricebeforepagebreak) || ($curY + 4) > ($this->page_hauteur - $heightforfooter))) { + $pdf->setPage($afterPosData['page']); $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font + // # of line if ($this->getColumnStatus('position')) { - $this->printStdColumnContent($pdf, $curY, 'position', (string) ($i + 1)); + $this->printStdColumnContent($pdf, $curY, 'position', strval($linePosition)); } // VAT Rate if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'vat', $vat_rate); - $nexY = max($pdf->GetY(), $nexY); } // Unit price before discount if ($this->getColumnStatus('subprice')) { $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'subprice', $up_excl_tax); - $nexY = max($pdf->GetY(), $nexY); } // Quantity @@ -683,7 +666,6 @@ class pdf_cyan extends ModelePDFPropales if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); - $nexY = max($pdf->GetY(), $nexY); } @@ -691,28 +673,24 @@ class pdf_cyan extends ModelePDFPropales if ($this->getColumnStatus('unit')) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'unit', $unit); - $nexY = max($pdf->GetY(), $nexY); } // Discount on line if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'discount', $remise_percent); - $nexY = max($pdf->GetY(), $nexY); } // Total excl tax line (HT) if ($this->getColumnStatus('totalexcltax')) { $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalexcltax', $total_excl_tax); - $nexY = max($pdf->GetY(), $nexY); } // Total with tax line (TTC) if ($this->getColumnStatus('totalincltax')) { $total_incl_tax = pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax); - $nexY = max($pdf->GetY(), $nexY); } // Extrafields @@ -721,19 +699,21 @@ class pdf_cyan extends ModelePDFPropales if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey, $outputlangs); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); - $nexY = max($pdf->GetY(), $nexY); + + $this->setAfterColsLinePositionsData('options_'.$extrafieldColKey, $pdf->GetY(), $pdf->getPage()); } } } + $afterPosData = $this->getMaxAfterColsLinePositionsData(); $parameters = array( - 'object' => $object, - 'i' => $i, - 'pdf' => & $pdf, - 'curY' => & $curY, - 'nexY' => & $nexY, - 'outputlangs' => $outputlangs, - 'hidedetails' => $hidedetails + 'object' => $object, + 'i' => $i, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $afterPosData['y'], // for backward module hook compatibility Y will be accessible by $object->getMaxAfterColsLinePositionsData() + 'outputlangs' => $outputlangs, + 'hidedetails' => $hidedetails ); $reshook = $hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook @@ -804,13 +784,14 @@ class pdf_cyan extends ModelePDFPropales } $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); - if ($posYAfterImage > $posYAfterDescription) { - $nexY = max($nexY, $posYAfterImage); - } + + + $afterPosData = $this->getMaxAfterColsLinePositionsData(); + $pdf->setPage($afterPosData['page']); + $nexY = $afterPosData['y']; // Add line - if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { - $pdf->setPage($pageposafter); + if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1) && $afterPosData['y'] < $this->page_hauteur - $heightforfooter - 5) { $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); @@ -818,54 +799,75 @@ class pdf_cyan extends ModelePDFPropales } $nexY += 2; // Add space between lines + } - // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) { - $pdf->setPage($pagenb); - if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + + // Add last page for document footer if there are not enough size left + $afterPosData = $this->getMaxAfterColsLinePositionsData(); + if ($afterPosData['y'] > $this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot) ) { + $pdf->AddPage(); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + $pagenb++; + $pdf->setPage($pagenb); + } + + // Draw table frames and columns borders + $drawTabNumbPage = $pdf->getNumPages(); + for ($i=$pageposbeforeprintlines; $i<=$drawTabNumbPage; $i++) { + $pdf->setPage($i); + // reset page orientation each loop to override it if it was changed + $pdf->setPageOrientation('', 0, 0); // The only function to edit the bottom margin of current page to set it. + + $drawTabHideTop = $hidetop; + $drawTabTop = $tab_top_newpage; + $drawTabBottom = $this->page_hauteur - $heightforfooter;; + $hideBottom = 0; // TODO understand why it change to 1 or 0 during process + + if ($i == $pageposbeforeprintlines) { + // first page need to start after notes + $drawTabTop = $tab_top; + } elseif (!$drawTabHideTop) { + if (getDolGlobalInt('MAIN_PDF_ENABLE_COL_HEAD_TITLE_REPEAT')) { + $drawTabTop-= $this->tabTitleHeight; } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - $pagenb++; - $pdf->setPage($pagenb); - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { - $this->_pagehead($pdf, $object, 0, $outputlangs); - } - if (!empty($tplidx)) { - $pdf->useTemplate($tplidx); + $drawTabHideTop = 1; } } - if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { // @phan-suppress-current-line PhanUndeclaredProperty - if ($pagenb == $pageposafter) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); - } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - // New page - $pdf->AddPage(); - if (!empty($tplidx)) { - $pdf->useTemplate($tplidx); - } - $pagenb++; - if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { - $this->_pagehead($pdf, $object, 0, $outputlangs); - } + // last page need to include document footer + if ($i == $pdf->getNumPages()) { + // remove document footer height to tab bottom position + $drawTabBottom-= $heightforsignature + $heightforfreetext + $heightforinfotot; + } + + $drawTabHeight = $drawTabBottom - $drawTabTop; + $this->_tableau($pdf, $drawTabTop, $drawTabHeight, 0, $outputlangs, $drawTabHideTop, $hideBottom, $object->multicurrency_code, $outputlangsbis); + + $hideFreeText = $i != $pdf->getNumPages() ? 1 : 0; // Display free text only in last page + $this->_pagefoot($pdf, $object, $outputlangs, $hideFreeText); + + $pdf->setPage($i); // in case of _pagefoot or _tableau change it + + // reset page orientation each loop to override it if it was changed by _pagefoot or _tableau change it + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + + // Don't print head on first page ($pageposbeforeprintlines) because already added previously + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') && $i != $pageposbeforeprintlines) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); } } - // Show square - if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter + 1; - } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter + 1; - } + // reset text color before print footers + $pdf->SetTextColor(0, 0, 0); + + $pdf->setPage($pdf->getNumPages()); + + $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter + 1; // Display infos area $posy = $this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); @@ -878,8 +880,7 @@ class pdf_cyan extends ModelePDFPropales $posy = $this->drawSignatureArea($pdf, $object, $posy, $outputlangs); } - // Pagefoot - $this->_pagefoot($pdf, $object, $outputlangs); + // Add number of pages in footer if (method_exists($pdf, 'AliasNbPages')) { $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 8f3e6402b63..93ebf4f8298 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -90,7 +90,7 @@ class mod_propale_saphir extends ModeleNumRefPropales // Parametrage du prefix $texte .= ''; $mask = !getDolGlobalString('PROPALE_SAPHIR_MASK') ? '' : $conf->global->PROPALE_SAPHIR_MASK; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 3810da99bb1..a482366fc36 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -67,7 +67,7 @@ class mod_reception_moonstone extends ModelNumRefReception $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '
'; - $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : ''); + $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET'); $smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -413,7 +413,7 @@ if ($action == 'edit') { print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { - $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : ''); + $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET'); $smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -436,7 +436,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_PASSWORDRESET'; if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { @@ -464,22 +464,22 @@ if ($action == 'edit') { } // ID - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { - $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET : ''); + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { + $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET'); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_PASSWORDRESET, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET'), $htmltext, 1, 'superadmin'); print ''; } print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only @@ -494,11 +494,11 @@ if ($action == 'edit') { } // OAUTH service provider - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET); + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET')); } else { $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_PASSWORDRESET')]; if (empty($text)) { @@ -514,9 +514,9 @@ if ($action == 'edit') { // TLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_TLS_PASSWORDRESET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -528,9 +528,9 @@ if ($action == 'edit') { // STARTTLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -541,9 +541,9 @@ if ($action == 'edit') { // SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -587,14 +587,14 @@ if ($action == 'edit') { if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET') == 'mail')) { //print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_PASSWORDRESET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_PASSWORDRESET').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET') ? $conf->global->MAIN_MAIL_SMTP_PORT_PASSWORDRESET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_PORT_PASSWORDRESET').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").'' . getDolGlobalString('MAIN_MAIL_SMTPS_ID_PASSWORDRESET').'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_PASSWORDRESET')).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_PASSWORDRESET')); } else { @@ -652,7 +652,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_PASSWORDRESET')); } else { @@ -669,7 +669,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET) && in_array($conf->global->MAIN_MAIL_SENDMODE_PASSWORDRESET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_PASSWORDRESET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_PASSWORDRESET')); } else { diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 29887bba770..a586d8407bb 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -1,8 +1,8 @@ - * Copyright (C) 2018 Ferran Marcet +/* Copyright (C) 2007-2017 Laurent Destailleur + * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2024 Frédéric France - * 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 @@ -55,7 +55,6 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) $id = GETPOSTINT('id'); -$rowid = GETPOST('rowid', 'alpha'); // Load variable for pagination $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; @@ -83,8 +82,8 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Default sort order (if not yet defined by previous GETPOST) if (!$sortfield) { - reset($object->fields); // Reset is required to avoid key() to return null. - $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.position"; // Set here default search field. By default 1st field in definition. } if (!$sortorder) { $sortorder = "ASC"; @@ -804,14 +803,11 @@ while ($i < $imaxinloop) { $url .= '&limit='.((int) $limit); } if ($page) { - $url .= '&page='.urlencode((string) ($page)); - } - if ($sortfield) { - $url .= '&sortfield='.urlencode($sortfield); - } - if ($sortorder) { - $url .= '&page='.urlencode($sortorder); + $url .= '&page='.urlencode((string) $page); } + $url .= '&sortfield='.urlencode((string) $sortfield); + $url .= '&page='.urlencode((string) $sortorder); + print ''.img_edit().''; //print '   '; print ''.img_delete().'   '; @@ -828,7 +824,6 @@ while ($i < $imaxinloop) { } } - print '
'; - $mainserver = (getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ''); + $mainserver = getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET'); $smtpserver = ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -413,7 +413,7 @@ if ($action == 'edit') { print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; } else { - $mainport = (getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET') ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ''); + $mainport = getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET'); $smtpport = ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) { print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -436,7 +436,7 @@ if ($action == 'edit') { print '
'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET'; if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { @@ -464,22 +464,22 @@ if ($action == 'edit') { } // ID - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { - $mainstmpid = (getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET') ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : ''); + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { + $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET'); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); - print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_TICKET, $htmltext, 1, 'superadmin'); + print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET'), $htmltext, 1, 'superadmin'); print ''; } print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only @@ -494,11 +494,11 @@ if ($action == 'edit') { } // OAUTH service provider - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { print '
'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; // SuperAdministrator access only if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { - print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET); + print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET')); } else { $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET')]; if (empty($text)) { @@ -513,9 +513,9 @@ if ($action == 'edit') { // TLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_TLS_TICKET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -526,9 +526,9 @@ if ($action == 'edit') { // STARTTLS print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -539,9 +539,9 @@ if ($action == 'edit') { // SMTP_ALLOW_SELF_SIGNED_TICKET print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) { + if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { - print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET : 0), 1); + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET', (getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') ? getDolGlobalString('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET') : 0), 1); } else { print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; } @@ -585,14 +585,14 @@ if ($action == 'edit') { if ($linuxlike && (getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET') == 'mail')) { //print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET') ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ? ini_get('SMTP') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_TICKET').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET') ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ? ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.getDolGlobalString('MAIN_MAIL_SMTP_PORT_TICKET').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").'' . getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.getDolGlobalString('MAIN_MAIL_SMTPS_ID_TICKET').'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_TICKET')).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_TLS_TICKET')); } else { @@ -650,7 +650,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalString('MAIN_MAIL_EMAIL_STARTTLS_TICKET')); } else { @@ -667,7 +667,7 @@ if ($action == 'edit') { // Nothing } else { print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; - if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) { + if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { if (function_exists('openssl_open')) { print yn(getDolGlobalInt('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_TICKET')); } else { diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 9e91aac4327..f9cde4b5363 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; require_once DOL_DOCUMENT_ROOT.'/admin/remotestore/class/dolistore.class.php'; ' @@ -289,9 +290,8 @@ if ($action == 'install' && $allowonlineinstall) { if (!is_numeric($checkRes) && $checkRes != '') { $langs->load("errors"); setEventMessages($modulename.' : '.$langs->trans($checkRes), null, 'errors'); + $error++; } - - $error++; } catch (Exception $e) { // Nothing done } @@ -745,7 +745,7 @@ if ($mode == 'common' || $mode == 'commonkanban') { $moreforfilter = '
'; $moreforfilter .= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 566d7bb70f0..b01fcafb6db 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -110,7 +110,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode // Parametrage du prefix customers $texte .= '
'.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipelephantcutomer').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantcutomer').' 
'.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipelephantsupplier').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantsupplier').'
'; - $s1 = $form->textwithpicto('', $tooltip, 1, 1); - $s2 = $form->textwithpicto('', $tooltip, 1, 1); + $s1 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); + $s2 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 9a2b8aca0b0..01b04b0a338 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -6,7 +6,8 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ /** * \file htdocs/core/modules/supplier_order/modules_commandefournisseur.php - * \ingroup order fournisseur + * \ingroup supplier order * \brief File that contains parent class for supplier orders models * and parent class for supplier orders numbering models */ diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 67592bde09a..628b7411ebf 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -86,7 +86,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -139,7 +139,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments return 0; } - $numFinal = get_next_value($db, $mask, 'paiementfourn', 'ref', '', $objsoc, $object->datepaye); + $numFinal = get_next_value($db, $mask, 'paiementfourn', 'ref', '', $objsoc, is_object($object) ?$object->datepaye :''); return $numFinal; } diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 4eada1d1578..9c83c7d9176 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -90,7 +90,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index 2affafe14ba..75768b9f87e 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -84,7 +84,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos // Setting up the prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 81b263a931e..dcac49b041a 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -85,7 +85,7 @@ class mod_ticket_universal extends ModeleNumRefTicket // Prefix settings $text .= ''; - $text .= ''; + $text .= ''; $text .= ''; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index f372547a395..c67765e88d8 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -83,7 +83,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation // Parametrage du prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 317aa2d1fe8..310ea9b814b 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -314,7 +314,10 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) { $extrafields->fetch_name_optionals_label($elementtype); foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) { if ($key != 'ts_nameextra' && $key != 'ts_payeur') { - print ' 0) $rightpart .= ' fieldrequired'; // No fieldrequired in the view output if ($val['type'] == 'text' || $val['type'] == 'html') { $rightpart .= ' tdtop'; diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index a4000c2fa4d..78cd0eaec94 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Juanjo Menent +/* Copyright (C) 2014 Maxime Kohlhaas + * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index 2a623a3ba84..7d72a0cae3b 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Juanjo Menent +/* Copyright (C) 2014 Maxime Kohlhaas + * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index e0dccc9b8ab..8d17be75f40 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -29,6 +29,7 @@ * @var CommonObject $object * @var Conf $conf * @var DoliDB $db + * @var ExtraFields $extrafields * @var Form $form * @var Translate $langs * @var User $user @@ -81,7 +82,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att $enabled = 1; if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) { - $enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2'); + $enabled = (int) dol_eval((string) $extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2'); } if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) { $enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1, 1, '2'); @@ -256,7 +257,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att print ''; print ''; print ''; - print $extrafields->showInputField($tmpkeyextra, $value, '', '', '', 0, $object->id, $object->table_element); + print $extrafields->showInputField($tmpkeyextra, $value, '', '', '', 0, $object, $object->table_element); print ''; diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index 3e6af0c8a20..d79d844484c 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -23,6 +23,46 @@ */ '@phan-var-force array{nbfield:int,type?:array,pos?:array,val?:array} $totalarray'; +if (!function_exists('printTotalValCell')) { // allow two list with total on same screen + + /** print a total cell value according to its type + * + * @param string $type of field (duration, string..) + * @param string $val the value to display + * + * @return void (direct print) + */ + function printTotalValCell($type, $val) + { + // if $totalarray['type'] not present we consider it as number + if (empty($type)) { + $type = 'real'; + } + switch ($type) { + case 'duration': + print ''; + break; + case 'string': // This type is no more used. type is now varchar(x) + print ''; + break; + case 'stock': + print ''; + break; + default: + print ''; + break; + } + } +} + // Move fields of totalizable into the common array pos and val if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) { foreach ($totalarray['totalizable'] as $keytotalizable => $valtotalizable) { @@ -107,40 +147,3 @@ if (isset($totalarray['pos'])) { } //print ''; } - -/** print a total cell value according to its type - * - * @param string $type of field (duration, string..) - * @param string $val the value to display - * - * @return void (direct print) - */ -function printTotalValCell($type, $val) -{ - // if $totalarray['type'] not present we consider it as number - if (empty($type)) { - $type = 'real'; - } - switch ($type) { - case 'duration': - print ''; - break; - case 'string': // This type is no more used. type is now varchar(x) - print ''; - break; - case 'stock': - print ''; - break; - default: - print ''; - break; - } -} diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 077f7d4aeb1..54c2238adfa 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -3,6 +3,7 @@ * Copyright (C) 2011-2022 Laurent Destailleur * Copyright (C) 2024 MDW * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -317,7 +318,7 @@ if (!empty($captcha)) { } // List of directories where we can find captcha handlers - $dirModCaptcha = array_merge(array('main' => '/core/modules/security/captcha/'), is_array($conf->modules_parts['captcha']) ? $conf->modules_parts['captcha'] : array()); + $dirModCaptcha = array_merge(array('main' => '/core/modules/security/captcha/'), (isset($conf->modules_parts['captcha']) && is_array($conf->modules_parts['captcha'])) ? $conf->modules_parts['captcha'] : array()); $fullpathclassfile = ''; foreach ($dirModCaptcha as $dir) { $fullpathclassfile = dol_buildpath($dir."modCaptcha".ucfirst($captcha).'.class.php', 0, 2); @@ -334,7 +335,7 @@ if (!empty($captcha)) { $classname = "modCaptcha".ucfirst($captcha); if (class_exists($classname)) { /** @var ModeleCaptcha $captchaobj */ - $captchaobj = new $classname($db, $conf, $langs, $user); + $captchaobj = new $classname($db, $conf, $langs, null); '@phan-var-force ModeleCaptcha $captchaobj'; if (is_object($captchaobj) && method_exists($captchaobj, 'getCaptchaCodeForForm')) { diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index b4164ac04c0..3cf6e4f82eb 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -377,7 +377,7 @@ if ($massaction == 'edit_extrafields') { foreach ($extrafields_list as $extraKey => $extraLabel) { $outputShowOutputFields .= ''; } $outputShowOutputFields .= ''; + print ' + + '; } print '

'; diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 15ed29f8d9f..cd942116585 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2011-2012 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2008-2012 Laurent Destailleur + * Copyright (C) 2011-2012 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -467,22 +468,10 @@ function hash_call($methodName, $nvpStr) } // Clean parameters - $PAYPAL_API_USER = ""; - if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); - } - $PAYPAL_API_PASSWORD = ""; - if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); - } - $PAYPAL_API_SIGNATURE = ""; - if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); - } - $PAYPAL_API_SANDBOX = ""; - if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); - } + $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); + $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); + $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); + $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); // TODO END problem with triggers dol_syslog("Paypal API endpoint ".$API_Endpoint); @@ -514,8 +503,8 @@ function hash_call($methodName, $nvpStr) curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ($ssl_verifypeer ? true : false)); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, ($ssl_verifypeer ? true : false)); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, !getDolGlobalString('MAIN_USE_CONNECT_TIMEOUT') ? 5 : $conf->global->MAIN_USE_CONNECT_TIMEOUT); - curl_setopt($ch, CURLOPT_TIMEOUT, !getDolGlobalString('MAIN_USE_RESPONSE_TIMEOUT') ? 30 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, getDolGlobalInt('MAIN_USE_CONNECT_TIMEOUT', 5)); + curl_setopt($ch, CURLOPT_TIMEOUT, getDolGlobalInt('MAIN_USE_RESPONSE_TIMEOUT', 30)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index b3a714489a2..eba524caab4 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2011 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2010-2011 Laurent Destailleur + * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -57,22 +58,10 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX') || GETPOST('forcesandbox', 'alpha') } // Clean parameters -$PAYPAL_API_USER = ""; -if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); -} -$PAYPAL_API_PASSWORD = ""; -if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); -} -$PAYPAL_API_SIGNATURE = ""; -if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); -} -$PAYPAL_API_SANDBOX = ""; -if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); -} +$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); +$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); +$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); +$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); // Proxy $PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST'); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index ea093c7885a..3d7e56c8de8 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -650,6 +650,9 @@ print ''; +print '
'; + + print load_fiche_titre($langs->trans("UserInterface"), '', ''); diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 9eebdb978c4..a0337a75a49 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -323,6 +323,7 @@ if ($action == 'fetch' && !empty($id)) { $form = new Form($db); } + $arrayresult = []; if (empty($mode) || $mode == 1) { // mode=1: customer $arrayresult = $form->select_produits_list("", $htmlname, $type, getDolGlobalInt('PRODUIT_LIMIT_SIZE', 1000), $price_level, $searchkey, $status, $finished, $outjson, $socid, '1', 0, '', $hidepriceinlabel, $warehouseStatus, $status_purchase, $warehouseId); } elseif ($mode == 2) { // mode=2: supplier diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 6e9ebf57447..38976910f29 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1619,12 +1619,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if ($type == 1) { print '
'; } @@ -1662,21 +1664,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print ' x '; print ' x '; print ''; - print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ? GETPOST('size_units', 'alpha') : '0', 0, 2); + print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ? GETPOST('size_units', 'alpha') : (GETPOST('size_units', 'alpha') ?: '0'), 0, 2); print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_SURFACE')) { // Brut Surface print ''; } if (!getDolGlobalString('PRODUCT_DISABLE_VOLUME')) { // Brut Volume print ''; } @@ -1684,7 +1686,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Net Measure print ''; } } @@ -1748,7 +1750,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio $doleditor->Create(); print ""; - //} if (isModEnabled('category')) { // Categories @@ -1771,6 +1772,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print ''; print '
'; // trans remove html entities $texte .= $langs->trans("ModuleCompanyCodeCustomer".$this->name, '{s2}')."
\n"; diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index 28686db0ed6..857cb2d9521 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -112,10 +112,10 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $texte .= ''; $texte .= ''; $texte .= ''; - $s1 = $form->textwithpicto('', $tooltip, 1, 1); - $s2 = $form->textwithpicto('', $tooltip, 1, 1); - $s3 = $form->textwithpicto('', $tooltip, 1, 1); - $s4 = $form->textwithpicto('', $tooltip, 1, 1); + $s1 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); + $s2 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); + $s3 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); + $s4 = $form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name); $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 67b73f8dd9a..bafa84d20c8 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -99,7 +99,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Setting the prefix $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; @@ -107,19 +107,19 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Prefix setting of credit note $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; if (!getDolGlobalString('INVOICE_DISABLE_REPLACEMENT') && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // Prefix setting of replacement $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; } // Prefix setting of deposit $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= '
'; // trans remove html entities $texte .= $langs->trans("ModuleCompanyCodeCustomer".$this->name, '{s2}', '{s4}')."
\n"; diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index 62387787668..0bc819da50b 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -83,7 +83,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer // Parametrage du prefix $texte .= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte .= ':'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipstandardtulip').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipstandardtulip').' 
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipcredittuplie').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipcredittuplie').'
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipreplacementtulip').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipreplacementtulip').'
'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltipdownpaymenttulip').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipdownpaymenttulip').'
'; @@ -182,7 +182,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices } // Supplier invoices take invoice date instead of creation date for the mask - $numFinal = get_next_value($db, $mask, 'facture_fourn', 'ref', '', $objsoc, $object->date); + $numFinal = get_next_value($db, $mask, 'facture_fourn', 'ref', '', $objsoc, is_object($object) ?$object->date :''); return $numFinal; } diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 350e22302ea..707b64505d6 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -91,7 +91,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders // Parametrage du prefix $texte .= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1, '', 0, 3, 'tooltiporchidee').''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltiporchidee').' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).' 
'.$extrafields->attributes[$elementtype]['label'][$key]; + if (isset($extrafields->attributes[$elementtype]['langfile'][$key])) { + $langs->load($extrafields->attributes[$elementtype]['langfile'][$key]); + } + print '
'.$langs->trans($extrafields->attributes[$elementtype]['label'][$key]); if (!empty($array_query['options_'.$key]) || (is_array($array_query['options_'.$key]) && count($array_query['options_'.$key]) > 0)) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); } @@ -330,9 +333,9 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) { } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { print ''; print '
'.$langs->trans("AdvTgtStartDt").''; - print $form->selectDate('', 'options_'.$key.'_st_dt'); + print $form->selectDate('', 'options_'.$key.'_st_dt', 0, 0, 1); print ''.$langs->trans("AdvTgtEndDt").''; - print $form->selectDate('', 'options_'.$key.'_end_dt'); + print $form->selectDate('', 'options_'.$key.'_end_dt', 0, 0, 1); print '
'; print '
'."\n"; @@ -348,19 +351,19 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) { $array_query['options_'.$key] ); print ''."\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { - print $formadvtargetemaling->advMultiselectarray('options_'.$key, $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key]); + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'select') { + print $formadvtargetemaling->advMultiselectarray('options_'.$key, $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key]); print ''."\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { - print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key, $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key]); + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'sellist') { + print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key, $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key]); print ''."\n"; } else { print ''; print '
'; if (is_array($array_query['options_'.$key])) { - print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key])); + print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key]), '', '', '', '', 0, 'societe', 1); } else { - print $extrafields->showInputField($key, $array_query['options_'.$key]); + print $extrafields->showInputField($key, $array_query['options_'.$key], '', '', '', '', 0, 'societe', 1); } print '
'; @@ -529,9 +532,9 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) { } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { print ''; print '
'.$langs->trans("AdvTgtStartDt").''; - print $form->selectDate('', 'options_'.$key.'_st_dt_cnct'); + print $form->selectDate('', 'options_'.$key.'_st_dt_cnct', 0, 0, 1); print ''.$langs->trans("AdvTgtEndDt").''; - print $form->selectDate('', 'options_'.$key.'_end_dt_cnct'); + print $form->selectDate('', 'options_'.$key.'_end_dt_cnct', 0, 0, 1); print '
'; print '
'."\n"; print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); @@ -546,17 +549,17 @@ if (!getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) { $array_query['options_'.$key.'_cnct'] ); print ''."\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'select')) { - print $formadvtargetemaling->advMultiselectarray('options_'.$key.'_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key.'_cnct']); + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'select') { + print $formadvtargetemaling->advMultiselectarray('options_'.$key.'_cnct', $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key.'_cnct']); print ''."\n"; - } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'sellist')) { - print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key.'_cnct', $extrafields->attributes[$key]['param']['options'], $array_query['options_'.$key.'_cnct']); + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'sellist') { + print $formadvtargetemaling->advMultiselectarraySelllist('options_'.$key.'_cnct', $extrafields->attributes[$elementtype]['param'][$key]['options'], $array_query['options_'.$key.'_cnct']); print ''."\n"; } else { if (is_array($array_query['options_'.$key.'_cnct'])) { - print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key.'_cnct']), '', '_cnct'); + print $extrafields->showInputField($key, implode(',', $array_query['options_'.$key.'_cnct']), '', '_cnct', '', '', 0, 'socpeople', 1); } else { - print $extrafields->showInputField($key, $array_query['options_'.$key.'_cnct'], '', '_cnct'); + print $extrafields->showInputField($key, $array_query['options_'.$key.'_cnct'], '', '_cnct', '', '', 0, 'socpeople', 1); } print ''."\n"; } diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 4ab671306ff..b96eaafb67b 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -161,7 +161,7 @@ foreach ($object->fields as $key => $val) { $value = $object->$key; $rightpart .= '
'; + print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0); + print ''; + print(!empty($val) ? $val : ''); + print ''; + print price2num(!empty($val) ? $val : 0, 'MS'); + print ''; + print price(!empty($val) ? $val : 0); + print ''; - print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0); - print ''; - print(!empty($val) ? $val : ''); - print ''; - print price2num(!empty($val) ? $val : 0, 'MS'); - print ''; - print price(!empty($val) ? $val : 0); - print '
'.$langs->trans("Duration").''; print img_picto('', 'clock', 'class="pictofixedwidth"'); - print ''; + print ''; print $formproduct->selectMeasuringUnits("duration_unit", "time", (GETPOSTISSET('duration_unit') ? GETPOST('duration_unit', 'alpha') : 'h'), 0, 1); // Mandatory period - print '       '; - print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; + if ($object->duration_value > 0) { + print '     '; + } + print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; print '
'.$langs->trans("Weight").''; print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"'); print ''; - print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ? GETPOST('weight_units', 'alpha') : (!getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT') ? 0 : getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT')), 0, 2); + print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ? GETPOST('weight_units', 'alpha') : (GETPOST('weight_units', 'alpha') ?: getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 0)), 0, 2); print '
'.$langs->trans("Surface").''; print ''; - print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ? GETPOST('surface_units', 'alpha') : '0', 0, 2); + print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ? GETPOST('surface_units', 'alpha') : (GETPOST('surface_units', 'alpha') ?: '0'), 0, 2); print '
'.$langs->trans("Volume").''; print ''; - print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units') ? GETPOST('volume_units', 'alpha') : '0', 0, 2); + print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units') ? GETPOST('volume_units', 'alpha') : (GETPOST('volume_units', 'alpha') ?: '0'), 0, 2); print '
'.$langs->trans("NetMeasure").''; print ''; - print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units') ? GETPOST('net_measure_units', 'alpha') : (!getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT') ? 0 : getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT')), 0, 0); + print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units') ? GETPOST('net_measure_units', 'alpha') : (GETPOST('net_measure_units', 'alpha') ?: getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 0)), 0, 0); print '
'.$langs->trans("VATRate").''; $defaultva = get_default_tva($mysoc, $mysoc); print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print ajax_combobox("tva_tx"); print '
'; @@ -1783,6 +1785,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print '
'.$langs->trans("SellingPrice").''; print $form->selectPriceBaseType(getDolGlobalString('PRODUCT_PRICE_BASE_TYPE'), "price_base_type"); + print ajax_combobox("select_price_base_type"); print '
'.$langs->trans("VATRate").''; $defaultva = get_default_tva($mysoc, $mysoc); print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print ajax_combobox("tva_tx"); print '
'; @@ -2242,12 +2246,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if ($object->isService()) { // Duration print '
'.$langs->trans("Duration").''; - print ' '; + print ' '; print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); // Mandatory period - print '       '; - print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; + if ($object->duration_value > 0) { + print '     '; + } + print 'mandatory_period == 1 ? ' checked="checked"' : '').'>'; print '
'.$langs->trans("Duration").''; - print $object->duration_value; + print $object->duration_value ? $object->duration_value : ''; print (!empty($object->duration_unit) && isset($durations[$object->duration_unit]) ? " ".$langs->trans($durations[$object->duration_unit])." " : ''); // Mandatory period - if ($object->duration_value > 0) { - print '       '; - } $htmltooltip = $langs->trans("mandatoryHelper"); if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) { $htmltooltip .= '
'.$langs->trans("mandatoryHelper2"); } - print 'mandatory_period == 1 ? ' checked="checked"' : '').' disabled>'; + if ($object->duration_value > 0) { + print '     '; + } + print 'mandatory_period == 1 ? ' checked="checked"' : '').' disabled>'; print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0); print '
' . $langs->trans('Default') . '
'; print ' '; - print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type') ? GETPOST('multicurrency_price_base_type') : 'HT'), "multicurrency_price_base_type"); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices + print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type') ? GETPOST('multicurrency_price_base_type') : 'HT'), "multicurrency_price_base_type", 1); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices print '
'.$langs->trans("PriceQtyMin").''; print ' '; - print $form->selectPriceBaseType((GETPOSTISSET('price_base_type') ? GETPOST('price_base_type') : 'HT'), "price_base_type"); // We keep 'HT' here, price_base_type is not yet supported for supplier prices + print $form->selectPriceBaseType((GETPOSTISSET('price_base_type') ? GETPOST('price_base_type') : 'HT'), "price_base_type", 1); // We keep 'HT' here, price_base_type is not yet supported for supplier prices print '
'.$langs->trans("ProductOrService").''; print img_picto('', 'product', 'class="pictofixedwidth"'); - print $form->select_produits($id, 'id', '', 0, 0, 1, 2, '', ($conf->dol_optimize_smallscreen ? 1 : 0), array(), 0, '1', 0, 'widthcentpercentminusx maxwidth400'); + print $form->select_produits($id, 'id', '', 0, 0, 1, 2, '', 0, array(), 0, $langs->trans("RefOrLabel"), 0, 'widthcentpercentminusx maxwidth400'); print '
'; print ''; - $parameters = array('totalarray' => &$totalarray); + $parameters = array('context' => 'warehousecard', 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -680,7 +680,7 @@ if ($action == 'create') { $totalarray['nbfield']++; } // Hook fields - $parameters = array('sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); + $parameters = array('context' => 'warehousecard', 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print "\n"; @@ -714,7 +714,7 @@ if ($action == 'create') { } $sql .= ", (ps.reel * p.pmp) as svalue"; // Add fields from hooks - $parameters = array(); + $parameters = array('context' => 'warehousecard'); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook if ($reshook > 0) { //Note that $sql is replaced if reshook > 0 $sql = ""; @@ -847,7 +847,7 @@ if ($action == 'create') { print ""; } - $parameters = array('obj' => $objp, 'totalarray' => &$totalarray); + $parameters = array('context' => 'warehousecard', 'obj' => $objp, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -871,7 +871,7 @@ if ($action == 'create') { $totalarray['val']['totalvaluesell'] = price2num($totalvaluesell, 'MT'); $totalarray['val']['units'] = $langs->trans($productstatic->getLabelOfUnit()); - $parameters = array('totalarray' => &$totalarray); + $parameters = array('context' => 'warehousecard', 'totalarray' => &$totalarray); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListTotal', $parameters, $object); if ($reshook < 0) { @@ -976,7 +976,7 @@ if ($action == 'create') { print ''; // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => '3'); + $parameters = array('context' => 'warehousecard', 'colspan' => ' colspan="3"', 'cols' => '3'); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 169ccd2c34f..ce953cf5a34 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -158,7 +158,7 @@ class Entrepot extends CommonObject // BEGIN MODULEBUILDER PROPERTIES /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'ID', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 10), @@ -178,7 +178,7 @@ class Entrepot extends CommonObject //'fk_user_author' =>array('type'=>'integer', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-2, 'position'=>82), 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'position' => 300), 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 301), - 'warehouse_usage' => array('type' => 'integer', 'label' => 'WarehouseUsage', 'enabled' => 'getDolGlobalInt("STOCK_USE_WAREHOUSE_USAGE")', 'visible' => 1, 'position' => 400, 'default' => 1, 'arrayofkeyval' => array(1 => 'InternalWarehouse', 2 => 'ExternalWarehouse')), + 'warehouse_usage' => array('type' => 'integer', 'label' => 'WarehouseUsage', 'enabled' => 'getDolGlobalInt("STOCK_USE_WAREHOUSE_USAGE")', 'visible' => 1, 'position' => 400, 'default' => '1', 'arrayofkeyval' => array(1 => 'InternalWarehouse', 2 => 'ExternalWarehouse')), //'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000), //'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>1010), 'statut' => array('type' => 'tinyint(4)', 'label' => 'Status', 'enabled' => 1, 'visible' => 1, 'position' => 500, 'css' => 'minwidth50'), diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 6f4232b1ca7..45668188f93 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -478,7 +478,7 @@ class MouvementStock extends CommonObject return -8; } } else { - if (isset($product->stock_warehouse[$entrepot_id]) && (empty($product->stock_warehouse[$entrepot_id]->real) || $product->stock_warehouse[$entrepot_id]->real < abs($qty))) { + if (empty($product->stock_warehouse[$entrepot_id]) || empty($product->stock_warehouse[$entrepot_id]->real) || $product->stock_warehouse[$entrepot_id]->real < abs($qty)) { $langs->load("stocks"); $this->error = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref; $this->errors[] = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref; diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 61e7daeef71..fe0c342b3d9 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -144,7 +144,7 @@ class Productlot extends CommonObject */ /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'noteditable' => 1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id', 'css' => 'left'), @@ -848,7 +848,6 @@ class Productlot extends CommonObject */ public function loadStatsExpedition($socid = 0) { - // phpcs:enable global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT exp.fk_soc) as nb_customers, COUNT(DISTINCT exp.rowid) as nb,"; @@ -923,7 +922,6 @@ class Productlot extends CommonObject */ public function loadStatsSupplierOrder($socid = 0) { - // phpcs:enable global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_customers, COUNT(DISTINCT cf.rowid) as nb,"; @@ -998,7 +996,6 @@ class Productlot extends CommonObject */ public function loadStatsReception($socid = 0) { - // phpcs:enable global $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT recep.fk_soc) as nb_customers, COUNT(DISTINCT recep.rowid) as nb,"; @@ -1072,7 +1069,6 @@ class Productlot extends CommonObject */ public function loadStatsMo($socid = 0) { - // phpcs:enable global $user, $hookmanager, $action; $error = 0; @@ -1342,7 +1338,7 @@ class Productlot extends CommonObject /** * Return validation test result for a field * - * @param array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> $fields Array of properties of field to show + * @param array|string,position:int,notnull?:int,visible:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> $fields Array of properties of field to show * @param string $fieldKey Key of attribute * @param string $fieldValue value of attribute * @return bool Return false if fail, true on success, set $this->error for error message diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 6c233a4719c..9c81e707e3d 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -65,6 +65,7 @@ $product_id = GETPOSTINT("product_id"); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'movementlist'; +$optioncss = GETPOST('optioncss', 'alpha'); $idproduct = GETPOSTINT('idproduct'); $year = GETPOSTINT("year"); @@ -559,7 +560,7 @@ if ($resql) { if ($msid) { $texte = $langs->trans('StockMovementForId', $msid); } else { - $texte = $langs->trans("ListOfStockMovements"); + $texte = $langs->trans("StockMovements"); if ($id) { $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; } diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index a8ecbeacf72..e5cabbe26d5 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -333,8 +333,7 @@ if (empty($reshook)) { } if ($action == 'update_extras' && $permissiontoadd) { - $whClass = get_class($whClass); - $whClass::$oldcopy = dol_clone($tmpwarehouse, 2); + $tmpwarehouse->oldcopy = dol_clone($tmpwarehouse, 2); // @phan-suppress-current-line PhanTypeMismatchProperty // Fill array 'array_options' with data from update form $ret = $extrafields->setOptionalsFromPost(null, $tmpwarehouse, GETPOST('attribute', 'restricthtml')); @@ -832,7 +831,7 @@ $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; if ($msid) { $title = $langs->trans('StockMovementForId', $msid); } else { - $title = $langs->trans("ListOfStockMovements"); + $title = $langs->trans("StockMovements"); if ($id) { if (!empty($warehouse->ref)) { $title .= ' ('.$warehouse->ref.')'; @@ -1236,7 +1235,7 @@ if (!empty($arrayfields['pl.sellby']['checked'])) { if (!empty($arrayfields['e.ref']['checked'])) { print ''; } if (!empty($arrayfields['m.fk_user_author']['checked'])) { @@ -1564,7 +1563,7 @@ while ($i < $imaxinloop) { } // Warehouse if (!empty($arrayfields['e.ref']['checked'])) { - print '\n"; } @@ -1591,7 +1590,7 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['origin']['checked'])) { print ''; } - // fk_project + // Project if (!empty($arrayfields['m.fk_projet']['checked'])) { print ''; // Action column diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 4359afad90f..beac0f4cbb2 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -155,7 +155,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -308,7 +308,7 @@ if ($id > 0 || !empty($ref)) { if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")"; + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); } else { $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); } diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 495d4bb5712..f829533062a 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -212,7 +212,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -335,7 +335,7 @@ if ($id > 0 || !empty($ref)) { if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")"; + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); } else { $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index c4cf270b6a7..8f091a04a5e 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -169,7 +169,7 @@ if ($object->id > 0) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -293,7 +293,7 @@ if ($object->id > 0) { if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")"; + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); } else { $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 77861e2f681..673c820368b 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -159,7 +159,7 @@ if ($object->id > 0) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -277,7 +277,7 @@ if ($object->id > 0) { if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet:IN:(".$db->sanitize($projectsListId).")"; + $object->next_prev_filter = " fk_projet:IN:".$db->sanitize($projectsListId); } else { $object->next_prev_filter = " fk_projet:=:".((int) $projectstatic->id); } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 0af8a5c26ce..8a219264f96 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -329,7 +329,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); @@ -618,7 +618,7 @@ if ($id > 0 || !empty($ref)) { if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = "fk_projet:IN:(".$db->sanitize($projectsListId).")"; + $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId); } else { $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id); } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 523f93e97e4..1002df365a2 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -959,7 +959,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = "rowid:IN:(" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")"; + $projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); @@ -1143,7 +1143,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = "fk_projet:IN:(" . $db->sanitize($projectsListId) . ")"; + $object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId); } else { $object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id); } @@ -2119,6 +2119,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser break; } + // Line is invoiced if it has an invoice_id + $invoiced = $task_time->invoice_id ? true : false; + $date1 = $db->jdate($task_time->element_date); $date2 = $db->jdate($task_time->element_datehour); @@ -2156,7 +2159,18 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $selected = 1; } print ' '; - print ''; + + // Disable select if task not billable or already invoiced + $disabled = (intval($task_time->billable) != 1 || $invoiced); + $ctrl = ''; + if ($disabled) { + // If disabled, a dbl-click very close outside the control + // will re-enable it, so that user is not blocked if needed. + print ''.$ctrl.''; + print ''; + } else { + print $ctrl; + } } } } @@ -2426,7 +2440,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } // Invoiced - $invoiced = false; if (!empty($arrayfields['valuebilled']['checked'])) { print ''; } print ''; - print ''; + print ''; } print ''; @@ -460,7 +466,7 @@ if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA')) { print ''; print ''; print ''; - print '' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . ''; + print '' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . ''; print ''; print ''; } diff --git a/htdocs/public/cron/cron_run_jobs_by_url.php b/htdocs/public/cron/cron_run_jobs_by_url.php index 2ded3bfb832..2c2bd2e7670 100644 --- a/htdocs/public/cron/cron_run_jobs_by_url.php +++ b/htdocs/public/cron/cron_run_jobs_by_url.php @@ -4,6 +4,7 @@ * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2017 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,8 +70,12 @@ require '../../main.inc.php'; // cron jobs library dol_include_once("/cron/class/cronjob.class.php"); - -global $langs, $conf; +/** + * @var Conf $conf + * @var DoliDB $db + * @var Translate $langs + */ +global $langs, $conf, $db; // Language Management $langs->loadLangs(array("admin", "cron", "dict")); @@ -225,13 +230,13 @@ if (is_array($object->lines) && (count($object->lines) > 0)) { // We re-program the next execution and stores the last execution time for this job $result = $cronjob->reprogram_jobs($userlogin, $now); if ($result < 0) { - echo "Error cronjobid: ".$line->id." cronjob->reprogram_job: ".$cronjob->error."\n"; + echo " - Error cronjobid: ".$line->id." cronjob->reprogram_job: ".$cronjob->error."\n"; echo "Enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n"; dol_syslog("cron_run_jobs.php::reprogram_jobs Error".$cronjob->error, LOG_ERR); - exit; + exit(1); } - echo "Job re-scheduled\n"; + echo " - Job re-scheduled\n"; } else { echo " - not qualified (datenextrunok=".($datenextrunok ?: 0).", datestartok=".($datestartok ?: 0).", dateendok=".($dateendok ?: 0).")\n"; diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index cbe3cb0c0f3..2c23ea5420c 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -39,7 +39,12 @@ if (!defined('NOIPCHECK')) { // Load Dolibarr environment require '../../main.inc.php'; require_once '../../core/lib/functions2.lib.php'; - +/** + * @var Conf $conf + * @var DoliDB $db + * @var HookManager $hookmanager + * @var Translate $langs + */ $langs->loadLangs(array("main", "install", "other")); $conf->dol_hide_topmenu = GETPOSTINT('dol_hide_topmenu'); diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 96bca9bd84e..e801451df37 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -84,7 +84,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); if ($num) { - print "
'; //print ''; - print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth200'); + print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth150'); print ''; + print ''; print $warehousestatic->getNomUrl(1); print "'.$origin.''; if ($obj->fk_project != 0) { diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index 54813e16de1..a53aafa557f 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -88,6 +88,8 @@ if (!$sortfield) { $modulepart = 'product_batch'; $object = new Productlot($db); if ($id || $ref) { + $productid = 0; + $batch = ''; if ($ref) { $tmp = explode('_', $ref); $productid = $tmp[0]; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 95784d927cc..e6164d741d3 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -59,6 +59,7 @@ $search_batch = GETPOST('search_batch', 'alpha'); $search_fk_user_creat = GETPOSTINT('search_fk_user_creat'); $search_fk_user_modif = GETPOSTINT('search_fk_user_modif'); $search_import_key = GETPOSTINT('search_import_key'); +$show_files = GETPOSTINT('show_files'); // Load variable for pagination $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 150984d4064..1f0a72aeb43 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -745,7 +745,7 @@ if ($usevirtualstock == 0) { $stocklabel = $langs->trans('PhysicalStock'); } if (getDolGlobalString('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE') && $fk_entrepot > 0) { - $stocklabelbis = $stocklabel.' (Selected warehouse)'; + $stocklabelbis = $stocklabel.' ('.$langs->trans('SelectedWarehouse').')'; $stocklabel .= ' ('.$langs->trans("AllWarehouses").')'; } $texte = $langs->trans('Replenishment'); diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php index 1c9e3a2d4c6..a55a9341b1c 100644 --- a/htdocs/product/stock/stats/commande_fournisseur.php +++ b/htdocs/product/stock/stats/commande_fournisseur.php @@ -48,13 +48,13 @@ $langs->loadLangs(array('companies', 'bills', 'products', 'orders')); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); -$batch = GETPOST('batch', 'alpha'); -$objectid = GETPOSTINT('productid'); +$batch = GETPOST('batch', 'alpha'); +$objectid = GETPOSTINT('productid'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -$socid = ''; +$socid = 0; if (!empty($user->socid)) { $socid = $user->socid; } @@ -75,10 +75,10 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) { +if (empty($sortorder)) { $sortorder = "DESC"; } -if (!$sortfield) { +if (empty($sortfield)) { $sortfield = "cf.date_commande"; } @@ -131,6 +131,7 @@ if ($id > 0 || !empty($ref)) { $head = productlot_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = 'lot'; + $morehtmlref = ''; print dol_get_fiche_head($head, 'referers', $langs->trans("Batch"), -1, $object->picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -271,7 +272,7 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - $option .= '&id='.$object->id; + $option = '&id='.$object->id; if ($limit > 0 && $limit != $conf->liste_limit) { $option .= '&limit='.((int) $limit); @@ -285,12 +286,8 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; print ''; - if (!empty($sortfield)) { - print ''; - } - if (!empty($sortorder)) { - print ''; - } + print ''; + print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php index 38ecd66d215..e6a24a0cb16 100644 --- a/htdocs/product/stock/stats/expedition.php +++ b/htdocs/product/stock/stats/expedition.php @@ -54,7 +54,7 @@ $objectid = GETPOSTINT('productid'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -$socid = ''; +$socid = 0; if (!empty($user->socid)) { $socid = $user->socid; } @@ -75,10 +75,10 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) { +if (empty($sortorder)) { $sortorder = "DESC"; } -if (!$sortfield) { +if (empty($sortfield)) { $sortfield = "exp.date_creation"; } @@ -131,6 +131,7 @@ if ($id > 0 || !empty($ref)) { $head = productlot_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = 'lot'; + $morehtmlref = ''; print dol_get_fiche_head($head, 'referers', $langs->trans("Batch"), -1, $object->picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -270,7 +271,7 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - $option .= '&id='.$object->id; + $option = '&id='.$object->id; if ($limit > 0 && $limit != $conf->liste_limit) { $option .= '&limit='.((int) $limit); @@ -284,12 +285,8 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; print ''; - if (!empty($sortfield)) { - print ''; - } - if (!empty($sortorder)) { - print ''; - } + print ''; + print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Shipments"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php index 8cc868fecc3..9a87fa83783 100644 --- a/htdocs/product/stock/stats/mo.php +++ b/htdocs/product/stock/stats/mo.php @@ -50,6 +50,7 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); +$socid = 0; if ($user->socid) { $socid = $user->socid; } @@ -68,10 +69,10 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) { +if (empty($sortorder)) { $sortorder = "DESC"; } -if (!$sortfield) { +if (empty($sortfield)) { $sortfield = "c.date_valid"; } @@ -100,6 +101,8 @@ $formother = new FormOther($db); if ($id > 0 || !empty($ref)) { $object = new Productlot($db); + $batch = ''; + $objectid = 0; if ($ref) { $tmp = explode('_', $ref); $objectid = $tmp[0]; @@ -124,6 +127,7 @@ if ($id > 0 || !empty($ref)) { $head = productlot_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = 'lot'; + $morehtmlref = ''; print dol_get_fiche_head($head, 'referers', $langs->trans("Batch"), -1, $object->picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook @@ -188,7 +192,7 @@ if ($id > 0 || !empty($ref)) { if (!empty($search_year)) { $sql .= ' AND YEAR(c.date_valid) IN ('.$db->sanitize($search_year).')'; } - if ($socid) { + if ($socid > 0) { $sql .= " AND s.rowid = ".((int) $socid); } $sql .= " GROUP BY c.rowid, c.ref, c.date_valid, c.status"; @@ -226,12 +230,8 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; print ''; - if (!empty($sortfield)) { - print ''; - } - if (!empty($sortorder)) { - print ''; - } + print ''; + print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php index b8257cd12c8..00f44bbf175 100644 --- a/htdocs/product/stock/stats/reception.php +++ b/htdocs/product/stock/stats/reception.php @@ -54,7 +54,7 @@ $objectid = GETPOSTINT('productid'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -$socid = ''; +$socid = 0; if (!empty($user->socid)) { $socid = $user->socid; } @@ -75,10 +75,10 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) { +if (empty($sortorder)) { $sortorder = "DESC"; } -if (!$sortfield) { +if (empty($sortfield)) { $sortfield = "recep.date_creation"; } @@ -131,6 +131,7 @@ if ($id > 0 || !empty($ref)) { $head = productlot_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = 'lot'; + $morehtmlref = ''; print dol_get_fiche_head($head, 'referers', $langs->trans("Batch"), -1, $object->picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -269,7 +270,7 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - $option .= '&id='.$object->id; + $option = '&id='.$object->id; if ($limit > 0 && $limit != $conf->liste_limit) { $option .= '&limit='.((int) $limit); @@ -283,12 +284,8 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; print ''; - if (!empty($sortfield)) { - print ''; - } - if (!empty($sortorder)) { - print ''; - } + print ''; + print ''; // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Receptions"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index c684e2b0e33..a4d118e852d 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -140,7 +140,7 @@ class StockTransfer extends CommonObject // BEGIN MODULEBUILDER PROPERTIES /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'comment' => "Id"), diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index bcaf9d3d6f7..f1e1b546ff4 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -82,7 +82,7 @@ class StockTransferLine extends CommonObjectLine // BEGIN MODULEBUILDER PROPERTIES /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'comment' => "Id"), diff --git a/htdocs/projet/admin/website.php b/htdocs/projet/admin/website.php index f9c91dadd52..3238fa37009 100644 --- a/htdocs/projet/admin/website.php +++ b/htdocs/projet/admin/website.php @@ -39,6 +39,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; * @var HookManager $hookmanager * @var Translate $langs * @var User $user + * + * @var string $dolibarr_main_url_root */ // Load translation files required by the page diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php index 3aa654d4a65..256cf2d74a2 100644 --- a/htdocs/projet/agenda.php +++ b/htdocs/projet/agenda.php @@ -157,7 +157,7 @@ $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 74f93c4505e..0eb947f56a6 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1365,7 +1365,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 062b4975f87..20f33e445da 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -95,7 +95,7 @@ class Project extends CommonObject public $dateo; /** - * @var int Date start + * @var null|int|string Field with Date start */ public $date_start; @@ -106,7 +106,7 @@ class Project extends CommonObject public $datee; /** - * @var int Date end + * @var null|int|string Field with Date end */ public $date_end; @@ -246,11 +246,6 @@ class Project extends CommonObject */ public $email_msgid; - /** - * @var ?static - */ - public $oldcopy; - /** * @var array Used to store workload details of a projet (array[day]) */ @@ -344,7 +339,7 @@ class Project extends CommonObject // BEGIN MODULEBUILDER PROPERTIES /** - * @var array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull?:int,visible:int<-5,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,4>,disabled?:int<0,1>,arrayofkeyval?:array,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>,showonheader?:int<0,1>}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'ID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10), @@ -373,7 +368,7 @@ class Project extends CommonObject // Properties for event organization 'date_start_event' => array('type' => 'date', 'label' => 'DateStartEvent', 'enabled' => "isModEnabled('eventorganization')", 'visible' => 1, 'position' => 200), 'date_end_event' => array('type' => 'date', 'label' => 'DateEndEvent', 'enabled' => "isModEnabled('eventorganization')", 'visible' => 1, 'position' => 201), - 'location' => array('type' => 'text', 'label' => 'Location', 'enabled' => 1, 'visible' => 3, 'position' => 55, 'searchall' => 202), + 'location' => array('type' => 'text', 'label' => 'Location', 'enabled' => 1, 'visible' => 3, 'position' => 202, 'searchall' => 1), 'accept_conference_suggestions' => array('type' => 'integer', 'label' => 'AllowUnknownPeopleSuggestConf', 'enabled' => 1, 'visible' => -1, 'position' => 210), 'accept_booth_suggestions' => array('type' => 'integer', 'label' => 'AllowUnknownPeopleSuggestBooth', 'enabled' => 1, 'visible' => -1, 'position' => 211), 'price_registration' => array('type' => 'double(24,8)', 'label' => 'PriceOfRegistration', 'enabled' => 1, 'visible' => -1, 'position' => 212), diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 77203f5cfbc..89c99873c09 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -2331,15 +2331,15 @@ class Task extends CommonObjectLine $projectstatic = new Project($this->db); $projectstatic->fetch($ori_project_id); - //Origin project start date - $orign_project_dt_start = $projectstatic->date_start; + // Origin project start date + $orign_project_dt_start = (!isset($projectstatic->date_start) || $projectstatic->date_start == '') ? $projectstatic->date_c : $projectstatic->date_start; - //Calculate new task start date with difference between origin proj start date and origin task start date + // Calculate new task start date with difference between origin proj start date and origin task start date if (!empty($clone_task->date_start)) { $clone_task->date_start = $now + $clone_task->date_start - $orign_project_dt_start; } - //Calculate new task end date with difference between origin proj end date and origin task end date + // Calculate new task end date with difference between origin proj start date and origin task end date if (!empty($clone_task->date_end)) { $clone_task->date_end = $now + $clone_task->date_end - $orign_project_dt_start; } @@ -2410,7 +2410,7 @@ class Task extends CommonObjectLine $ori_task_dir = $conf->project->dir_output."/".dol_sanitizeFileName($ori_project_ref)."/".dol_sanitizeFileName((string) $fromid); $filearray = dol_dir_list($ori_task_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1); - foreach ($filearray as $key => $file) { + foreach ($filearray as $file) { if (!file_exists($clone_task_dir)) { if (dol_mkdir($clone_task_dir) < 0) { $this->error .= $langs->trans('ErrorInternalErrorDetected').':dol_mkdir'; diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index e02404f9838..f116b941dcc 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -128,7 +128,7 @@ $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index ce89643f847..4f2dde28a50 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -380,7 +380,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 83c5416ceea..e96fd4d9cca 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -101,6 +101,12 @@ $permissiontoadd = $user->hasRight('projet', 'creer'); * Actions */ +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; @@ -161,7 +167,7 @@ if ($object->id > 0) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 96d5b569677..6f3e138c587 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -267,7 +267,7 @@ $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "te.rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "te.rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -948,7 +948,7 @@ foreach ($listofreferent as $key => $value) { $total_ttc_by_line = $element->total_ttc; } - // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + // Change sign of $total_ht_by_line and $total_ttc_by_line for various payments if ($tablename == 'payment_various') { if ($element->sens == 1) { $total_ht_by_line = -$total_ht_by_line; @@ -956,6 +956,12 @@ foreach ($listofreferent as $key => $value) { } } + // Change sign of $total_ht_by_line and $total_ttc_by_line for supplier proposal and supplier order + if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_proposal') { + $total_ht_by_line = -$total_ht_by_line; + $total_ttc_by_line = -$total_ttc_by_line; + } + // Add total if we have to if ($qualifiedfortotal) { $total_ht += $total_ht_by_line; @@ -1255,6 +1261,7 @@ foreach ($listofreferent as $key => $value) { } $num = count($elementarray); + $total_time = 0; for ($i = 0; $i < $num; $i++) { $tmp = explode('_', $elementarray[$i]); $idofelement = $tmp[0]; diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 12c99a354dc..33f7122723b 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -139,7 +139,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index da8c2b669b0..9170ba31ed3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -445,6 +445,8 @@ if (empty($reshook)) { $permissiontodelete = $user->hasRight('projet', 'supprimer'); $permissiontoadd = $user->hasRight('projet', 'creer'); $uploaddir = $conf->project->dir_output; + + global $error; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // Close records diff --git a/htdocs/projet/messaging.php b/htdocs/projet/messaging.php index 065985317fa..f5d2cafb6e8 100644 --- a/htdocs/projet/messaging.php +++ b/htdocs/projet/messaging.php @@ -93,6 +93,17 @@ if (!$user->hasRight('projet', 'lire')) { * Actions */ +$object = new Project($db); + +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); + $object->fetch_thirdparty(); + if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } + $object->info($object->id); +} + $parameters = array('id' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -112,16 +123,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' */ $form = new Form($db); -$object = new Project($db); - -if ($id > 0 || !empty($ref)) { - $object->fetch($id, $ref); - $object->fetch_thirdparty(); - if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object, 'fetchComments') && empty($object->comments)) { - $object->fetchComments(); - } - $object->info($object->id); -} $agenda = (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) ? '/'.$langs->trans("Agenda") : ''; $title = $langs->trans('Events').$agenda.' - '.$object->ref.' '.$object->name; if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/projectnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) { @@ -157,7 +158,7 @@ $morehtmlref .= ''; // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index e80fb0ff9a6..6130564e2da 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -126,7 +126,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index e28d70853ad..f2d8ed9080b 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -455,6 +455,7 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-card_tasks'); $arrayofselected = is_array($toselect) ? $toselect : array(); +$param = ''; if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); @@ -623,7 +624,7 @@ if ($id > 0 || !empty($ref)) { // Define a complementary filter for search of next/prev ref. if (!$user->hasRight('projet', 'all', 'lire')) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = "rowid:IN:(".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0'); } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -890,7 +891,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- print ''; } elseif ($id > 0 || !empty($ref)) { - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields // Projet card in view mode @@ -1097,6 +1098,11 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + // Fields from hook + $parameters = array('arrayfields' => $arrayfields); + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ' '; // invoice_id and invoice_line_id if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { @@ -2506,6 +2519,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $selected = 1; } print ' '; + // Disable select if task not billable or already invoiced $disabled = (intval($task_time->billable) != 1 || $invoiced); $ctrl = ''; diff --git a/htdocs/public/clicktodial/cidlookup.php b/htdocs/public/clicktodial/cidlookup.php index 3ec7024855d..feb1253e760 100644 --- a/htdocs/public/clicktodial/cidlookup.php +++ b/htdocs/public/clicktodial/cidlookup.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +52,10 @@ if (!defined('USESUFFIXINLOG')) { } include '../../main.inc.php'; - +/** + * @var Conf $conf + * @var DoliDB $db + */ $phone = GETPOST('phone'); $securitykey = GETPOST('securitykey'); diff --git a/htdocs/public/company/new.php b/htdocs/public/company/new.php index 7a3622d62b8..f7942e267c5 100644 --- a/htdocs/public/company/new.php +++ b/htdocs/public/company/new.php @@ -8,7 +8,7 @@ * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2021 Waël Almoman * Copyright (C) 2022 Udo Tamm - * 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 @@ -46,9 +46,9 @@ if (!defined('NOBROWSERNOTIF')) { // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // Because 2 entities can have the same ref $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) { - define("DOLENTITY", $entity); -} +// if (is_numeric($entity)) { // value is casted to int so always numeric +define("DOLENTITY", $entity); +// } // Load Dolibarr environment @@ -63,6 +63,14 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php'; + +/** + * @var Conf $conf + * @var DoliDB $db + * @var HookManager $hookmanager + * @var Translate $langs + * @var User $user + */ // Init vars $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -84,7 +92,7 @@ if (!getDolGlobalString('SOCIETE_ENABLE_PUBLIC')) { } -//permissions +// permissions $permissiontoadd = $user->hasRight('societe', 'creer'); @@ -132,16 +140,16 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; // Output html code for logo - if ($urllogo) { - print '
'; - print '
'; - print ''; - print '
'; - if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) { - print ''; - } - print '
'; + // if ($urllogo) { // test always true + print '
'; + print '
'; + print ''; + print '
'; + if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) { + print ''; } + print '
'; + // } if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) { print '
'; @@ -163,15 +171,13 @@ function llxFooterVierge() { global $conf, $langs; - $ext = ''; - print '
'; printCommonFooter('public'); if (!empty($conf->use_javascript_ajax)) { print "\n" . '' . "\n"; - print '' . "\n"; + print '' . "\n"; } print "\n"; @@ -219,13 +225,13 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $societe->name = GETPOST('name', 'alphanohtml'); $societe->client = GETPOSTINT('client') ? GETPOSTINT('client') : $societe->client; - $societe->address = GETPOST('address', 'alphanohtml'); - $societe->country_id = GETPOSTINT('country_id'); - $societe->phone = GETPOST('phone', 'alpha'); - $societe->fax = GETPOST('fax', 'alpha'); - $societe->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); + $societe->address = GETPOST('address', 'alphanohtml'); + $societe->country_id = GETPOSTINT('country_id'); + $societe->phone = GETPOST('phone', 'alpha'); + $societe->fax = GETPOST('fax', 'alpha'); + $societe->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); $societe->client = 2 ; // our client is a prospect - $societe->code_client = '-1'; + $societe->code_client = '-1'; $societe->name_alias = GETPOST('name_alias', 'alphanohtml'); $societe->note_private = GETPOST('note_private', 'alphanohtml'); @@ -429,7 +435,7 @@ if (isModEnabled('mailing') && getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRE print '
' . $form->editfieldkey($langs->trans('No_Email') . ' (' . $langs->trans('Contact') . ')', 'contact_no_email', '', $objectsoc, 0) . 'browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . 'browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . '
"; + print '
'; print ''; print ""; @@ -102,7 +102,7 @@ if ($resql) { print "\n"; } print "\n"; - print ''; + print ''; print ""; $i++; } diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 1a046fc2be6..9504034a64a 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -91,7 +91,9 @@ function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages = // Load Dolibarr environment require '../../main.inc.php'; - +/** + * @var DoliDB $db + */ $mtid = GETPOST('mtid'); $email = GETPOST('email'); $tag = GETPOST('tag'); diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index 7987a082144..77079262073 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -56,8 +56,10 @@ if (! defined('NOREQUIREAJAX')) { // Load Dolibarr environment require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - -global $user, $conf, $langs; +/** + * @var DoliDB $db + */ +global $user, $conf, $db, $langs; $langs->loadLangs(array("main", "mails")); diff --git a/htdocs/public/fichinter/agendaexport.php b/htdocs/public/fichinter/agendaexport.php index a5c6f843041..c122767cf85 100644 --- a/htdocs/public/fichinter/agendaexport.php +++ b/htdocs/public/fichinter/agendaexport.php @@ -474,22 +474,22 @@ function build_exportfile($format, $type, $cachedelay, $filename, $filters) } if ($key == 'year') { $sql .= " AND fd.date BETWEEN '".$db->idate(dol_get_first_day($value, 1))."'"; - $sql .= " AND '".$db->idate(dol_get_last_day($value, 12))."'"; + $sql .= " AND '".$db->idate(dol_get_last_day($value, 12))."'"; } if ($key == 'id') { - $sql .= " AND f.rowid = ".(is_numeric($value) ? $value : 0); + $sql .= " AND f.rowid = ".((int) $value); } if ($key == 'idfrom') { - $sql .= " AND f.rowid >= ".(is_numeric($value) ? $value : 0); + $sql .= " AND f.rowid >= ".((int) $value); } if ($key == 'idto') { - $sql .= " AND f.rowid <= ".(is_numeric($value) ? $value : 0); + $sql .= " AND f.rowid <= ".((int) $value); } if ($key == 'project') { - $sql .= " AND f.fk_project = ".(is_numeric($value) ? $value : 0); + $sql .= " AND f.fk_project = ".((int) $value); } if ($key == 'contract') { - $sql .= " AND f.fk_contract = ".(is_numeric($value) ? $value : 0); + $sql .= " AND f.fk_contract = ".((int) $value); } if ($key == 'logina') { @@ -502,7 +502,7 @@ function build_exportfile($format, $type, $cachedelay, $filename, $filters) $userforfilter = new User($db); $result = $userforfilter->fetch(0, $logina); if ($result > 0) { - $sql .= " AND a.fk_user_author ".$condition." ".$userforfilter->id; + $sql .= " AND a.fk_user_author ".$condition." ".((int) $userforfilter->id); } elseif ($result < 0 || $condition == '=') { $sql .= " AND a.fk_user_author = 0"; } @@ -518,7 +518,7 @@ function build_exportfile($format, $type, $cachedelay, $filename, $filters) $result = $userforfilter->fetch(0, $logini); $sql .= " AND EXISTS (SELECT ec.rowid FROM ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= " WHERE ec.element_id = f.rowid"; - $sql .= " AND ec.fk_c_type_contact = 26"; + $sql .= " AND ec.fk_c_type_contact = 26"; // FIXME do not use hardcoded ID if ($result > 0) { $sql .= " AND ec.fk_socpeople = ".((int) $userforfilter->id); } elseif ($result < 0 || $condition == '=') { @@ -537,7 +537,7 @@ function build_exportfile($format, $type, $cachedelay, $filename, $filters) $result = $userforfilter->fetch(0, $loginr); $sql .= " AND EXISTS (SELECT ecr.rowid FROM ".MAIN_DB_PREFIX."element_contact as ecr"; $sql .= " WHERE ecr.element_id = f.rowid"; - $sql .= " WHERE AND ecr.fk_c_type_contact = 27"; + $sql .= " WHERE AND ecr.fk_c_type_contact = 27"; // FIXME do not use hardcoded ID if ($result > 0) { $sql .= " AND ecr.fk_socpeople = ".((int) $userforfilter->id); } elseif ($result < 0 || $condition == '=') { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 3389a688bda..df26dbf783a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -55,9 +55,9 @@ if (!defined('NOBROWSERNOTIF')) { // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // Because 2 entities can have the same ref. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) { - define("DOLENTITY", $entity); -} +// if (is_numeric($entity)) { // $entity is casted to int +define("DOLENTITY", $entity); +// } // Load Dolibarr environment diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index a00be39a2d5..ed2a67f24ee 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -43,9 +43,9 @@ if (!defined('NOBROWSERNOTIF')) { // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // Because 2 entities can have the same ref. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) { - define("DOLENTITY", $entity); -} +// if (is_numeric($entity)) { // $entity is casted to int +define("DOLENTITY", $entity); +// } // Load Dolibarr environment require '../../main.inc.php'; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 97061659a70..0df9b10a12b 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -42,12 +42,17 @@ if (!defined('NOBROWSERNOTIF')) { // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // Because 2 entities can have the same ref. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) { - define("DOLENTITY", $entity); -} +// if (is_numeric($entity)) { // $entity is casted to int +define("DOLENTITY", $entity); +// } // Load Dolibarr environment require '../../main.inc.php'; +/** + * @var Conf $conf + * @var DoliDB $db + * @var Translate $langs + */ // Security check if (!isModEnabled('member')) { @@ -163,10 +168,6 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($conf->liste_limit + 1, $offset); -//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, zip, town, d.email, t.libelle as type, d.morphy, d.statut, t.subscription"; -//$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; -//$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; -//$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); $result = $db->query($sql); diff --git a/htdocs/public/notice.php b/htdocs/public/notice.php index ab37aa7d420..ac1af27f150 100644 --- a/htdocs/public/notice.php +++ b/htdocs/public/notice.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,7 +42,10 @@ if (!defined('NOBROWSERNOTIF')) { // Load Dolibarr environment require '../main.inc.php'; - +/** + * @var DoliDB $db + * @var Translate $langs + */ /** * View diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 802d8996853..17506fc264a 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -194,7 +194,7 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') { // Test on pemriss $db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).", note_private = '".$db->escape($object->note_private)."', date_signature='".$db->idate(dol_now())."'"; + $sql .= " SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).", note_private = '".$db->escape($object->note_private)."', date_signature = '".$db->idate(dol_now())."'"; $sql .= " WHERE rowid = ".((int) $object->id); dol_syslog(__FILE__, LOG_DEBUG); diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index ad5339deb41..bd8e73efa7f 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -65,7 +65,7 @@ $result = $object->fetch(0, $numsondage); $nblines = $object->fetch_lines(); //If the survey has not yet finished, then it can be modified -$canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); +$canbemodified = ((empty($object->date_fin) || dol_get_last_hour($object->date_fin) > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); // Security check if (!isModEnabled('opensurvey')) { @@ -191,7 +191,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo // Check if vote already exists $sql = 'SELECT id_users, nom as name'; $sql .= ' FROM '.MAIN_DB_PREFIX.'opensurvey_user_studs'; - $sql .= " WHERE id_sondage='".$db->escape($numsondage)."' AND nom = '".$db->escape($nom)."' ORDER BY id_users"; + $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."' AND nom = '".$db->escape($nom)."' ORDER BY id_users"; $resql = $db->query($sql); if (!$resql) { dol_print_error($db); @@ -720,7 +720,7 @@ if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) { } // Show button to add a new line into database - print ''."\n"; + print ''."\n"; print ''."\n"; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index c3be87f9edb..3ad6cbb59fa 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -231,6 +231,12 @@ $ref = $REF = GETPOST('ref', 'alpha'); $TAG = GETPOST("tag", 'alpha'); $FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more information $SECUREKEY = GETPOST("securekey"); // Secure key +$PAYPAL_API_OK = ""; +$PAYPAL_API_KO = ""; +$PAYPAL_API_SANDBOX = ""; +$PAYPAL_API_USER = ""; +$PAYPAL_API_PASSWORD = ""; +$PAYPAL_API_SIGNATURE = ""; if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG)) { $FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod; @@ -286,6 +292,7 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last & '; if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) { + global $PAYPAL_API_SANDBOX, $PAYPAL_API_OK, $PAYPAL_API_KO, $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; @@ -1705,11 +1712,11 @@ if ($source == 'member' || $source == 'membersubscription') { if (empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) { $amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT'); } - // - If not set, we accept to have amount defined as parameter (for backward compatibility). - //if (empty($amount)) { - // $amount = (GETPOST('amount') ? price2num(GETPOST('amount', 'alpha'), 'MT', 2) : ''); - //} - // - If a min is set, we take it into account + // - If a new amount was posted from the form + if ($caneditamount && GETPOSTISSET('newamount') && GETPOSTFLOAT('newamount', 'MT') > 0) { + $amount = GETPOSTFLOAT('newamount', 'MT'); + } + // - If a min is set or an amount from the posted form, we take them into account $amount = max(0, (float) $amount, (float) getDolGlobalInt("MEMBER_MIN_AMOUNT")); // Amount @@ -2140,19 +2147,19 @@ if ($action != 'dopayment') { } if ($source == 'order' && $object->billed) { - print '

'.$langs->trans("OrderBilled").''; + print '

'.$langs->trans("OrderBilled").'
'; } elseif ($source == 'invoice' && $object->paye) { - print '

'.$langs->trans("InvoicePaid").''; + print '

'.$langs->trans("InvoicePaid").'
'; } elseif ($source == 'donation' && $object->paid) { - print '

'.$langs->trans("DonationPaid").''; + print '

'.$langs->trans("DonationPaid").'
'; } else { // Membership can be paid and we still allow to make renewal if (($source == 'member' || $source == 'membersubscription') && $object->datefin > dol_now()) { $langs->load("members"); - print '
'; + print '
'; $s = $langs->trans("MembershipPaid", '{s1}'); print str_replace('{s1}', ''.dol_print_date($object->datefin, 'day').'', $s); - print '
'; + print '
'; print '
'.$langs->trans("PaymentWillBeRecordedForNextPeriod").'
'; print '
'; } @@ -2166,7 +2173,7 @@ if ($action != 'dopayment') { $reshook = $hookmanager->executeHooks('doAddButton', $parameters, $object, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif ($reshook > 0) { + } elseif ($reshook >= 0) { print $hookmanager->resPrint; } @@ -2182,7 +2189,7 @@ if ($action != 'dopayment') { }); $("#dopayment_paybox").click(function(e){ $("#div_dopayment_paybox").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); }); }); @@ -2212,7 +2219,7 @@ if ($action != 'dopayment') { }); $("#dopayment_stripe").click(function(e){ $("#div_dopayment_stripe").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); return true; }); }); @@ -2254,7 +2261,7 @@ if ($action != 'dopayment') { }); $("#dopayment_paypal").click(function(e){ $("#div_dopayment_paypal").css( \'cursor\', \'wait\' ); - e.stopPropagation(); + e.stopPropagation(); return true; }); }); @@ -2296,32 +2303,32 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme if (GETPOST('dopayment_stripe', 'alpha')) { // Personalized checkout print ''; + .StripeElement--webkit-autofill { + background-color: #fefde5 !important; + } + '; //print '
'; @@ -2380,8 +2387,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme // $conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 = use payment object (suggest both card payment mode but also sepa, ...) print ' -
".$langs->trans("Name")." / ".$langs->trans("Company")."".$langs->trans("Anonymous")."".dol_print_date($db->jdate($objp->datedon))."'.number_format($objp->amount, 2, '.', ' ').' '.$langs->trans("Currency".$conf->currency).''.price($objp->amount).' '.$langs->trans("Currency".$conf->currency).'
-
'; + + '; $sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle as label FROM ".MAIN_DB_PREFIX."actioncomm as a - INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action=ca.id) - WHERE a.status<2"; + INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action = ca.id) + WHERE a.status < 2"; $sqlforconf = $sql." AND ca.module='conference@eventorganization'"; //$sqlforbooth = $sql." AND ca.module='booth@eventorganization'"; diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index bdcf71420c2..87127f7f906 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -139,7 +139,7 @@ if ($action == "dosubmit") { // Test on permission not required here (anonymous if (!$error) { $sql = "SELECT rrc.rowid FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rrc"; $sql .= " WHERE rrc.email = '". $db->escape($email)."'"; - $sql .= " AND rrc.entity = ". getEntity($object->element, 0); + $sql .= " AND rrc.entity IN (". getEntity($object->element, 0).")"; $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 9e547eacb6c..0a2c982258d 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -321,7 +321,7 @@ if ($event->type == 'payout.created') { } elseif ($event->type == 'customer.deleted') { // When a customer account is delete on Stripe side $db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE key_account = '".$db->escape($event->data->object->id)."' and site='stripe'"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE key_account = '".$db->escape($event->data->object->id)."' AND site = 'stripe'"; $db->query($sql); $db->commit(); } elseif ($event->type == 'payment_intent.succeeded') { diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index f2050ac969b..2a34c55d129 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -1,5 +1,18 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ //define("NOLOGIN",1); // This means this output page does not require to be logged. //if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); @@ -20,12 +33,18 @@ if (!defined("NOLOGIN")) { // Load Dolibarr environment require '../../main.inc.php'; - +/** + * @var DoliDB $db + * @var HookManager $hookmanager + * @var Translate $langs + * + * @var string $dolibarr_main_prod + */ // Security if ($dolibarr_main_prod) { accessforbidden('Access forbidden when $dolibarr_main_prod is set to 1'); } - +$optioncss = GETPOST('optioncss', 'alpha'); /* diff --git a/htdocs/public/ticket/ajax/ajax.php b/htdocs/public/ticket/ajax/ajax.php index e28b849eb2d..a2f57cade82 100644 --- a/htdocs/public/ticket/ajax/ajax.php +++ b/htdocs/public/ticket/ajax/ajax.php @@ -57,7 +57,7 @@ include_once '../../../main.inc.php'; // Load $user and permissions * @var DoliDB $db */ - $action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $id = GETPOSTINT('id'); $email = GETPOST('email', 'custom', 0, FILTER_VALIDATE_EMAIL); diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 2bd597ca118..c835bdd1cf2 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -98,7 +98,6 @@ if (!isModEnabled('ticket')) { } - /* * Actions */ @@ -397,26 +396,26 @@ if ($action == "view_ticketlist") { } $sql .= " WHERE t.entity IN (".getEntity('ticket').")"; $sql .= " AND ((tc.source = 'external'"; - $sql .= " AND tc.element='".$db->escape($object->element)."'"; - $sql .= " AND tc.active=1"; - $sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact - $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company - $sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester + $sql .= " AND tc.element = '".$db->escape($object->element)."'"; + $sql .= " AND tc.active = 1"; + $sql .= " AND sp.email = '".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact + $sql .= " OR s.email = '".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company + $sql .= " OR t.origin_email = '".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester // Manage filter if (!empty($filter)) { foreach ($filter as $key => $value) { if (strpos($key, 'date')) { // To allow $filter['YEAR(s.dated)']=>$year - $sql .= " AND ".$key." = '".$db->escape($value)."'"; + $sql .= " AND ".$db->sanitize($key)." = '".$db->escape($value)."'"; } elseif (($key == 't.fk_user_assign') || ($key == 't.type_code') || ($key == 't.category_code') || ($key == 't.severity_code')) { - $sql .= " AND ".$key." = '".$db->escape($value)."'"; + $sql .= " AND ".$db->sanitize($key)." = '".$db->escape($value)."'"; } elseif ($key == 't.fk_statut') { if (is_array($value) && count($value) > 0) { - $sql .= " AND ".$key." IN (".$db->sanitize(implode(',', $value)).")"; + $sql .= " AND ".$db->sanitize($key)." IN (".$db->sanitize(implode(',', $value)).")"; } else { - $sql .= " AND ".$key." = ".((int) $value); + $sql .= " AND ".$db->sanitize($key)." = ".((int) $value); } } else { - $sql .= " AND ".$key." LIKE '%".$db->escape($value)."%'"; + $sql .= " AND ".$db->sanitize($key)." LIKE '%".$db->escape($value)."%'"; } } } @@ -716,7 +715,10 @@ if ($action == "view_ticketlist") { // Statut if (!empty($arrayfields['t.fk_statut']['checked'])) { print ''; } diff --git a/htdocs/public/users/view.php b/htdocs/public/users/view.php index f0b759fa668..e87dcdbd08e 100644 --- a/htdocs/public/users/view.php +++ b/htdocs/public/users/view.php @@ -99,7 +99,6 @@ if ($cancel) { * View */ -$form = new Form($db); $v = new vCard(); $company = $mysoc; @@ -157,9 +156,20 @@ if (getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) { } if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) { $object->socialnetworks = []; +} else { + // Show list of social networks for company + $listofnetworks = $object->socialnetworks; + + if (!empty($listofnetworks)) { + foreach ($listofnetworks as $key => $networkVal) { + if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_'.strtoupper($key), 0, $object)) { + unset($object->socialnetworks[$key]); + } + } + } } -// By default, personal address not visible +// By default, personal birthdate and address is not visible if (!getDolUserInt('USER_PUBLIC_SHOW_BIRTH', 0, $object)) { $object->birth = null; } @@ -174,10 +184,32 @@ if (!getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) { if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { $company = null; } +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_EMAIL', 0, $object)) { + $mysoc->email = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) { + $mysoc->phone = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) { + $mysoc->fax = ''; +} +if (getDolUserInt('SOCIETE_PUBLIC_HIDE_URL', 0, $object)) { + $mysoc->url = ''; +} if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) && is_object($company)) { $company->socialnetworks = []; -} +} else { + // Show list of social networks for company + $listofnetworks = $mysoc->socialnetworks; + if (!empty($listofnetworks)) { + foreach ($listofnetworks as $key => $networkVal) { + if (getDolUserInt('SOCIETE_PUBLIC_HIDE_SOCIALNETWORKS_'.strtoupper($key), 0, $object)) { + unset($mysoc->socialnetworks[$key]); + } + } + } +} // Output vcard if ($mode == 'vcard') { @@ -220,7 +252,7 @@ $arrayofjs = array(); $arrayofcss = array(); $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
' : '').'
'; -llxHeader($head, $object->getFullName($langs).' - '.$langs->trans("PublicVirtualCard"), '', '', 0, 0, '', '', '', 'onlinepaymentbody'.(GETPOST('mode')=='preview' ? ' scalepreview cursorpointer virtualcardpreview' : ''), $replacemainarea, 1, 1); +llxHeader($head, $object->getFullName($langs).' - '.$langs->trans("PublicVirtualCard"), '', '', 0, 0, $arrayofjs, $arrayofcss, '', 'onlinepaymentbody'.(GETPOST('mode') == 'preview' ? ' scalepreview cursorpointer virtualcardpreview' : ''), $replacemainarea, 1, 1); print '
'; if (getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')) { print '
'; @@ -2395,8 +2402,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 1) { print '
- -
'; + + '; } if (getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION') == 2) { print '
@@ -2405,8 +2412,8 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme } print ' - -
'; + + '; print '
'; print ''; diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index f99deda6845..a8ae18fb64d 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -71,7 +71,8 @@ if (isModEnabled('paypal')) { */ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe")); - +$PAYPALTOKEN = ""; +$PAYPALPAYERID = ""; if (isModEnabled('paypal')) { $PAYPALTOKEN = GETPOST('TOKEN'); if (empty($PAYPALTOKEN)) { diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 8fa92e88b89..972c78675ba 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -77,23 +77,17 @@ $hookmanager->initHooks(array('newpayment')); $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe")); // Clean parameters +$PAYPAL_API_USER = ""; +$PAYPAL_API_PASSWORD = ""; +$PAYPAL_API_SIGNATURE = ""; +$PAYPAL_API_SANDBOX = ""; +$PAYPALTOKEN = ""; +$PAYPALPAYERID = ""; if (isModEnabled('paypal')) { - $PAYPAL_API_USER = ""; - if (getDolGlobalString('PAYPAL_API_USER')) { - $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); - } - $PAYPAL_API_PASSWORD = ""; - if (getDolGlobalString('PAYPAL_API_PASSWORD')) { - $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); - } - $PAYPAL_API_SIGNATURE = ""; - if (getDolGlobalString('PAYPAL_API_SIGNATURE')) { - $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); - } - $PAYPAL_API_SANDBOX = ""; - if (getDolGlobalString('PAYPAL_API_SANDBOX')) { - $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); - } + $PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER'); + $PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD'); + $PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE'); + $PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX'); /*$PAYPAL_API_OK = ""; if ($urlok) { $PAYPAL_API_OK = $urlok; @@ -173,17 +167,23 @@ $object = new stdClass(); // For triggers $error = 0; +// Check if we have redirtodomain to do. +$ws_virtuelhost = null; +if ($ws) { + $doactionsthenredirect = 1; + include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; + $website = new Website($db); + $result = $website->fetch(0, $ws); + if ($result > 0) { + $ws_virtuelhost = $website->virtualhost; + } +} + /* * Actions and view */ -// Check if we have redirtodomain to do. -if ($ws) { - $doactionsthenredirect = 1; -} - - $now = dol_now(); dol_syslog("Callback url when a payment was done. query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : dol_escape_htmltag($_SERVER["QUERY_STRING"]))." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : dol_escape_htmltag($_SERVER["SCRIPT_URI"])), LOG_DEBUG, 0, '_payment'); @@ -278,11 +278,11 @@ if (empty($doactionsthenredirect)) { // Another step to validate the payment (for payment modes like Paypal that need another step after the callback return for this). if (isModEnabled('paypal') && $paymentmethod === 'paypal') { // We call this page only if payment is ok on payment system - if ($PAYPALTOKEN) { + if (!empty($PAYPALTOKEN)) { // Get on url call $onlinetoken = $PAYPALTOKEN; $fulltag = $FULLTAG; - $payerID = $PAYPALPAYERID; + $payerID = !empty($PAYPALPAYERID) ? $PAYPALPAYERID : ''; // Set by newpayment.php $currencyCodeType = $_SESSION['currencyCodeType']; $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; @@ -740,7 +740,7 @@ if ($ispaymentok) { } } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_account (fk_soc, login, key_account, site, site_account, status, entity, date_creation, fk_user_creat)"; - $sql .= " VALUES (".$thirdparty_id.", '', '".$db->escape($stripecu)."', 'stripe', '".$db->escape($stripearrayofkeysbyenv[$servicestatus]['publishable_key'])."', ".((int) $servicestatus).", ".((int) $conf->entity).", '".$db->idate(dol_now())."', 0)"; + $sql .= " VALUES (".((int) $thirdparty_id).", '', '".$db->escape($stripecu)."', 'stripe', '".$db->escape($stripearrayofkeysbyenv[$servicestatus]['publishable_key'])."', ".((int) $servicestatus).", ".((int) $conf->entity).", '".$db->idate(dol_now())."', 0)"; $resql = $db->query($sql); if (!$resql) { // should not happen $error++; @@ -2124,12 +2124,20 @@ if (!empty($doactionsthenredirect)) { if ($ispaymentok) { // Redirect to a success page // Paymentok page must be created for the specific website - $ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG; + if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) { + $ext_urlok = $ws_virtuelhost . '/paymentok.php?fulltag='.$FULLTAG; + } else { + $ext_urlok = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG; + } print ""; } else { // Redirect to an error page // Paymentko page must be created for the specific website - $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; + if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) { + $ext_urlko = $ws_virtuelhost . '/paymentko.php?fulltag='.$FULLTAG; + } else { + $ext_urlko = DOL_URL_ROOT.'/public/website/index.php?website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG; + } print ""; } } diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index b2d2e9ba830..a794d2f5735 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -186,26 +186,26 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he $db->begin(); - if (!GETPOST("lastname")) { + if (!GETPOST('lastname', 'alpha')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
\n"; } - if (!GETPOST("firstname")) { + if (!GETPOST('firstname', 'alpha')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
\n"; } - if (!GETPOST("email")) { + if (!GETPOST('email', 'alpha')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; } - if (!GETPOST("description")) { + if (!GETPOST('description', 'alpha')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Message"))."
\n"; } - if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + if (GETPOST('email', 'alpha') && !isValidEmail(GETPOST('email', 'alpha'))) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST('email', 'alpha'))."
\n"; } // Set default opportunity status $defaultoppstatus = getDolGlobalInt('PROJECT_DEFAULT_OPPORTUNITY_STATUS_FOR_ONLINE_LEAD'); @@ -222,21 +222,21 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he if (!$error) { // Search thirdparty and set it if found to the new created project - $result = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', GETPOST('email')); + $result = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', GETPOST('email', 'alpha')); if ($result > 0) { $proj->socid = $thirdparty->id; } else { // Create the prospect - if (GETPOST('societe')) { - $thirdparty->name = GETPOST('societe'); - $thirdparty->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname')); + if (GETPOST('societe', 'alpha')) { + $thirdparty->name = GETPOST('societe', 'alpha'); + $thirdparty->name_alias = dolGetFirstLastname(GETPOST('firstname', 'alpha'), GETPOST('lastname', 'alpha')); } else { - $thirdparty->name = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname')); + $thirdparty->name = dolGetFirstLastname(GETPOST('firstname', 'alpha'), GETPOST('lastname', 'alpha')); } - $thirdparty->email = GETPOST('email'); - $thirdparty->address = GETPOST('address'); - $thirdparty->zip = GETPOST('zip'); - $thirdparty->town = GETPOST('town'); + $thirdparty->email = GETPOST('email', 'alpha'); + $thirdparty->address = GETPOST('address', 'alpha'); + $thirdparty->zip = GETPOST('zip', 'int'); + $thirdparty->town = GETPOST('town', 'alpha'); $thirdparty->country_id = GETPOSTINT('country_id'); $thirdparty->state_id = GETPOSTINT('state_id'); $thirdparty->client = $thirdparty::PROSPECT; diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 47d5893ae8a..5b9404e2515 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -122,8 +122,8 @@ $listOfConferences .= '
'.$langs->trans('Note').'
'; - $object->fk_statut = $obj->fk_statut; + $object->status = $obj->fk_statut; + if (getDolGlobalString('TICKET_SHOW_PROGRESSION')) { + $object->progress = $obj->progress; + } print $object->getLibStatut(2); print '