diff --git a/.github/changed-lines-count-labeler.yml b/.github/changed-lines-count-labeler.yml deleted file mode 100644 index 39e663821fb..00000000000 --- a/.github/changed-lines-count-labeler.yml +++ /dev/null @@ -1,3 +0,0 @@ -# Add this tag for any changes for more than 1 line -"Pending analysis of PR (maintenance team)": - min: 1 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ace4600a1f..5ac896b6a25 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,19 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + allow: + # Allow production updates only (can do a AND, several entries are doing a OR) + - dependency-type: "production" + #- dependency-type: "direct" + exclude-paths: + - 'dev' + - 'tests/acceptance' + - 'tests/selenium' diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 997eaf4f667..abb6782f778 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -20,10 +20,10 @@ See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workf The other worklows are: ----------------------- -- stale-issues-safe to autoclose old issues. -- phpstan_baseline to update the phpstan baseline file. -- cache-clean-pr to clean cache when closing a PR. - +- ci-stale-issues-safe to autoclose old issues. +- ci-phpstan_baseline to update the phpstan baseline file. +- ci-cache-clean-pr to clean cache when closing a PR. +- ci-test to make CI tests Some tests workflows are: ------------------------ diff --git a/.github/workflows/cache-clean-pr.yml b/.github/workflows/ci-cache-clean-pr.yml similarity index 99% rename from .github/workflows/cache-clean-pr.yml rename to .github/workflows/ci-cache-clean-pr.yml index 477a1da2c94..9713af46134 100644 --- a/.github/workflows/cache-clean-pr.yml +++ b/.github/workflows/ci-cache-clean-pr.yml @@ -6,6 +6,8 @@ on: pull_request: types: [closed] workflow_dispatch: + + jobs: cleanup: runs-on: ubuntu-latest diff --git a/.github/workflows/ci-on-pull_request.yml b/.github/workflows/ci-on-pull_request.yml index 4e118d8bff9..efddcb2b09d 100644 --- a/.github/workflows/ci-on-pull_request.yml +++ b/.github/workflows/ci-on-pull_request.yml @@ -1,6 +1,7 @@ name: "CI-PULL-REQUEST" on: [pull_request] + jobs: pre-commit: uses: ./.github/workflows/pre-commit.yml @@ -25,15 +26,15 @@ jobs: # uses: ./.github/workflows/windows-ci.yml # with: # gh_event: ${{ github.event_name }} - gh-travis: # Runs travis script on github runner (not on travis) - if: false - # needs: [pre-commit, phan] - # needs: [windows-ci] - secrets: inherit - needs: [pre-commit, phan, phpstan] - uses: ./.github/workflows/gh-travis.yml - with: - gh_event: ${{ github.event_name }} + #gh-travis: # Runs travis script on github runner (not on travis) + # if: false + # # needs: [pre-commit, phan] + # # needs: [windows-ci] + # secrets: inherit + # needs: [pre-commit, phan, phpstan] + # uses: ./.github/workflows/gh-travis.yml + # with: + # gh_event: ${{ github.event_name }} # Note (not tested, from https://github.com/orgs/community/discussions/38361) # To cancel jobs if one fails, the following action may help diff --git a/.github/workflows/ci-on-push.yml b/.github/workflows/ci-on-push.yml index a3997f9147e..55289313241 100644 --- a/.github/workflows/ci-on-push.yml +++ b/.github/workflows/ci-on-push.yml @@ -1,6 +1,7 @@ name: "CI-PUSH" on: [push] + jobs: pre-commit: uses: ./.github/workflows/pre-commit.yml @@ -25,15 +26,15 @@ jobs: uses: ./.github/workflows/windows-ci.yml with: gh_event: ${{ github.event_name }} - gh-travis: # Runs travis script on github runner (not on travis) - if: false - # needs: [pre-commit, phan] - # needs: [windows-ci] - secrets: inherit - needs: [pre-commit, phan, phpstan] - uses: ./.github/workflows/gh-travis.yml - with: - gh_event: ${{ github.event_name }} + # gh-travis: # Runs travis script on github runner (not on travis) + # if: false + # # needs: [pre-commit, phan] + # # needs: [windows-ci] + # secrets: inherit + # needs: [pre-commit, phan, phpstan] + # uses: ./.github/workflows/gh-travis.yml + # with: + # gh_event: ${{ github.event_name }} # Note (not tested, from https://github.com/orgs/community/discussions/38361) # To cancel jobs if one fails, the following action may help diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/ci-phpstan_baseline.yml similarity index 98% rename from .github/workflows/phpstan_baseline.yml rename to .github/workflows/ci-phpstan_baseline.yml index 49a074555bb..a68414b62df 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/ci-phpstan_baseline.yml @@ -39,7 +39,7 @@ jobs: with: php-version: ${{ env.PHP_VERSION }} coverage: none # disable xdebug, pcov - tools: phpstan:2.1.8, cs2pr + tools: phpstan:2.1.12, cs2pr extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, mysql, pgsql, sqlite3, ldap, xml, mcrypt env: diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/ci-stale-issues-safe.yml similarity index 100% rename from .github/workflows/stale-issues-safe.yml rename to .github/workflows/ci-stale-issues-safe.yml diff --git a/.github/workflows/ci-tag-check.yml.disabled b/.github/workflows/ci-tag-check.yml.disabled new file mode 100644 index 00000000000..b874c6b69e3 --- /dev/null +++ b/.github/workflows/ci-tag-check.yml.disabled @@ -0,0 +1,24 @@ +# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +name: "Check tag branch" + +on: + push: + tags: + - "18.*" + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Verify tag is on main + run: | + TAG_COMMIT=$(git rev-list -n 1 $GITHUB_REF) + if ! git branch --contains $TAG_COMMIT | grep -q "18.0"; then + echo "The tag must be on branch 18.0" + exit 1 + fi diff --git a/.github/workflows/gh-travis.yml b/.github/workflows/gh-travis.yml.disabled similarity index 96% rename from .github/workflows/gh-travis.yml rename to .github/workflows/gh-travis.yml.disabled index b36841b7104..87f1432cedf 100644 --- a/.github/workflows/gh-travis.yml +++ b/.github/workflows/gh-travis.yml.disabled @@ -27,11 +27,11 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false - # matrix: - # php-version: + matrix: + php-version: # # PHPStan requires PHP >= 7.2. # #- "7.2" - # - "8.2" + - "8.2" # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Checkout travis file diff --git a/.github/workflows/phan.yml b/.github/workflows/phan.yml index 46ddfd46784..32aa7ea6df4 100644 --- a/.github/workflows/phan.yml +++ b/.github/workflows/phan.yml @@ -1,4 +1,7 @@ --- +# This is a basic workflow to check code with PHPSTAN tool +name: Phan + on: # workflow called by the parent workflow ci.yml workflow_call: @@ -12,6 +15,7 @@ on: concurrency: group: phan-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + env: gh_event: ${{ inputs.gh_event || github.event_name }} PHAN_CONFIG: dev/tools/phan/config.php @@ -20,7 +24,6 @@ env: PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }} GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action -name: phan jobs: phan: name: Run phan diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index e14dc22a288..f3ae726b435 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -1,6 +1,7 @@ --- # This is a basic workflow to check code with PHPSTAN tool name: PHPStan + # Controls when the workflow will run on: # workflow called by the parent workflow ci.yml @@ -13,8 +14,9 @@ on: workflow_dispatch: concurrency: - group: stan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: phpstan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true + env: 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 }} @@ -43,7 +45,7 @@ jobs: with: php-version: ${{ matrix.php-version }} coverage: none # disable xdebug, pcov - tools: phpstan:2.1.8, cs2pr + tools: phpstan:2.1.12, cs2pr extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, mysql, pgsql, sqlite3, ldap, xml, mcrypt diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9e396472b35..b5759d56810 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,5 +1,6 @@ --- name: pre-commit + on: # workflow called by the parent workflow ci.yml workflow_call: @@ -16,6 +17,7 @@ concurrency: cancel-in-progress: true env: gh_event: ${{ inputs.gh_event || github.event_name }} + jobs: pre-commit: runs-on: ubuntu-latest @@ -66,7 +68,7 @@ jobs: run: |- [ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt # Install python and pre-commit tool - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: cache: pip python-version: "3.11" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 1fa60e47a5e..00000000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Test github actions -on: - workflow_dispatch: - pull_request: - types: [opened, reopened, synchronize] - push: - -env: - ENVGHT: ${{ secrets.GITHUB_TOKEN }} - ENVGHU: ${{ github.token }} - TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }} - TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }} - TEST_VAR_ORGA: ${{ vars.TEST_VAR_ORGA }} - ENVLOCAL: "varenvlocal" - -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 "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}" - echo "variable repository : ${{vars.TEST_VAR_REPO}}" - echo "variable organization : ${{vars.TEST_VAR_ORGA}}" - echo "ENVLOCAL: ${{env.ENVLOCAL}}" diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 4f81ee5cc4c..0cc0f1559c5 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -1,5 +1,6 @@ --- name: Win CI + # yamllint disable-line rule:truthy on: # workflow called by the parent workflow ci.yml @@ -25,6 +26,7 @@ env: PHP_INI_SCAN_DIR: C:\myphpini CKEY: win-ci-2 GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action + jobs: win-test: strategy: diff --git a/.tx/config b/.tx/config index 657ae6fea46..210044edf24 100644 --- a/.tx/config +++ b/.tx/config @@ -44,12 +44,6 @@ source_file = htdocs/langs/en_US/blockedlog.lang source_lang = en_US type = MOZILLAPROPERTIES -[o:dolibarr-association:p:dolibarr:r:bookmarks] -file_filter = htdocs/langs//bookmarks.lang -source_file = htdocs/langs/en_US/bookmarks.lang -source_lang = en_US -type = MOZILLAPROPERTIES - [o:dolibarr-association:p:dolibarr:r:boxes] file_filter = htdocs/langs//boxes.lang source_file = htdocs/langs/en_US/boxes.lang @@ -104,12 +98,6 @@ source_file = htdocs/langs/en_US/datapolicy.lang source_lang = en_US type = MOZILLAPROPERTIES -[o:dolibarr-association:p:dolibarr:r:deliveries] -file_filter = htdocs/langs//deliveries.lang -source_file = htdocs/langs/en_US/deliveries.lang -source_lang = en_US -type = MOZILLAPROPERTIES - [o:dolibarr-association:p:dolibarr:r:dict] file_filter = htdocs/langs//dict.lang source_file = htdocs/langs/en_US/dict.lang @@ -146,12 +134,6 @@ source_file = htdocs/langs/en_US/exports.lang source_lang = en_US type = MOZILLAPROPERTIES -[o:dolibarr-association:p:dolibarr:r:help] -file_filter = htdocs/langs//help.lang -source_file = htdocs/langs/en_US/help.lang -source_lang = en_US -type = MOZILLAPROPERTIES - [o:dolibarr-association:p:dolibarr:r:holiday] file_filter = htdocs/langs//holiday.lang source_file = htdocs/langs/en_US/holiday.lang @@ -284,12 +266,6 @@ source_file = htdocs/langs/en_US/partnership.lang source_lang = en_US type = MOZILLAPROPERTIES -[o:dolibarr-association:p:dolibarr:r:paybox] -file_filter = htdocs/langs//paybox.lang -source_file = htdocs/langs/en_US/paybox.lang -source_lang = en_US -type = MOZILLAPROPERTIES - [o:dolibarr-association:p:dolibarr:r:paypal] file_filter = htdocs/langs//paypal.lang source_file = htdocs/langs/en_US/paypal.lang @@ -380,6 +356,12 @@ source_file = htdocs/langs/en_US/stripe.lang source_lang = en_US type = MOZILLAPROPERTIES +[o:dolibarr-association:p:dolibarr:r:subtotals] +file_filter = htdocs/langs//subtotals.lang +source_file = htdocs/langs/en_US/subtotals.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [o:dolibarr-association:p:dolibarr:r:supplier_proposal] file_filter = htdocs/langs//supplier_proposal.lang source_file = htdocs/langs/en_US/supplier_proposal.lang diff --git a/COPYRIGHT b/COPYRIGHT index 491270897b7..7c406ca6c86 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -53,7 +53,7 @@ TCPDI 1.1.0 LGPL-3+ / Apache 2.0 Yes bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator JS libraries: -Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea. +Ace 1.43.12 BSD Yes JS library to get code syntaxique coloration in a textarea (Must take src dir into https://github.com/ajaxorg/ace-builds/). ChartJS 3.7.1 MIT License Yes JS library for graph CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG jQuery 3.6.4 MIT License Yes JS library diff --git a/ChangeLog b/ChangeLog index b7f55724828..71eaf9fa326 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,18 +7,70 @@ English Dolibarr ChangeLog For users: ---------- + + For developers: --------------- +* Introducing the TRIGGER_PREFIX property to force developers to use unique triggerkey per business object, limit also code to business CRUD events and identity when it is not. + + WARNING: -------- The following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* The deprecated column egroupware_id has been dropped +* The deprecated column egroupware_id has been dropped. * The property $sumpayed (duplicated of $totalpaid), $sumdeposit (duplicate of $totaldeposits) and $sumcreditnote (duplicate of $totalcreditnotes) has been removed (there are replaced with the property that was a duplication of (same for $sumpayed_multicurrency, $sumdeposit_multicurrency, $sumcreditnote_multicurrency). * Parameters $maxlen and $notooltip of Contract have been inverted to follow the standard. It was breaking the common use of getNomUrl() but if you were using the parameter maxlen (rare) by using the old signature, result may be a tooltip that is no more visible on ref printed by you module. * Removed array $MAP_ID_TO_CODE that was a duplicate of array "array_flip($categ->MAP_ID)" +* The signature of the Sale order ->cancel() method and shipment ->cancel() has been modified to introduce the $user param like for other methods that modify a status. +* Adding new document templates must be done by adding files into the mymodule/core/modules/xxx/doc directory. Adding files into custom directory with the + same path than the core path without using a mymodule directory is now forbidden. +* The directory theme/common/octicons has been removed +* The library timepicker.js has been removed. Was not used by Dolibarr. +* Because of new TRIGGER_PREFIX property triggers SUPPLIER_PRODUCT_BUYPRICE_XXX are renamed to PRODUCT_BUYPRICE_XXX. +* Function img_pdf() has been removed. Replace it with img_picto('', 'pdf.png') if you were using it. + + +***** ChangeLog for 22.0.2 compared to 22.0.1 ***** + +FIX: ContratLigne::fetch() returns 1 even if the line doesn't exist (#35324) +FIX: #34678 +FIX: #35142 FIX: #35143 +FIX: #35154 - Massaction createbills in reception list don't mind about order and/or thirdparty currency (#35156) +FIX: #35181 Cancelled purchase orders now shown as such in Project Overview (#35186) +FIX: #35407 After updating to version 22, local taxes were no longer applied (#35408) +FIX: #35425 (#35426) +FIX: accountancy general ledger: bad handling of hook return (#34029) +FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717) +FIX: allow to create First Situation Invoice (#35228) +FIX: api orders : forward database error on failure (backport commit d9e81cb) (#35478) +FIX: Can't edit tags of a user. +FIX: can't reset intracomm transport mode +FIX: can't save setup of odt template for stock +FIX: check commande liste validate (#35479) +FIX: color of late warning for nb of bank account reconciliation lines +FIX: Correct the calculation of the amount of the current period between the period provided (#35083) +FIX: Date planned of delivery is not propagated from order to shipment +FIX: Edit of email in emailing. Property messtype not set. +FIX: extra field list depend on parent list when editing a card (#35165) +FIX: fallback of "from" email when sending email in member module +FIX: missing token to disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084) +FIX: Generation of member cards (file not found and substitution broken) +FIX: invoice not set to closed when we add a credit note to close it +FIX: missing check constant PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS (#33277) +FIX: missing entity filter (#35461) +FIX: missing quick edit for extrafields (backport commit 4fc66c6) (#35160) +FIX: Missing sentence part (#35144) +FIX: Remove perms to access commerce tab when the only active permission is fournisseur:lire (#35467) +FIX: Restore decimal quantity for stock correction/transfer +FIX: save the packaging qty on update buying price (#35234) +FIX: set global mysoc and load langs in API access (#35041) +FIX: Societe - Problem of date on outstanding opened late (#35266) +FIX: vat detection when country of buyer is unknown. +FIX: wrong extrafield template in create mode (#35241) (#35470) + ***** ChangeLog for 22.0.1 compared to 22.0.0 ***** @@ -41,6 +93,8 @@ FIX: Missing a column on group permissions FIX: several minor troubles with modulebuilder FIX: Test on mandatory product or thirdparty barcode FIX: trigger mailmanspip when un/linking categories +FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible + SQL injection by users with permission to make and send mass emailing. ***** ChangeLog for 22.0.0 compared to 21.0 ***** @@ -202,6 +256,38 @@ The following changes may create regressions for some external modules, but were * The property ->price_ht of an object line that was a duplicate of ->subprice has been standardized. Use ->subprice everywhere now. +***** ChangeLog for 21.0.4 compared to 21.0.3 ***** +FIX: #35147 SQL Error on Beluga Export when ExpenseReport is enabled (#35149) +FIX: error when using a code too large in dictionary +FIX: Security when using Advanced Target page of emailing (feature hidden in v21, default in v22+). Possible + SQL injection by users with permission to make and send mass emailing. + + +***** ChangeLog for 21.0.3 compared to 21.0.2 ***** +FIX: #34843 (#34875) +FIX: #34936 +FIX: #35005 +FIX: #35006 SQL error when using external user +FIX: a Fatal error when a trigger files is not correctly named. +FIX: array for arrayofkeyval is lost in module builder edit of property +FIX: asset: could not select invoice in disposal pop-in (#34725) +FIX: avoid php warning with "$forceFullTextIndexation" (#34881) +FIX: bad consistency on test on permission to disable service +FIX: Can edit status of tasks +FIX: Create public ticket if email need exist. (#34965) +FIX: DA026536: missing
in automatic e-mail (#34895) +FIX: extrafields of type "int" not displayed on `projet/tasks.php` (#34896) +FIX: Filter on the balance of leave +FIX: Logo on company is no more visible. +FIX: mailing destination list title (#34929) +FIX: main checkbox left column was before global conf (#34858) +FIX: Missing a column on group permissions +FIX: several minor troubles with modulebuilder +FIX: Test on mandatory product or thirdparty barcode +FIX: trigger mailmanspip when un/linking categories +SEC: Remove functions accepting callable params - Reported by phdwg1410 - CVE-2024-40137 + + ***** ChangeLog for 21.0.2 compared to 21.0.1 ***** FIX: 21.0: $height and $width can be ints, but also 'auto' (#34636) @@ -1187,6 +1273,7 @@ FIX: when qty is not an integer, apply price() (#31138) FIX: Wrong default PDF model when creating the second situation invoice (#30843) FIX: wrong subprice if price base type is TTC (#30887) + ***** ChangeLog for 19.0.3 compared to 19.0.2 ***** FIX: #29403 HRM - Unable to delete a skill in a job Profile (#29779) FIX: #29439 incomplete API return (#29796) @@ -1750,7 +1837,39 @@ The following changes may create regressions for some external modules, but were * The load of hook context productdao has been removed before calling loadvirtualstock. Modules must use the context of main parent page or 'all' for all cases. * booking.class.php was removed, please have a look at calendar.class.php +***** ChangeLog for 18.0.8 compared to 18.0.7 ***** +35 files changed, 647 insertions(+), 298 deletions(-) + +FIX: #34746 - More complete fix for CVE-2024-40137 +FIX: Correct the calculation of the amount of the current period between the period provided (#35083) +FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call (#34717) +FIX: Add security test for show terminal selection if no terminal selected when invoice.php is call +FIX: missing quick edit for extrafields (baclport commit 4fc66c6) (#35160) +FIX: Missing sentence part (#35144) +FIX: set global mysoc and load langs in API access (#35041) +FIX: set global mysoc and load langs in API access +FIX: reset mysoc and langs only if entity of API has changed +FIX: accountancy general ledger: bad handling of hook return (#34029) +FIX: accountancy general ledger: bad handling of hook return +FIX: accountancy balance: bad handling of hook return +FIX: - Fix missing token for disable custom group category for compta report (page /htdocs/accountancy/admin/categories_list.php) (#35084) +FIX: The combo of custom groups has disappeared (backport v19) (#35016) +FIX: #34893 (#34897) +FIX: #34893 +FIX: change error code to USERNOTALLOWEDTOCHANGEPASS +FIX: asset: could not select invoice in disposal pop-in (#34725) +FIX: 17.0 SQL syntax error and/or constraint error when calling Facture::update() after a clone (e.g. in a trigger) (#34778) +FIX: 17.0: when you clone an invoice that was created from a template invoice, the clone should not be linked to the template invoice (#34777) +FIX: pre-send mail mass action: keep __EMAIL__ substitution (#34522) +FIX: pre-send mail mass action: keep __EMAIL__ substitution +FIX: comment +FIX: massaction email tpl: keep preset +FIX: loop interrupt if an error occurs in sendEmailsRemindersOnInvoiceDueDate (#34657) +FIX: #34654 + ***** ChangeLog for 18.0.7 compared to 18.0.6 ***** +138 files changed, 1622 insertions(+), 530 deletions(-) + FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237 FIX: 17.0 - collisions in cache for dol_getIdFromCode FIX: 17.0 - missing error handling for FactureRec::fetch in card-rec.php diff --git a/dev/build/doxygen/dolibarr-doxygen.doxyfile b/dev/build/doxygen/dolibarr-doxygen.doxyfile index fb9a116409c..80c3aeddf69 100644 --- a/dev/build/doxygen/dolibarr-doxygen.doxyfile +++ b/dev/build/doxygen/dolibarr-doxygen.doxyfile @@ -41,7 +41,7 @@ PROJECT_NUMBER = x.y.z # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = build +OUTPUT_DIRECTORY = dev/build # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output diff --git a/dev/build/exe/doliwamp/doliwamp.iss b/dev/build/exe/doliwamp/doliwamp.iss index 063c9047bd5..81983fd6dbd 100644 --- a/dev/build/exe/doliwamp/doliwamp.iss +++ b/dev/build/exe/doliwamp/doliwamp.iss @@ -38,8 +38,8 @@ DefaultGroupName=Dolibarr ;Compression=none Compression=lzma SolidCompression=yes -WizardImageFile=build\exe\doliwamp\doliwamp.bmp -WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp +WizardImageFile=dev\build\exe\doliwamp\doliwamp.bmp +WizardSmallImageFile=dev\build\exe\doliwamp\doliwampsmall.bmp SetupIconFile=doc\images\dolibarr_favicon.ico ;To say the installer must be ran as admin PrivilegesRequired=admin diff --git a/dev/build/generate_filelist_xml.php b/dev/build/generate_filelist_xml.php index c99dda6d558..9f57fbfdd18 100755 --- a/dev/build/generate_filelist_xml.php +++ b/dev/build/generate_filelist_xml.php @@ -49,9 +49,18 @@ $includecustom = 0; $includeconstants = array(); $buildzip = 0; +print '***** '.$script_file.' *****'."\n"; + if (empty($argv[1])) { print "Usage: ".$script_file." release=auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; + print "\n"; + print "Generate the file filelist-x.y.z[-mybuild].xml with signature of files. "; + print "This includes the 3 sections:\n"; + print "- dolibarr_htdocs_dir\n"; + print "- dolibarr_scripts_dir\n"; + print "- dolibarr_unalterable_files (only files inside the scope of the unalterable module)\n"; + print "\n"; exit(1); } @@ -68,20 +77,17 @@ while ($i < $argc) { if (!empty($result["includecustom"])) { $includecustom = $result["includecustom"]; } - if (!empty($result["includeconstant"])) { - $includeconstants[$i] = $result["includeconstant"]; - } - if (!empty($result["buildzip"])) { - $buildzip = 1; - } if (preg_match('/includeconstant=/', strval($argv[$i]))) { $tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str() if (count($tmp) != 3) { print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n"; - exit -1; + exit(1); } $includeconstants[$tmp[0]][$tmp[1]] = $tmp[2]; } + if (!empty($result["buildzip"])) { + $buildzip = 1; + } $i++; } @@ -97,7 +103,7 @@ $savrelease = $release; $tmpver = explode('-', $release, 2); if ($tmpver[0] == 'auto') { $release = DOL_VERSION; - if ($tmpver[1] && $tmpver[0] == 'auto') { + if (!empty($tmpver[1]) && $tmpver[0] == 'auto') { $release .= '-'.$tmpver[1]; } } @@ -126,10 +132,10 @@ if (empty($includecustom)) { } } -print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; -print "Release : ".$release."\n"; -print "Include custom in signature : ".$includecustom."\n"; -print "Include constants in signature : "; +print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; +print "Release : ".$release."\n"; +print "Include custom dir in signature : ".(empty($includecustom) ? 'no' : 'yes')."\n"; +print "Include constants in signature : ".(empty($includeconstants) ? 'none' : ''); foreach ($includeconstants as $countrycode => $tmp) { foreach ($tmp as $constname => $constvalue) { print $constname.'='.$constvalue." "; @@ -155,9 +161,12 @@ $gitcommit = 'seetag'; $branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release); // Keep only x.y into x.y.z $fileforgit = dirname(dirname(dirname(__FILE__))).'/.git/refs/heads/'.$branchname; print "Try to get last commit ID from file ".$fileforgit."\n"; -$fileforgitcontent = file_get_contents($fileforgit); +$fileforgitcontent = ''; +if (file_exists($fileforgit)) { + $fileforgitcontent = file_get_contents($fileforgit); +} if (empty($fileforgitcontent)) { - print "Failed to get the last commit ID. Are you on the branch for the release (branch name '.$branchname.') ?\n"; + print "Failed to get the last commit ID (are you on the branch for the release branch name ".$branchname." ?). We will use an empty value for gitcommit.\n"; } $gitcommit = trim($fileforgitcontent); @@ -180,7 +189,7 @@ fputs($fp, ''."\n"); // Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php) $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; -$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs +$regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|escpos-php\/doc|escpos-php\/example|escpos-php\/test|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $dir = ''; @@ -350,7 +359,7 @@ if ($newdir != $dir) { } fputs($fp, ' '."\n"); $dir = $newdir; - $needtoclose = 1; + //$needtoclose = 1; // close will be done in next filethat is in same dir } if (filetype($file) == "file") { $md5 = md5_file($file); @@ -361,7 +370,7 @@ if ($needtoclose) { fputs($fp, ' '."\n"); $needtoclose = 0; } -// Add the interfaces.class.php file +// Add the commontrigger.class.php file $file = dirname(__FILE__).'/../../htdocs/core/class/commontrigger.class.php'; $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); $newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file)); @@ -374,6 +383,8 @@ if ($newdir != $dir) { $dir = $newdir; $needtoclose = 1; } + +$needtoclose = 1; // This is the last file if (filetype($file) == "file") { $md5 = md5_file($file); $checksumconcat[] = $md5; @@ -399,22 +410,26 @@ fputs($fp, ''."\n\n"); fputs($fp, ''."\n"); fclose($fp); +print "\n"; + if (empty($buildzip)) { - print "File ".$outputfile." generated\n"; + print "File ".$outputfile." generated.\n"; } else { if ($buildzip == '1' || $buildzip == 'zip') { $result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip'); if ($result > 0) { dol_delete_file($outputfile); - print "File ".$outputfile.".zip generated\n"; + print "File ".$outputfile.".zip generated.\n"; } } elseif ($buildzip == '2' || $buildzip == 'gz') { $result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz'); if ($result > 0) { dol_delete_file($outputfile); - print "File ".$outputfile.".gz generated\n"; + print "File ".$outputfile.".gz generated.\n"; } } } +print "\n"; + exit(0); diff --git a/dev/build/makepack-dolibarr.pl b/dev/build/makepack-dolibarr.pl index 970039375cf..13bbc3237ad 100755 --- a/dev/build/makepack-dolibarr.pl +++ b/dev/build/makepack-dolibarr.pl @@ -446,6 +446,15 @@ if ($nboftargetok) { print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/dev/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; $ret=`php $SOURCE/dev/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; + my $retcode=$?; + if ($retcode!=0) + { + print "Error running generate_filelist_xml.php please check\n"; + print $ret; + print "Canceled.\n"; + exit; + } + print $ret."\n"; # Copy to final dir $NEWDESTI=$DESTI; @@ -477,14 +486,14 @@ if ($nboftargetok) { { print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n"; $ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`; - print 'Run git push $GITREMOTENAME -f "$MAJOR.$MINOR.$BUILD"'."\n"; + print 'Run git push '.$GITREMOTENAME.' -f "$MAJOR.$MINOR.$BUILD"'."\n"; $ret=`git push $GITREMOTENAME -f -"$MAJOR.$MINOR.$BUILD"`; #$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`; } } else { - print 'Run git push $GITREMOTENAME --tags'."\n"; + print "Run git push $GITREMOTENAME --tags\n"; $ret=`git push $GITREMOTENAME --tags`; #$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`; } diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 98d1fd36fa9..18c0d0eeb6d 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -1,41 +1,5 @@ parameters: ignoreErrors: - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 3 - path: ../../../htdocs/accountancy/admin/accountmodel.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 3 - path: ../../../htdocs/accountancy/admin/accountmodel.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 3 - path: ../../../htdocs/accountancy/admin/accountmodel.php - - - - message: '#^Loose comparison using \=\= between ''type_cdr'' and ''type_cdr'' will always evaluate to true\.$#' - identifier: equal.alwaysTrue - count: 2 - path: ../../../htdocs/accountancy/admin/accountmodel.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../../htdocs/accountancy/admin/card.php - - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../../htdocs/accountancy/admin/card.php - - message: '#^Variable \$cat_id in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -54,30 +18,12 @@ parameters: count: 1 path: ../../../htdocs/accountancy/admin/categories_list.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 4 - path: ../../../htdocs/accountancy/admin/fiscalyear_card.php - - message: '#^Loose comparison using \=\= between ''ACCOUNTING_LABEL…'' and ''ACCOUNTING_LABEL…'' will always evaluate to true\.$#' identifier: equal.alwaysTrue count: 1 path: ../../../htdocs/accountancy/admin/index.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/accountancy/admin/index.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 7 - path: ../../../htdocs/accountancy/admin/journals_list.php - - message: '#^Loose comparison using \!\= between 35 and 10 will always evaluate to true\.$#' identifier: notEqual.alwaysTrue @@ -156,60 +102,6 @@ parameters: count: 1 path: ../../../htdocs/accountancy/bookkeeping/export.php - - - message: '#^Property AccountancyCategory\:\:\$active \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$category_type \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$code \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$fk_country \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$formula \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$position \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$range_account \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - - - message: '#^Property AccountancyCategory\:\:\$sens \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancycategory.class.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -252,216 +144,18 @@ parameters: count: 4 path: ../../../htdocs/accountancy/class/accountancyexport.class.php - - - message: '#^Property AccountancyReport\:\:\$active \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancyreport.class.php - - - - message: '#^Property AccountancyReport\:\:\$code \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancyreport.class.php - - - - message: '#^Property AccountancyReport\:\:\$fk_country \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancyreport.class.php - - - - message: '#^Property AccountancyReport\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/accountancyreport.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Property AccountingAccount\:\:\$account_number \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Property AccountingAccount\:\:\$fk_pcg_version \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Property AccountingAccount\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Property AccountingAccount\:\:\$labelshort \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Property AccountingAccount\:\:\$pcg_type \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - 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\.$#' identifier: function.impossibleType count: 1 path: ../../../htdocs/accountancy/class/accountingjournal.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(string\)\: bool\)\|null, ''strlen'' given\.$#' identifier: argument.type count: 3 path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - message: '#^Property BookKeeping\:\:\$amount \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$code_journal \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$credit \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$debit \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$doc_ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$doc_type \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$fk_doc \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$fk_docdet \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$fk_user_author \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$import_key \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$journal_label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$label_compte \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$label_operation \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$montant \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$numero_compte \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$piece_num \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$sens \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Property BookKeeping\:\:\$thirdparty_code \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 2 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - - - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/accountancy/class/bookkeeping.class.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -696,150 +390,6 @@ parameters: count: 1 path: ../../../htdocs/adherents/card.php - - - message: '#^Variable \$public in isset\(\) always exists and is not nullable\.$#' - identifier: isset.variable - count: 1 - path: ../../../htdocs/adherents/card.php - - - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 2 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Adherent\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Adherent\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Adherent\) and ''photo'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Adherent\) and ''societe'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 5 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Property Adherent\:\:\$last_subscription_amount \(int\|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: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(AdherentType\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(AdherentType\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(AdherentType\) and ''amount'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(AdherentType\) and ''vote'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Loose comparison using \!\= between '''' and ''nolink'' will always evaluate to true\.$#' - identifier: notEqual.alwaysTrue - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Property AdherentType\:\:\$duration \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Property AdherentType\:\:\$subscription \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Property AdherentType\:\:\$vote \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/adherents/class/adherent_type.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Subscription\) and ''amount'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/subscription.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Subscription\) and ''datef'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/subscription.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Subscription\) and ''dateh'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/subscription.class.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../../htdocs/adherents/class/subscription.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/adherents/class/subscription.class.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -882,18 +432,6 @@ parameters: count: 1 path: ../../../htdocs/adherents/messaging.php - - - message: '#^Property Partnership\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/adherents/partnership.php - - - - message: '#^Property Partnership\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/adherents/partnership.php - - message: '#^Variable \$bankline in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -1104,12 +642,6 @@ parameters: count: 1 path: ../../../htdocs/admin/index.php - - - message: '#^Variable \$setupcompanynotcomplete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/admin/index.php - - message: '#^Offset ''includerefgeneration'' on array\{label\: ''KnowledgeManagement'', includerefgeneration\: 1, includedocgeneration\: 0, class\: ''KnowledgeRecord''\} in empty\(\) always exists and is not falsy\.$#' identifier: empty.offset @@ -1272,12 +804,6 @@ parameters: count: 1 path: ../../../htdocs/admin/modules.php - - - message: '#^Property DolibarrModules\:\:\$langfiles \(array\\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/admin/modules.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1350,12 +876,6 @@ parameters: count: 6 path: ../../../htdocs/admin/oauthlogintokens.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/admin/openinghours.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1374,12 +894,6 @@ parameters: count: 3 path: ../../../htdocs/admin/perms.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 11 - path: ../../../htdocs/admin/receiptprinter.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1434,12 +948,6 @@ parameters: count: 1 path: ../../../htdocs/admin/system/dolibarr.php - - - message: '#^Call to function is_array\(\) with non\-empty\-list\ will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/admin/system/filecheck.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -1512,36 +1020,6 @@ parameters: count: 1 path: ../../../htdocs/admin/tools/dolibarr_export.php - - - message: '#^Variable \$dolibarr_main_db_name might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/admin/tools/dolibarr_export.php - - - - message: '#^Variable \$dolibarr_main_db_user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_export.php - - - - message: '#^Variable \$dolibarr_main_db_host might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - - - message: '#^Variable \$dolibarr_main_db_name might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - - - message: '#^Variable \$dolibarr_main_db_user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/admin/tools/dolibarr_import.php - - message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -1614,12 +1092,6 @@ parameters: count: 1 path: ../../../htdocs/admin/tools/ui/class/documentation.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 2 - path: ../../../htdocs/admin/triggers.php - - message: '#^Variable \$label might not be defined\.$#' identifier: variable.undefined @@ -1704,12 +1176,6 @@ parameters: count: 1 path: ../../../htdocs/ai/admin/setup.php - - - message: '#^Call to function is_object\(\) with ActionComm\|Adherent\|Commande\|CommandeFournisseur\|Contact\|Contrat\|Expedition\|ExpenseReport\|Facture\|FactureFournisseur\|Fichinter\|Mo\|Product\|Project\|Propal\|Task will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 2 - path: ../../../htdocs/api/class/api_documents.class.php - - message: '#^Variable \$modulepart in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -1752,12 +1218,6 @@ parameters: count: 1 path: ../../../htdocs/api/index.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/accountancy_codes.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1836,30 +1296,12 @@ parameters: count: 1 path: ../../../htdocs/asset/card.php - - - message: '#^Property Asset\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/card.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/card.php - - message: '#^Property Asset\:\:\$date_start \(int\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 2 path: ../../../htdocs/asset/class/asset.class.php - - - message: '#^Property Asset\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/class/asset.class.php - - message: '#^Call to function is_callable\(\) with array\{\$this\(AssetDepreciationOptions\), ''validateField''\} will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -1908,24 +1350,12 @@ parameters: count: 2 path: ../../../htdocs/asset/class/assetmodel.class.php - - - message: '#^Property AssetModel\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/class/assetmodel.class.php - - message: '#^Variable \$lines in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../../htdocs/asset/depreciation.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/depreciation_options.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -1938,42 +1368,12 @@ parameters: count: 1 path: ../../../htdocs/asset/list.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/accountancy_codes.php - - message: '#^Variable \$backtopageforcancel might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/asset/model/accountancy_codes.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/agenda.php - - - - message: '#^Property AssetModel\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/card.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/card.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/depreciation_options.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -1986,12 +1386,6 @@ parameters: count: 1 path: ../../../htdocs/asset/model/list.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/asset/model/note.php - - message: '#^Variable \$assetaccountancycodes might not be defined\.$#' identifier: variable.undefined @@ -2043,7 +1437,7 @@ parameters: - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue - count: 4 + count: 1 path: ../../../htdocs/barcode/printsheet.php - @@ -2076,18 +1470,6 @@ parameters: count: 1 path: ../../../htdocs/blockedlog/class/blockedlog.class.php - - - message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/bom_card.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/bom_card.php - - message: '#^Variable \$idprod might not be defined\.$#' identifier: variable.undefined @@ -2112,24 +1494,12 @@ parameters: count: 3 path: ../../../htdocs/bom/bom_net_needs.php - - - message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/bom_net_needs.php - - message: '#^Property CommonDict\:\:\$label \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/bom/bom_net_needs.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/bom_net_needs.php - - message: '#^Left side of && is always false\.$#' identifier: booleanAnd.leftAlwaysFalse @@ -2142,72 +1512,24 @@ parameters: count: 1 path: ../../../htdocs/bom/class/api_boms.class.php - - - message: '#^Call to function method_exists\(\) with \$this\(BOM\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(BOM\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - message: '#^Method BOM\:\:getNetNeedsTree\(\) has parameter \$TNetNeeds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: ../../../htdocs/bom/class/bom.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - - - message: '#^Property BOM\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - - - message: '#^Property BOM\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - message: '#^Call to function is_object\(\) with BOMLine will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/bom/tpl/objectline_create.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/bom/tpl/objectline_create.tpl.php - - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/bom/tpl/objectline_create.tpl.php - - message: '#^Call to function is_object\(\) with BOMLine will always evaluate to true\.$#' identifier: function.alreadyNarrowedType 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: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -2238,18 +1560,6 @@ parameters: count: 1 path: ../../../htdocs/bookcal/availabilities_card.php - - - message: '#^Property Availabilities\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/availabilities_card.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/availabilities_card.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -2262,12 +1572,6 @@ parameters: count: 1 path: ../../../htdocs/bookcal/availabilities_card.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/bookcal/availabilities_card.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -2298,12 +1602,6 @@ parameters: count: 1 path: ../../../htdocs/bookcal/booking_list.php - - - message: '#^Property Calendar\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/booking_list.php - - message: '#^Variable \$lineid might not be defined\.$#' identifier: variable.undefined @@ -2340,18 +1638,6 @@ parameters: count: 1 path: ../../../htdocs/bookcal/calendar_card.php - - - message: '#^Property Calendar\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/calendar_card.php - - - - message: '#^Property Calendar\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/calendar_card.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -2364,12 +1650,6 @@ parameters: count: 1 path: ../../../htdocs/bookcal/calendar_card.php - - - message: '#^Variable \$soc might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/bookcal/calendar_card.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -2418,220 +1698,16 @@ parameters: count: 1 path: ../../../htdocs/bookcal/calendar_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/bookcal/calendar_note.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../../htdocs/bookcal/calendar_note.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Availabilities\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Availabilities\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Availabilities\) and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with Availabilities and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with Availabilities and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with Availabilities and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with Availabilities and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function property_exists\(\) with Availabilities and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Method Availabilities\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Method Availabilities\:\:getLinesArray\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Property Availabilities\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/bookcal/class/availabilities.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Calendar\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Calendar\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Calendar\) and ''fk_soc'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Calendar\) and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with Calendar and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with Calendar and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with Calendar and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with Calendar and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Call to function property_exists\(\) with Calendar and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Property Calendar\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/bookcal/class/calendar.class.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 3 - path: ../../../htdocs/bookcal/lib/bookcal_availabilities.lib.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../../htdocs/bookcal/lib/bookcal_availabilities.lib.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 2 - path: ../../../htdocs/bookcal/lib/bookcal_calendar.lib.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 2 - path: ../../../htdocs/bookcal/lib/bookcal_calendar.lib.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 2 + count: 1 + path: ../../../htdocs/bookmarks/bookmarks.lib.php + + - + message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 path: ../../../htdocs/bookmarks/bookmarks.lib.php - @@ -2778,12 +1854,6 @@ parameters: count: 1 path: ../../../htdocs/comm/action/class/actioncomm.class.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/comm/action/class/actioncomm.class.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -2808,12 +1878,6 @@ parameters: count: 2 path: ../../../htdocs/comm/action/class/cactioncomm.class.php - - - message: '#^Variable \$TSystem might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/action/class/cactioncomm.class.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -2827,14 +1891,14 @@ parameters: path: ../../../htdocs/comm/action/index.php - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse + message: '#^Call to function is_array\(\) with string will always evaluate to false\.$#' + identifier: function.impossibleType count: 1 path: ../../../htdocs/comm/action/index.php - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: ../../../htdocs/comm/action/index.php @@ -2856,12 +1920,6 @@ parameters: count: 1 path: ../../../htdocs/comm/action/index.php - - - message: '#^Variable \$theme_datacolor might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/action/index.php - - message: '#^Variable \$socid might not be defined\.$#' identifier: variable.undefined @@ -2883,7 +1941,7 @@ parameters: - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue - count: 4 + count: 3 path: ../../../htdocs/comm/action/list.php - @@ -2989,10 +2047,10 @@ parameters: path: ../../../htdocs/comm/action/pertype.php - - message: '#^Variable \$theme_datacolor might not be defined\.$#' - identifier: variable.undefined + message: '#^Call to function is_array\(\) with string will always evaluate to false\.$#' + identifier: function.impossibleType count: 1 - path: ../../../htdocs/comm/action/pertype.php + path: ../../../htdocs/comm/action/peruser.php - message: '#^Loose comparison using \!\= between ''show_peruser'' and ''show_day'' will always evaluate to true\.$#' @@ -3054,12 +2112,6 @@ parameters: count: 1 path: ../../../htdocs/comm/action/peruser.php - - - message: '#^Variable \$theme_datacolor might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/action/peruser.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -3246,12 +2298,6 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/card.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/card.php - - message: '#^Variable \$classname might not be defined\.$#' identifier: variable.undefined @@ -3264,132 +2310,6 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/card.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 4 - path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Propal\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Propal\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Propal\) and ''thirdparty'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Propal\) and ''total_ht'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Method Propal\:\:liste_array\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 4 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$total_ht \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$total_localtax1 \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$total_localtax2 \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$total_ttc \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property CommonObject\:\:\$total_tva \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property Propal\:\:\$date_signature \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property Propal\:\:\$ref_client \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Property Propal\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 1 - path: ../../../htdocs/comm/propal/class/propal.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/comm/propal/class/propaleligne.class.php - - - - message: '#^Property PropaleLigne\:\:\$info_bits \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propaleligne.class.php - - - - message: '#^Property PropaleLigne\:\:\$pa_ht \(float\|int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/comm/propal/class/propaleligne.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -3414,138 +2334,12 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/list.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/commande/card.php - - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../../htdocs/commande/card.php - - message: '#^Variable \$classname might not be defined\.$#' identifier: variable.undefined count: 3 path: ../../../htdocs/commande/card.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 2 - path: ../../../htdocs/commande/class/api_orders.class.php - - - - message: '#^Parameter \#1 \$object of method Orders\:\:_cleanObjectDatas\(\) expects object, array\\>\|int given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/commande/class/api_orders.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 5 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property Commande\:\:\$mode_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property Commande\:\:\$ref_client \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property Commande\:\:\$ref_customer \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property Commande\:\:\$socid \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$cond_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$shipping_method_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$total_ht \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$total_localtax1 \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$total_localtax2 \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$total_ttc \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Property CommonObject\:\:\$total_tva \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 2 - path: ../../../htdocs/commande/class/commande.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/commande/class/orderline.class.php - - message: '#^Variable \$socid might not be defined\.$#' identifier: variable.undefined @@ -3936,12 +2730,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/various_payment/info.php - - - message: '#^Variable \$morehtmlright might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/various_payment/info.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -4056,12 +2844,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/card.php - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/compta/facture/card.php - - message: '#^Loose comparison using \=\= between 0 and 0 will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -4086,12 +2868,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/card.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/facture/card.php - - message: '#^Result of \|\| is always true\.$#' identifier: booleanOr.alwaysTrue @@ -4122,12 +2898,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/card.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 4 - path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -4206,18 +2976,6 @@ parameters: count: 2 path: ../../../htdocs/compta/facture/class/facture.class.php - - - message: '#^Property CommonInvoice\:\:\$cond_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/facture/class/facture.class.php - - - - message: '#^Property CommonInvoice\:\:\$mode_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/facture/class/facture.class.php - - message: '#^Property CommonInvoice\:\:\$socid \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4254,24 +3012,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/class/facture.class.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/facture/class/facture.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/compta/facture/class/facture.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/compta/facture/class/facture.class.php - - message: '#^Property Facture\:\:\$fk_facture_source \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4338,12 +3078,6 @@ parameters: count: 4 path: ../../../htdocs/compta/facture/class/paymentterm.class.php - - - message: '#^Property PaymentTerm\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/facture/class/paymentterm.class.php - - message: '#^Property PaymentTerm\:\:\$libelle \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4416,18 +3150,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/stats/index.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/facture/tpl/linkedobjectblock.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -4579,29 +3301,11 @@ parameters: path: ../../../htdocs/compta/localtax/list.php - - message: '#^Call to function is_array\(\) with list\\> will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with list\\> will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/compta/localtax/quadri_detail.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/localtax/quadri_detail.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -4704,12 +3408,6 @@ parameters: count: 4 path: ../../../htdocs/compta/paiement/class/cpaiement.class.php - - - message: '#^Property CommonDict\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/paiement/class/cpaiement.class.php - - message: '#^Property CommonDict\:\:\$id \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4728,12 +3426,6 @@ parameters: count: 4 path: ../../../htdocs/compta/paiement/class/cpaiement.class.php - - - message: '#^Property Cpaiement\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/compta/paiement/class/cpaiement.class.php - - message: '#^Property Cpaiement\:\:\$libelle \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -4824,78 +3516,6 @@ parameters: 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 - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(BonPrelevement\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(BonPrelevement\) and ''date_echeance'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(BonPrelevement\) and ''total'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Loose comparison using \=\= between 0 and 1 will always evaluate to false\.$#' - identifier: equal.alwaysFalse - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Property BonPrelevement\:\:\$amount \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Property BonPrelevement\:\:\$date_trans \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Property BonPrelevement\:\:\$factures has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Property BonPrelevement\:\:\$invoice_in_error has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - - - message: '#^Property BonPrelevement\:\:\$thirdparty_in_error has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/compta/prelevement/class/bonprelevement.class.php - - message: '#^Right side of \|\| is always true\.$#' identifier: booleanOr.rightAlwaysTrue @@ -4938,18 +3558,6 @@ parameters: count: 1 path: ../../../htdocs/compta/recap-compta.php - - - message: '#^Parameter \#1 \$array of function dol_sort_array contains unresolvable type\.$#' - identifier: argument.unresolvableType - count: 2 - path: ../../../htdocs/compta/recap-compta.php - - - - message: '#^Return type of call to function dol_sort_array contains unresolvable type\.$#' - identifier: function.unresolvableReturnType - count: 2 - path: ../../../htdocs/compta/recap-compta.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined @@ -5016,12 +3624,6 @@ parameters: count: 1 path: ../../../htdocs/compta/sociales/card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/sociales/card.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -5034,12 +3636,6 @@ parameters: count: 2 path: ../../../htdocs/compta/sociales/class/cchargesociales.class.php - - - message: '#^Property Cchargesociales\:\:\$active \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/compta/sociales/class/cchargesociales.class.php - - message: '#^Property Cchargesociales\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -5052,12 +3648,6 @@ parameters: count: 2 path: ../../../htdocs/compta/sociales/class/cchargesociales.class.php - - - message: '#^Property Cchargesociales\:\:\$fk_pays \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/compta/sociales/class/cchargesociales.class.php - - message: '#^Property Cchargesociales\:\:\$libelle \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -5352,12 +3942,6 @@ parameters: count: 1 path: ../../../htdocs/compta/tva/card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/compta/tva/card.php - - message: '#^Property PaymentVAT\:\:\$amount \(float\|int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -5454,54 +4038,12 @@ parameters: count: 1 path: ../../../htdocs/compta/tva/clients.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_end might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_start might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/clients.php - - - - message: '#^Variable \$date_start_year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/clients.php - - message: '#^Variable \$description might not be defined\.$#' identifier: variable.undefined count: 8 path: ../../../htdocs/compta/tva/clients.php - - - message: '#^Variable \$year_current might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/tva/clients.php - - message: '#^Strict comparison using \=\=\= between true and true will always evaluate to true\.$#' identifier: identical.alwaysTrue @@ -5544,78 +4086,6 @@ parameters: count: 1 path: ../../../htdocs/compta/tva/quadri_detail.php - - - message: '#^Comparison operation "\<" between 0 and 4 is always true\.$#' - identifier: smaller.alwaysTrue - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Comparison operation "\>" between 0 and 1 is always false\.$#' - identifier: greater.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_day might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_end_year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_day might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$date_start_year might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/compta/tva/quadri_detail.php - - - - message: '#^Variable \$year_current might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/tva/quadri_detail.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -5658,66 +4128,6 @@ parameters: count: 1 path: ../../../htdocs/contact/card.php - - - message: '#^Call to function method_exists\(\) with \$this\(Contact\) and ''getLibStatut'' 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 ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Contact\) and ''photo'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Contact\) and ''thirdparty'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 3 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Property Contact\:\:\$roles \(array\\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Property Contact\:\:\$stcomm_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contact/class/contact.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/contact/class/contact.class.php - - message: '#^Loose comparison using \=\= between 0 and 1 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -5802,144 +4212,12 @@ parameters: count: 1 path: ../../../htdocs/contrat/card.php - - - message: '#^Call to function method_exists\(\) with \$this\(Contrat\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Contrat\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Contrat\) and ''date_contrat'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 6 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$fk_commercial_signature \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$fk_commercial_suivi \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$ref_customer \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$ref_supplier \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$socid \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Property Contrat\:\:\$statut \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Variable \$sql might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/class/contrat.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/contrat/class/contratligne.class.php - - - - message: '#^Offset ''label'' on array\{label\: non\-falsy\-string\} in empty\(\) always exists and is not falsy\.$#' - identifier: empty.offset - count: 1 - path: ../../../htdocs/contrat/class/contratligne.class.php - - - - message: '#^Variable \$label in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/contrat/class/contratligne.class.php - - message: '#^Variable \$mesg might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/contrat/contact.php - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/index.php - - - - message: '#^Variable \$badgeStatus4 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/index.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -5976,12 +4254,6 @@ parameters: count: 1 path: ../../../htdocs/contrat/ticket.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/contrat/tpl/linkedobjectblock.tpl.php - - message: '#^Loose comparison using \=\= between 1 and 0 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -6120,12 +4392,6 @@ parameters: count: 5 path: ../../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$holiday might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$listofobjectthirdparties in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -6804,24 +5070,6 @@ parameters: count: 2 path: ../../../htdocs/core/class/CMailFile.class.php - - - message: '#^Method CMailFile\:\:getValidAddress\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - - - message: '#^Method CMailFile\:\:getValidAddress\(\) has parameter \$encode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - - - message: '#^Method CMailFile\:\:getValidAddress\(\) has parameter \$maxnumberofemail with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/class/CMailFile.class.php - - message: '#^Property CMailFile\:\:\$addr_bcc \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -6876,12 +5124,6 @@ parameters: count: 4 path: ../../../htdocs/core/class/ccountry.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/ccountry.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -6906,12 +5148,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/cgenericdic.class.php - - - message: '#^Property CGenericDic\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cgenericdic.class.php - - message: '#^Property CGenericDic\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -6942,12 +5178,6 @@ parameters: count: 2 path: ../../../htdocs/core/class/cleadstatus.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/core/class/cleadstatus.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7398,12 +5628,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/conf.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/core/class/cproductnature.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7422,48 +5646,6 @@ parameters: count: 2 path: ../../../htdocs/core/class/cproductnature.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property CommonDict\:\:\$id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property Cregion\:\:\$cheflieu \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property Cregion\:\:\$code_region \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property Cregion\:\:\$fk_pays \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property Cregion\:\:\$name \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cregion.class.php - - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/cstate.class.php - - message: '#^Property Cstate\:\:\$code_departement \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7488,12 +5670,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/cstate.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/ctypent.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7524,12 +5700,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/ctyperesource.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/class/ctyperesource.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7560,12 +5730,6 @@ parameters: count: 4 path: ../../../htdocs/core/class/cunits.class.php - - - message: '#^Property CommonDict\:\:\$active \(int\<0, 1\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/core/class/cunits.class.php - - message: '#^Property CommonDict\:\:\$code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -7908,12 +6072,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.formfile.class.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 3 - path: ../../../htdocs/core/class/html.formfile.class.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -7944,24 +6102,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.formfile.class.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 3 - path: ../../../htdocs/core/class/html.formfile.class.php - - - - message: '#^Variable \$fileinfo might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/class/html.formfile.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/core/class/html.formintervention.class.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -8034,18 +6174,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.formsetup.class.php - - - message: '#^Loose comparison using \!\= between 1 and ''1'' will always evaluate to false\.$#' - identifier: notEqual.alwaysFalse - count: 1 - path: ../../../htdocs/core/class/html.formsms.class.php - - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: ../../../htdocs/core/class/html.formsms.class.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -8076,16 +6204,10 @@ parameters: count: 3 path: ../../../htdocs/core/class/html.formticket.class.php - - - message: '#^Call to function is_object\(\) with mixed will always evaluate to false\.$#' - identifier: function.impossibleType - count: 2 - path: ../../../htdocs/core/class/interfaces.class.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 4 + count: 2 path: ../../../htdocs/core/class/interfaces.class.php - @@ -8250,12 +6372,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/menubase.class.php - - - message: '#^Property Menubase\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/class/menubase.class.php - - message: '#^Method Notify\:\:getNotificationsArray\(\) has parameter \$scope with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8707,7 +6823,7 @@ parameters: path: ../../../htdocs/core/lib/admin.lib.php - - message: '#^Offset 1 on array\{string, non\-falsy\-string, string\} in empty\(\) always exists and is not falsy\.$#' + message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string, string\} in empty\(\) always exists and is not falsy\.$#' identifier: empty.offset count: 1 path: ../../../htdocs/core/lib/admin.lib.php @@ -8718,40 +6834,16 @@ parameters: count: 2 path: ../../../htdocs/core/lib/admin.lib.php - - - message: '#^Variable \$strictw3c in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 13 - path: ../../../htdocs/core/lib/admin.lib.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 2 path: ../../../htdocs/core/lib/agenda.lib.php - - - message: '#^Function ajax_constantonoff\(\) has parameter \$entity with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - - - message: '#^Function ajax_constantonoff\(\) has parameter \$revertonoff with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - - - message: '#^Function ajax_constantonoff\(\) has parameter \$strict with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: ../../../htdocs/core/lib/ajax.lib.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue - count: 2 + count: 1 path: ../../../htdocs/core/lib/company.lib.php - @@ -8877,7 +6969,7 @@ parameters: - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue - count: 3 + count: 4 path: ../../../htdocs/core/lib/functions.lib.php - @@ -8911,19 +7003,19 @@ parameters: path: ../../../htdocs/core/lib/functions.lib.php - - message: '#^Offset ''list'' on array\{list\: array\{\}\}\|array\{list\: non\-empty\-array\\} in isset\(\) always exists and is not nullable\.$#' + message: '#^Offset ''list'' on array\{list\: array\{\}\}\|array\{list\: non\-empty\-list\\} in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset count: 1 path: ../../../htdocs/core/lib/functions.lib.php - - message: '#^Offset 1 on array\{string, non\-falsy\-string\} in empty\(\) always exists and is not falsy\.$#' + message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string\} in empty\(\) always exists and is not falsy\.$#' identifier: empty.offset count: 1 path: ../../../htdocs/core/lib/functions.lib.php - - message: '#^Offset 1 on array\{string, non\-falsy\-string\} in isset\(\) always exists and is not nullable\.$#' + message: '#^Offset 1 on array\{non\-falsy\-string, non\-falsy\-string\} in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset count: 1 path: ../../../htdocs/core/lib/functions.lib.php @@ -8976,18 +7068,6 @@ parameters: count: 1 path: ../../../htdocs/core/lib/functions2.lib.php - - - message: '#^Parameter \#3 \$value of function curl_setopt expects 0\|2, bool given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/core/lib/geturl.lib.php - - - - message: '#^Parameter \#3 \$value of function curl_setopt expects bool, int given\.$#' - identifier: argument.type - count: 4 - path: ../../../htdocs/core/lib/geturl.lib.php - - message: '#^Call to function function_exists\(\) with ''imagecreatefromgif''\|''imagecreatefromjpeg''\|''imagecreatefrompng''\|''imagecreatefromwbmp''\|''imagecreatefromwebp'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9060,12 +7140,6 @@ parameters: count: 1 path: ../../../htdocs/core/lib/order.lib.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 11 - path: ../../../htdocs/core/lib/pdf.lib.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9108,12 +7182,6 @@ parameters: count: 1 path: ../../../htdocs/core/lib/signature.lib.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 6 - path: ../../../htdocs/core/lib/tax.lib.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9132,18 +7200,6 @@ parameters: count: 1 path: ../../../htdocs/core/lib/website.lib.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/core/lib/website.lib.php - - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - path: ../../../htdocs/core/lib/website.lib.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9162,6 +7218,12 @@ parameters: count: 1 path: ../../../htdocs/core/lib/xcal.lib.php + - + message: '#^Offset 0 on array\{non\-falsy\-string, non\-empty\-string\} in empty\(\) always exists and is not falsy\.$#' + identifier: empty.offset + count: 1 + path: ../../../htdocs/core/lib/xcal.lib.php + - message: '#^Loose comparison using \=\= between ''auto'' and ''auto'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -9330,12 +7392,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/action/doc/pdf_standard_actions.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9372,30 +7428,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php - - - message: '#^Property modTcpdfbarcode\:\:\$is2d has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php - - - - message: '#^Parameter \#2 \$type of method mod_barcode_product_standard\:\:literalBarcodeType\(\) expects int, string given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/core/modules/barcode/mod_barcode_product_standard.php - - - - message: '#^Parameter \#2 \$type of method mod_barcode_thirdparty_standard\:\:literalBarcodeType\(\) expects int, string given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9414,12 +7446,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/core/modules/commande/doc/pdf_einstein.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9438,12 +7464,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9570,12 +7590,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/core/modules/facture/doc/pdf_crabe.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9606,12 +7620,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/core/modules/facture/doc/pdf_octopus.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9630,42 +7638,12 @@ parameters: count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 1 path: ../../../htdocs/core/modules/facture/doc/pdf_sponge.modules.php - - - message: '#^Property mod_facture_mars\:\:\$prefixcreditnote has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/facture/mod_facture_mars.php - - - - message: '#^Property mod_facture_mars\:\:\$prefixdeposit has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/facture/mod_facture_mars.php - - - - message: '#^Property mod_facture_mars\:\:\$prefixinvoice has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/facture/mod_facture_mars.php - - - - message: '#^Property mod_facture_mars\:\:\$prefixreplacement has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/facture/mod_facture_mars.php - - message: '#^Access to constant TYPE_NON on an unknown class Sprain\\SwissQrBill\\DataGroup\\Element\\PaymentReference\.$#' identifier: class.notFound @@ -9720,12 +7698,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9870,30 +7842,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/import/import_xlsx.modules.php - - - message: '#^Property mailing_contacts1\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/contacts1.modules.php - - - - message: '#^Property mailing_contacts1\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/contacts1.modules.php - - - - message: '#^Property mailing_fraise\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/fraise.modules.php - - - - message: '#^Property mailing_fraise\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/fraise.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9918,30 +7866,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/mailings/modules_mailings.php - - - message: '#^Property mailing_xinputfile\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/xinputfile.modules.php - - - - message: '#^Property mailing_xinputfile\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/xinputfile.modules.php - - - - message: '#^Property mailing_xinputuser\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/xinputuser.modules.php - - - - message: '#^Property mailing_xinputuser\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mailings/xinputuser.modules.php - - message: '#^Comparison operation "\>" between 1 and 0 is always true\.$#' identifier: greater.alwaysTrue @@ -10494,24 +8418,12 @@ parameters: count: 1 path: ../../../htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php - - - message: '#^Property Mo\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php - - message: '#^Left side of \|\| is always false\.$#' identifier: booleanOr.leftAlwaysFalse count: 1 path: ../../../htdocs/core/modules/mrp/doc/pdf_vinci.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/mrp/doc/pdf_vinci.modules.php - - message: '#^Property Mo\:\:\$lines \(array\\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -10638,24 +8550,12 @@ parameters: count: 3 path: ../../../htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 1 path: ../../../htdocs/core/modules/propale/doc/pdf_azur.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/core/modules/propale/doc/pdf_cyan.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -10692,12 +8592,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/societe/doc/doc_generic_odt.modules.php - - - message: '#^Property CommonObject\:\:\$multicurrency_tx \(array\\|float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -10716,12 +8610,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php - - - message: '#^Property CommandeFournisseur\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -10740,12 +8628,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php - - - message: '#^Property CommandeFournisseur\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -10764,12 +8646,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php - - - message: '#^Property SupplierProposal\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -10782,12 +8658,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php - - - message: '#^Property SupplierProposal\:\:\$multicurrency_tx \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -10860,18 +8730,6 @@ parameters: count: 1 path: ../../../htdocs/core/search_page.php - - - message: '#^Variable \$type2label might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/admin_extrafields_edit.tpl.php - - - - message: '#^Variable \$type2label might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/admin_extrafields_view.tpl.php - - message: '#^Property CommonObject\:\:\$lines \(array\\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -10914,36 +8772,6 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - message: '#^Variable \$filearray might not be defined\.$#' identifier: variable.undefined @@ -11016,12 +8844,6 @@ parameters: count: 8 path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -11178,12 +9000,6 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/originproductline.tpl.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php - - message: '#^Property CommonObject\:\:\$sendtoid \(array\\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -11292,114 +9108,6 @@ parameters: count: 1 path: ../../../htdocs/cron/class/cronjob.class.php - - - message: '#^Property Cronjob\:\:\$command \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$dateend \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$datenextrun \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$datestart \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$email_alert \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$frequency \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$jobtype \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$lastoutput \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$lastresult \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$libname \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$maxrun \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$nbrun \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$processing \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 5 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$test \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Property Cronjob\:\:\$unitfrequency \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/cron/class/cronjob.class.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -11454,144 +9162,24 @@ parameters: count: 1 path: ../../../htdocs/delivery/class/delivery.class.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/delivery/tpl/linkedobjectblock.tpl.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse count: 1 path: ../../../htdocs/document.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/document.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../../htdocs/don/class/api_donations.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Don\) and ''societe'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/don/class/don.class.php - - - - message: '#^Property Don\:\:\$societe \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/don/class/don.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 5 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$amount \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$fk_donation \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Property PaymentDonation\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/don/class/paymentdonation.class.php - - - - message: '#^Result of && is always true\.$#' - identifier: booleanAnd.alwaysTrue - count: 2 - path: ../../../htdocs/don/class/paymentdonation.class.php - - message: '#^Variable \$maxlength might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/don/document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/document.php - - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/index.php - - - - message: '#^Variable \$badgeStatus9 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/index.php - - message: '#^Variable \$maxlength might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/don/info.php - - - message: '#^Variable \$projectstatic might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/don/list.php - - message: '#^Variable \$maxlength might not be defined\.$#' identifier: variable.undefined @@ -11634,120 +9222,6 @@ parameters: count: 1 path: ../../../htdocs/don/payment/payment.php - - - message: '#^Property EcmFiles\:\:\$acl \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$cover \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$date_c \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$date_m \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$description \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$filename \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$filepath \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$fk_user_c \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$fk_user_m \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$fullpath_orig \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$gen_or_uploaded \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$keywords \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$label \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$position \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$share \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$src_object_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - - message: '#^Property EcmFiles\:\:\$src_object_type \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -11760,36 +9234,6 @@ parameters: count: 1 path: ../../../htdocs/ecm/dir_add_card.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/ecm/file_card.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 1 - path: ../../../htdocs/ecm/file_card.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/ecm/file_card.php - - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - path: ../../../htdocs/ecm/file_card.php - - - - message: '#^Variable \$module might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/ecm/file_card.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -11802,12 +9246,6 @@ parameters: count: 1 path: ../../../htdocs/ecm/search.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/ecm/tpl/enablefiletreeajax.tpl.php - - message: '#^Variable \$param might not be defined\.$#' identifier: variable.undefined @@ -11850,108 +9288,6 @@ parameters: count: 16 path: ../../../htdocs/emailcollector/class/emailcollector.class.php - - - message: '#^Call to function method_exists\(\) with \$this\(ConferenceOrBooth\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(ConferenceOrBooth\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(ConferenceOrBooth\) and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(ConferenceOrBooth\) and ''thirdparty'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Method ConferenceOrBooth\:\:fetchAll\(\) has parameter \$filter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Method ConferenceOrBooth\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Property ConferenceOrBooth\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorbooth.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(ConferenceOrBoothAttendee\) and ''fk_soc'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Call to function property_exists\(\) with ConferenceOrBoothAttendee and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Call to function property_exists\(\) with ConferenceOrBoothAttendee and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Call to function property_exists\(\) with ConferenceOrBoothAttendee and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Call to function property_exists\(\) with ConferenceOrBoothAttendee and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Property ConferenceOrBoothAttendee\:\:\$lastname \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - - - message: '#^Property ConferenceOrBoothAttendee\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/class/conferenceorboothattendee.class.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -11964,36 +9300,12 @@ parameters: count: 1 path: ../../../htdocs/eventorganization/conferenceorbooth_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_card.php - - - - message: '#^Property ConferenceOrBooth\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_card.php - - message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/eventorganization/conferenceorbooth_contact.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_contact.php - - - - message: '#^Property ConferenceOrBooth\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_contact.php - - message: '#^Variable \$mode might not be defined\.$#' identifier: variable.undefined @@ -12006,18 +9318,6 @@ parameters: count: 1 path: ../../../htdocs/eventorganization/conferenceorbooth_document.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_document.php - - - - message: '#^Property ConferenceOrBooth\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorbooth_document.php - - message: '#^Comparison operation "\>" between 0 and 0 is always false\.$#' identifier: greater.alwaysFalse @@ -12054,18 +9354,6 @@ parameters: count: 1 path: ../../../htdocs/eventorganization/conferenceorboothattendee_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorboothattendee_card.php - - - - message: '#^Property ConferenceOrBoothAttendee\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/eventorganization/conferenceorboothattendee_card.php - - message: '#^Variable \$withproject in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -12096,100 +9384,10 @@ parameters: count: 2 path: ../../../htdocs/eventorganization/conferenceorboothattendee_list.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$deliveryreceipt 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 - count: 6 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$triggername in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/eventorganization/core/actions_massactions_mail.inc.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/eventorganization/tpl/linkedobjectblock.tpl.php - - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 2 - path: ../../../htdocs/expedition/card.php - - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 5 - path: ../../../htdocs/expedition/card.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../../htdocs/expedition/card.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/expedition/card.php - - - - message: '#^Variable \$extrafields in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 path: ../../../htdocs/expedition/card.php - @@ -12204,150 +9402,12 @@ parameters: count: 1 path: ../../../htdocs/expedition/card.php - - - message: '#^Call to function method_exists\(\) with \$this\(Expedition\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Expedition\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Expedition\) and ''thirdparty'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Expedition\) and ''total_ht'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue count: 1 path: ../../../htdocs/expedition/class/expedition.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 7 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$fk_delivery_address \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property CommonObject\:\:\$shipping_method_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$fk_user_author \(int\) 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 - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$size_units \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$socid \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$tracking_number \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$trueDepth \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$trueHeight \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$trueWeight \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$trueWidth \(int\|string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property Expedition\:\:\$weight_units \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Property ExpeditionLigne\:\:\$detail_batch \(array\\|stdClass\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - path: ../../../htdocs/expedition/class/expedition.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -12480,12 +9540,6 @@ parameters: count: 1 path: ../../../htdocs/expedition/stats/month.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/expedition/tpl/linkedobjectblock.tpl.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -12510,48 +9564,6 @@ parameters: count: 1 path: ../../../htdocs/expensereport/card.php - - - message: '#^Call to function method_exists\(\) with \$this\(ExpenseReport\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(ExpenseReport\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(ExpenseReport\) and ''date_debut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(ExpenseReport\) and ''date_fin'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Property ExpenseReport\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/expensereport/class/expensereportline.class.php - - message: '#^Call to function method_exists\(\) with \$this\(PaymentExpenseReport\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -12642,12 +9654,6 @@ parameters: count: 1 path: ../../../htdocs/expensereport/list.php - - - message: '#^Variable \$outputlangs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/payment/card.php - - message: '#^Variable \$linkback might not be defined\.$#' identifier: variable.undefined @@ -12672,72 +9678,6 @@ parameters: count: 1 path: ../../../htdocs/expensereport/payment/payment.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/expensereport/tpl/expensereport_addfile.tpl.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/expensereport_addfile.tpl.php - - - - message: '#^Variable \$formfile might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/expensereport_addfile.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/expensereport/tpl/expensereport_addfile.tpl.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/expensereport_addfile.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/expensereport/tpl/expensereport_linktofile.tpl.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/expensereport/tpl/expensereport_linktofile.tpl.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/expensereport_linktofile.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/expensereport_linktofile.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/expensereport/tpl/expensereport_linktofile.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expensereport/tpl/linkedobjectblock.tpl.php - - message: '#^Property Export\:\:\$fk_user \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -12810,60 +9750,6 @@ parameters: count: 1 path: ../../../htdocs/fichinter/card.php - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/fichinter/card.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Fichinter\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Fichinter\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Fichinter\) and ''duration'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 7 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Property Fichinter\:\:\$ref_client \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Property Fichinter\:\:\$statut \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/fichinter/class/fichinter.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/fichinter/class/fichinterligne.class.php - - message: '#^Right side of && is always false\.$#' identifier: booleanAnd.rightAlwaysFalse @@ -12894,12 +9780,6 @@ parameters: count: 1 path: ../../../htdocs/fichinter/note.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fichinter/tpl/linkedobjectblock.tpl.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -12912,12 +9792,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/card.php - - - message: '#^Parameter \#1 \$object of method SupplierOrders\:\:_cleanObjectDatas\(\) expects object, array\ given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/fourn/class/api_supplier_orders.class.php - - message: '#^Variable \$contact might not be defined\.$#' identifier: variable.undefined @@ -12984,24 +9858,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - - message: '#^Property CommandeFournisseur\:\:\$cond_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - - - message: '#^Property CommandeFournisseur\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - - - message: '#^Property CommandeFournisseur\:\:\$mode_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - message: '#^Property CommandeFournisseur\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -13056,12 +9912,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.commande.class.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -13140,12 +9990,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - - message: '#^Property CommonInvoice\:\:\$cond_reglement_id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - message: '#^Property CommonInvoice\:\:\$socid \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -13170,24 +10014,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - - - message: '#^Property CommonObject\:\:\$ref_ext \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/fourn/class/fournisseur.facture.class.php - - message: '#^Property FactureFournisseur\:\:\$author \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -13332,30 +10158,12 @@ parameters: count: 1 path: ../../../htdocs/fourn/class/fournisseur.product.class.php - - - message: '#^Property Product\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.product.class.php - - - - message: '#^Property Product\:\:\$status_buy \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.product.class.php - - message: '#^Property ProductFournisseur\:\:\$fourn_unitprice \(int\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/fourn/class/fournisseur.product.class.php - - - message: '#^Result of && is always true\.$#' - identifier: booleanAnd.alwaysTrue - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.product.class.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -13464,12 +10272,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/commande/list.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php - - message: '#^Variable \$socid might not be defined\.$#' identifier: variable.undefined @@ -13500,18 +10302,6 @@ parameters: count: 3 path: ../../../htdocs/fourn/facture/card.php - - - message: '#^Variable \$objectsrc might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/fourn/facture/card.php - - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fourn/facture/document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -13566,12 +10356,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/facture/rapport.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -13584,12 +10368,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/paiement/document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fourn/paiement/document.php - - message: '#^Variable \$arrayofselected might not be defined\.$#' identifier: variable.undefined @@ -13638,12 +10416,6 @@ parameters: count: 3 path: ../../../htdocs/ftp/index.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/holiday/card.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -13689,7 +10461,7 @@ parameters: - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue - count: 3 + count: 2 path: ../../../htdocs/holiday/class/holiday.class.php - @@ -13710,12 +10482,6 @@ parameters: count: 1 path: ../../../htdocs/holiday/class/holiday.class.php - - - message: '#^Property Holiday\:\:\$logs has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/holiday/class/holiday.class.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -13806,186 +10572,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/admin/admin_hrm.php - - - message: '#^Property Establishment\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/class/establishment.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Evaluation\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Evaluation\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with Evaluation and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with Evaluation and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with Evaluation and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with Evaluation and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with Evaluation and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Property Evaluation\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/class/evaluation.class.php - - - - message: '#^Call to function property_exists\(\) with EvaluationLine and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Call to function property_exists\(\) with EvaluationLine and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Call to function property_exists\(\) with EvaluationLine and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Call to function property_exists\(\) with EvaluationLine and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Method EvaluationLine\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Method EvaluationLine\:\:getLinesArray\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/hrm/class/evaluationdet.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Job\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Job\) and ''description'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with Job and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with Job and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with Job and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with Job and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Call to function property_exists\(\) with Job and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Method Job\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Method Job\:\:getLinesArray\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Method Job\:\:getSkillRankForJob\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/hrm/class/job.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Position\) and ''getNomUrl'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -14160,12 +10746,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/class/skilldet.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/hrm/class/skilldet.class.php - - message: '#^Call to function property_exists\(\) with SkillRank and ''date_creation'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -14232,144 +10812,30 @@ parameters: count: 1 path: ../../../htdocs/hrm/compare.php - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Cannot access property \$status on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 12 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$colwidth might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$moreparam might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$permission might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$typeofdata might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$value_private might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Variable \$value_public might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/hrm/core/tpl/skilldet.fiche.tpl.php - - - - message: '#^Property Establishment\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/establishment/card.php - - - - message: '#^Property Establishment\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/establishment/info.php - - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/evaluation_card.php - - message: '#^Variable \$k might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/hrm/evaluation_card.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/evaluation_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../../htdocs/hrm/evaluation_list.php - - - message: '#^Variable \$setupcompanynotcomplete in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../../htdocs/hrm/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse count: 1 path: ../../../htdocs/hrm/job_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/job_card.php - - message: '#^Variable \$soc might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/hrm/job_card.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/job_document.php - - message: '#^Comparison operation "\<" between int\<0, max\> and 0 is always false\.$#' identifier: smaller.alwaysFalse @@ -14382,12 +10848,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/lib/hrm_skillrank.lib.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/position.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -14400,18 +10860,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/position.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/position_card.php - - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/position_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -14430,12 +10878,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/skill_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/hrm/skill_card.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -14460,12 +10902,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/skill_card.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/skill_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -14742,12 +11178,6 @@ parameters: count: 1 path: ../../../htdocs/intracommreport/card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/intracommreport/card.php - - message: '#^Variable \$soc might not be defined\.$#' identifier: variable.undefined @@ -14898,24 +11328,6 @@ parameters: count: 1 path: ../../../htdocs/knowledgemanagement/knowledgerecord_card.php - - - message: '#^Property KnowledgeRecord\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/knowledgemanagement/knowledgerecord_card.php - - - - message: '#^Property KnowledgeRecord\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/knowledgemanagement/knowledgerecord_card.php - - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/knowledgemanagement/knowledgerecord_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -14946,12 +11358,6 @@ parameters: count: 1 path: ../../../htdocs/loan/class/loan.class.php - - - message: '#^Property Loan\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/loan/class/loan.class.php - - message: '#^Property Loan\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15132,16 +11538,10 @@ parameters: count: 1 path: ../../../htdocs/main.inc.php - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 1 - path: ../../../htdocs/main.inc.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue - count: 35 + count: 33 path: ../../../htdocs/main.inc.php - @@ -15222,48 +11622,6 @@ parameters: count: 1 path: ../../../htdocs/margin/tabs/thirdpartyMargins.php - - - message: '#^Variable \$dolibarr_main_db_character_set might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_db_collation might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_db_cryptkey might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_db_encryption might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_db_prefix might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_db_type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - - - message: '#^Variable \$dolibarr_main_limit_users might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/master.inc.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -15276,12 +11634,6 @@ parameters: count: 2 path: ../../../htdocs/modulebuilder/index.php - - - message: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - count: 34 - path: ../../../htdocs/modulebuilder/index.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -15492,42 +11844,12 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/class/myobject.class.php - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/modulebuilder/template/class/myobject.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/modulebuilder/template/class/myobject.class.php - - - - message: '#^Property MyObject\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/modulebuilder/template/class/myobject.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/modulebuilder/template/class/myobject.class.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse count: 1 path: ../../../htdocs/modulebuilder/template/core/modules/modMyModule.class.php - - - message: '#^Property MyObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -15558,12 +11880,6 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/js/mymodule.js.php - - - message: '#^If condition is always true\.$#' - identifier: if.alwaysTrue - count: 4 - path: ../../../htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -15630,18 +11946,6 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/myobject_card.php - - - message: '#^Property MyObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/modulebuilder/template/myobject_card.php - - - - message: '#^Property MyObject\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/modulebuilder/template/myobject_card.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -15678,12 +11982,6 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/myobject_document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/modulebuilder/template/myobject_document.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -15750,12 +12048,6 @@ parameters: count: 8 path: ../../../htdocs/mrp/class/api_mos.class.php - - - message: '#^Property MoLine\:\:\$fk_warehouse \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/mrp/class/api_mos.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -15795,7 +12087,7 @@ parameters: - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue - count: 3 + count: 2 path: ../../../htdocs/mrp/class/mo.class.php - @@ -15804,12 +12096,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/class/mo.class.php - - - message: '#^Property Mo\:\:\$fk_warehouse \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - message: '#^Property Mo\:\:\$label \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15834,12 +12120,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/class/mo.class.php - - - message: '#^Property Mo\:\:\$tpl \(array\\) does not accept array\\.$#' - identifier: assign.propertyType - count: 6 - path: ../../../htdocs/mrp/class/mo.class.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -15882,30 +12162,12 @@ parameters: count: 1 path: ../../../htdocs/mrp/mo_agenda.php - - - message: '#^Property Mo\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_card.php - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/mrp/mo_card.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/mrp/mo_document.php - - - - message: '#^Property Mo\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_movements.php - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15936,12 +12198,6 @@ parameters: count: 2 path: ../../../htdocs/mrp/mo_production.php - - - message: '#^Property Mo\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/mrp/mo_production.php - - message: '#^Property Mo\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15966,12 +12222,6 @@ parameters: count: 2 path: ../../../htdocs/mrp/mo_production.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/mrp/tpl/linkedobjectblock.tpl.php - - message: '#^Parameter \#1 \$object of method MultiCurrencies\:\:_cleanObjectDatasRate\(\) expects MultiCurrency, CurrencyRate given\.$#' identifier: argument.type @@ -16014,48 +12264,12 @@ parameters: count: 1 path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - message: '#^Property Opensurveysondage\:\:\$format \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - message: '#^Property Opensurveysondage\:\:\$id_sondage \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - message: '#^Property Opensurveysondage\:\:\$mail_admin \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - - message: '#^Property Opensurveysondage\:\:\$mailsonde \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - - message: '#^Property Opensurveysondage\:\:\$nom_admin \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - - message: '#^Property Opensurveysondage\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - - message: '#^Property Opensurveysondage\:\:\$title \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - message: '#^Offset int\<0, max\> on array\, int\<0, max\>\> in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset @@ -16146,12 +12360,6 @@ parameters: count: 2 path: ../../../htdocs/partnership/class/partnership.class.php - - - message: '#^Property Partnership\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/partnership/class/partnership.class.php - - message: '#^Left side of && is always false\.$#' identifier: booleanAnd.leftAlwaysFalse @@ -16188,18 +12396,6 @@ parameters: count: 1 path: ../../../htdocs/partnership/partnership_card.php - - - message: '#^Property Partnership\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/partnership/partnership_card.php - - - - message: '#^Property Partnership\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/partnership/partnership_card.php - - message: '#^Variable \$adht might not be defined\.$#' identifier: variable.undefined @@ -16392,138 +12588,6 @@ parameters: count: 1 path: ../../../htdocs/product/class/html.formproduct.class.php - - - message: '#^Call to function method_exists\(\) with \$this\(Product\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Product\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Product\) and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Product\) and ''price'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Product\) and ''price_ttc'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Product\) and ''stock_reel'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Comparison operation "\>\=" between 0 and 0 is always true\.$#' - identifier: greaterOrEqual.alwaysTrue - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Loose comparison using \=\= between 1 and 1 will always evaluate to true\.$#' - identifier: equal.alwaysTrue - count: 2 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Method Product\:\:_get_stats\(\) should return \-1\|array\, array\\> but returns non\-empty\-array\, array\{string, \(float\|int\)\}\>\.$#' - identifier: return.type - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - 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/product.class.php - - - - message: '#^Property Product\:\:\$accountancy_code_buy \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$accountancy_code_sell \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$desiredstock \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$fk_default_bom \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$seuil_stock_alerte \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$sousprods \(array\\>\>\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/class/product.class.php - - - - message: '#^Property Product\:\:\$status_buy \(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: '#^Right side of && is always true\.$#' - identifier: booleanAnd.rightAlwaysTrue - 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: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -16560,12 +12624,6 @@ parameters: count: 6 path: ../../../htdocs/product/class/productcustomerprice.class.php - - - message: '#^Property ProductCustomerPrice\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/product/class/productcustomerprice.class.php - - message: '#^Property ProductCustomerPrice\:\:\$fk_product \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -16812,12 +12870,6 @@ parameters: count: 1 path: ../../../htdocs/product/inventory/card.php - - - message: '#^Property Inventory\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/product/inventory/card.php - - message: '#^Variable \$backtopageforcancel might not be defined\.$#' identifier: variable.undefined @@ -16926,12 +12978,6 @@ parameters: count: 1 path: ../../../htdocs/product/price_suppliers.php - - - message: '#^Variable \$result might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/price_suppliers.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -17202,12 +13248,6 @@ parameters: count: 2 path: ../../../htdocs/product/stock/class/productlot.class.php - - - message: '#^Property Productlot\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/product/stock/class/productlot.class.php - - message: '#^Property Productlot\:\:\$eol_date \(int\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -17352,30 +13392,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/massstockmove.php - - - message: '#^Variable \$datatoimport might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/massstockmove.php - - - - message: '#^Variable \$endatlinenb might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/massstockmove.php - - - - message: '#^Variable \$excludefirstline might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/massstockmove.php - - - - message: '#^Variable \$format might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/massstockmove.php - - message: '#^Variable \$producttmp might not be defined\.$#' identifier: variable.undefined @@ -17418,12 +13434,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/movement_list.php - - - message: '#^Variable \$idAlreadyReverse might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/movement_list.php - - message: '#^Variable \$listofobjectref might not be defined\.$#' identifier: variable.undefined @@ -17454,18 +13464,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/product.php - - - message: '#^Variable \$sortfield might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/product.php - - - - message: '#^Variable \$sortorder might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/product.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -17544,12 +13542,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/stocktransfer/class/stocktransferline.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_agenda.php - - message: '#^Property StockTransfer\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -17562,12 +13554,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - message: '#^Property StockTransfer\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -17580,12 +13566,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_card.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_contact.php - - message: '#^Property StockTransfer\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -17598,24 +13578,12 @@ parameters: count: 1 path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_contact.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../../htdocs/product/stock/stocktransfer/stocktransfer_list.php - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/stock/tpl/extrafields_add.tpl.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -17814,12 +13782,6 @@ parameters: count: 2 path: ../../../htdocs/projet/class/project.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/projet/class/project.class.php - - message: '#^Property Project\:\:\$ip \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -17886,18 +13848,6 @@ parameters: count: 3 path: ../../../htdocs/projet/class/task.class.php - - - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/projet/class/task.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/projet/class/task.class.php - - message: '#^Property Task\:\:\$budget_amount \(float\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -18180,12 +14130,6 @@ parameters: count: 1 path: ../../../htdocs/projet/tasks/contact.php - - - message: '#^Call to function method_exists\(\) with Task and ''fetchComments'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/projet/tasks/contact.php - - message: '#^Property Project\:\:\$budget_amount \(float\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -18204,12 +14148,6 @@ parameters: count: 1 path: ../../../htdocs/projet/tasks/document.php - - - message: '#^Call to function method_exists\(\) with Task and ''fetchComments'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/projet/tasks/document.php - - message: '#^Property Project\:\:\$budget_amount \(float\|string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -18222,12 +14160,6 @@ parameters: count: 1 path: ../../../htdocs/projet/tasks/document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/tasks/document.php - - message: '#^Call to function is_object\(\) with Form will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18468,12 +14400,6 @@ parameters: count: 1 path: ../../../htdocs/projet/tasks/time.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18492,24 +14418,12 @@ parameters: count: 1 path: ../../../htdocs/public/bookcal/bookcalAjax.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 11 - path: ../../../htdocs/public/bookcal/bookcalAjax.php - - message: '#^Variable \$user might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/public/bookcal/index.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/clicktodial/cidlookup.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18534,30 +14448,6 @@ parameters: count: 1 path: ../../../htdocs/public/demo/index.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/donations/donateurs_code.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/public/donations/donateurs_code.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18606,12 +14496,6 @@ parameters: count: 1 path: ../../../htdocs/public/eventorganization/subscriptionok.php - - - message: '#^Variable \$suffix might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/eventorganization/subscriptionok.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18744,12 +14628,6 @@ parameters: count: 1 path: ../../../htdocs/public/payment/newpayment.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/payment/newpayment.php - - message: '#^Variable \$invoice might not be defined\.$#' identifier: variable.undefined @@ -18828,24 +14706,12 @@ parameters: count: 1 path: ../../../htdocs/public/project/index.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/project/index.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/public/project/new.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/project/new.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18864,12 +14730,6 @@ parameters: count: 2 path: ../../../htdocs/public/project/suggestbooth.php - - - message: '#^Variable \$contact might not be defined\.$#' - identifier: variable.undefined - count: 10 - path: ../../../htdocs/public/project/suggestbooth.php - - message: '#^Variable \$emailcompany might not be defined\.$#' identifier: variable.undefined @@ -18888,12 +14748,6 @@ parameters: count: 2 path: ../../../htdocs/public/project/suggestbooth.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../../htdocs/public/project/suggestbooth.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18927,7 +14781,7 @@ parameters: - message: '#^Variable \$errors might not be defined\.$#' identifier: variable.undefined - count: 3 + count: 1 path: ../../../htdocs/public/project/suggestconference.php - @@ -18942,12 +14796,6 @@ parameters: count: 2 path: ../../../htdocs/public/project/suggestconference.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/public/project/suggestconference.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -18960,12 +14808,6 @@ parameters: count: 2 path: ../../../htdocs/public/project/viewandvote.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/project/viewandvote.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -19218,12 +15060,6 @@ parameters: count: 1 path: ../../../htdocs/public/users/view.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/public/users/view.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -19242,12 +15078,6 @@ parameters: count: 2 path: ../../../htdocs/public/webportal/tpl/hero-header-banner.tpl.php - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/public/webportal/tpl/login.tpl.php - - message: '#^Comparison operation "\>" between \-1 and 0 is always false\.$#' identifier: greater.alwaysFalse @@ -19272,84 +15102,18 @@ parameters: count: 2 path: ../../../htdocs/public/webportal/tpl/menu.tpl.php - - - message: '#^Path in include\(\) "\.\./\.\./\.\./\.\./main\.inc\.php" is not a file or it does not exist\.$#' - identifier: include.fileNotFound - count: 1 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 16 - path: ../../../htdocs/public/webportal/webportal.main.inc.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 1 path: ../../../htdocs/public/website/index.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/website/index.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/public/website/index.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/public/website/index.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 1 path: ../../../htdocs/public/website/javascript.js.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/public/website/javascript.js.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/public/website/javascript.js.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/public/website/javascript.js.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -19398,12 +15162,6 @@ parameters: count: 1 path: ../../../htdocs/reception/card.php - - - message: '#^Variable \$line might not be defined\.$#' - identifier: variable.undefined - count: 40 - path: ../../../htdocs/reception/card.php - - message: '#^Variable \$objectsrc might not be defined\.$#' identifier: variable.undefined @@ -19452,24 +15210,6 @@ parameters: count: 4 path: ../../../htdocs/reception/class/reception.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/reception/class/reception.class.php - - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/reception/class/reception.class.php - - - - message: '#^Property CommonObject\:\:\$shipping_method_id \(int\) 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 @@ -19680,12 +15420,6 @@ parameters: count: 1 path: ../../../htdocs/reception/list.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/recruitment/admin/public_interface.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -19848,12 +15582,6 @@ parameters: count: 1 path: ../../../htdocs/recruitment/class/recruitmentjobposition.class.php - - - message: '#^Property RecruitmentJobPosition\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -19920,12 +15648,6 @@ parameters: count: 2 path: ../../../htdocs/recruitment/recruitmentcandidature_card.php - - - message: '#^Property RecruitmentCandidature\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/recruitment/recruitmentcandidature_card.php - - message: '#^Property RecruitmentCandidature\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -19938,12 +15660,6 @@ parameters: count: 1 path: ../../../htdocs/recruitment/recruitmentcandidature_card.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/recruitment/recruitmentcandidature_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -19956,12 +15672,6 @@ parameters: count: 1 path: ../../../htdocs/recruitment/recruitmentcandidature_list.php - - - message: '#^Property RecruitmentJobPosition\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/recruitment/recruitmentjobposition_applications.php - - message: '#^Property RecruitmentJobPosition\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -19986,12 +15696,6 @@ parameters: count: 1 path: ../../../htdocs/recruitment/recruitmentjobposition_card.php - - - message: '#^Property RecruitmentJobPosition\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/recruitment/recruitmentjobposition_card.php - - message: '#^Property RecruitmentJobPosition\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -20004,12 +15708,6 @@ parameters: count: 1 path: ../../../htdocs/recruitment/recruitmentjobposition_document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/recruitment/recruitmentjobposition_document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -20028,12 +15726,6 @@ parameters: count: 1 path: ../../../htdocs/resource/card.php - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/resource/class/dolresource.class.php - - message: '#^Property Dolresource\:\:\$busy \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -20142,162 +15834,6 @@ parameters: count: 1 path: ../../../htdocs/salaries/card.php - - - message: '#^Call to function method_exists\(\) with \$this\(PaymentSalary\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(PaymentSalary\) and ''amount'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(PaymentSalary\) and ''fk_bank'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(PaymentSalary\) and ''fk_typepayment'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(PaymentSalary\) and ''fk_user_author'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Loose comparison using \=\= between '''' and ''nolink'' will always evaluate to false\.$#' - identifier: equal.alwaysFalse - count: 2 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$amount \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$fk_salary \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$fk_user_author \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$num_paiement \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Property PaymentSalary\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Result of \|\| is always false\.$#' - identifier: booleanOr.alwaysFalse - count: 2 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Strict comparison using \!\=\= between '''' and ''nolink'' will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 1 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Variable \$url in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 2 - path: ../../../htdocs/salaries/class/paymentsalary.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Salary\) and ''LibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Salary\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Salary\) and ''amount'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Salary\) and ''type_payment'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Method Salary\:\:getSommePaiement\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 2 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Property CommonObject\:\:\$alreadypaid \(float\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/salaries/class/salary.class.php - - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: ../../../htdocs/salaries/class/salary.class.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -20370,12 +15906,6 @@ parameters: count: 1 path: ../../../htdocs/societe/admin/societe.php - - - message: '#^Variable \$sql might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/societe/admin/societe.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -20448,12 +15978,6 @@ parameters: count: 1 path: ../../../htdocs/societe/card.php - - - message: '#^Property Societe\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/societe/card.php - - message: '#^Property Societe\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -20545,7 +16069,7 @@ parameters: path: ../../../htdocs/societe/class/societe.class.php - - message: '#^Property Contact\:\:\$roles \(array\\) does not accept non\-empty\-list\\.$#' + message: '#^Property Contact\:\:\$roles \(array\\|null\) does not accept non\-empty\-list\\.$#' identifier: assign.propertyType count: 1 path: ../../../htdocs/societe/class/societe.class.php @@ -20562,12 +16086,6 @@ parameters: count: 1 path: ../../../htdocs/societe/class/societe.class.php - - - message: '#^Property Societe\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/societe/class/societe.class.php - - message: '#^Property Societe\:\:\$fournisseur \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -20628,12 +16146,6 @@ parameters: count: 1 path: ../../../htdocs/societe/consumption.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/societe/document.php - - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -20730,12 +16242,6 @@ parameters: count: 1 path: ../../../htdocs/societe/price.php - - - message: '#^Variable \$parameters might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/societe/project.php - - message: '#^Variable \$db might not be defined\.$#' identifier: variable.undefined @@ -20886,12 +16392,6 @@ parameters: count: 6 path: ../../../htdocs/supplier_proposal/class/supplier_proposal.class.php - - - message: '#^Property SupplierProposal\:\:\$statut \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/supplier_proposal/class/supplier_proposal.class.php - - message: '#^Property SupplierProposalLine\:\:\$info_bits \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -20964,12 +16464,6 @@ parameters: count: 1 path: ../../../htdocs/supplier_proposal/note.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' identifier: variable.undefined @@ -21012,12 +16506,6 @@ parameters: count: 3 path: ../../../htdocs/takepos/freezone.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/takepos/genimg/index.php - - message: '#^Variable \$db might not be defined\.$#' identifier: variable.undefined @@ -21090,12 +16578,6 @@ parameters: count: 1 path: ../../../htdocs/takepos/pay.php - - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue - count: 1 - path: ../../../htdocs/takepos/pay.php - - message: '#^Variable \$keyforstripeterminalbank in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -21276,12 +16758,6 @@ parameters: count: 1 path: ../../../htdocs/ticket/class/ticket.class.php - - - message: '#^Property CommonObject\:\:\$ref \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ticket/class/ticket.class.php - - message: '#^Property Ticket\:\:\$category_code \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -21306,12 +16782,6 @@ parameters: count: 2 path: ../../../htdocs/ticket/class/ticket.class.php - - - message: '#^Property Ticket\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/ticket/class/ticket.class.php - - message: '#^Property Ticket\:\:\$fk_soc \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -21402,12 +16872,6 @@ parameters: count: 2 path: ../../../htdocs/ticket/class/ticket.class.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/ticket/document.php - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' identifier: variable.undefined @@ -21516,12 +16980,6 @@ parameters: count: 1 path: ../../../htdocs/user/class/user.class.php - - - message: '#^Property User\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: ../../../htdocs/user/class/user.class.php - - message: '#^Property User\:\:\$rights \(stdClass\) in empty\(\) is not falsy\.$#' identifier: empty.property @@ -21618,18 +17076,6 @@ parameters: count: 1 path: ../../../htdocs/user/class/usergroup.class.php - - - message: '#^Property CommonObject\:\:\$lastname \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/user/class/usergroup.class.php - - - - message: '#^Property UserGroup\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/user/class/usergroup.class.php - - message: '#^Property UserGroup\:\:\$name \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -21666,12 +17112,6 @@ parameters: count: 1 path: ../../../htdocs/user/document.php - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/user/document.php - - message: '#^Variable \$mc might not be defined\.$#' identifier: variable.undefined @@ -21948,12 +17388,6 @@ parameters: count: 1 path: ../../../htdocs/webhook/class/target.class.php - - - message: '#^Negated boolean expression is always true\.$#' - identifier: booleanNot.alwaysTrue - count: 1 - path: ../../../htdocs/webhook/class/target.class.php - - message: '#^Property Target\:\:\$status \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -21966,12 +17400,6 @@ parameters: count: 2 path: ../../../htdocs/webhook/class/target.class.php - - - message: '#^Property CommonObject\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/webhook/target_card.php - - message: '#^Variable \$soc might not be defined\.$#' identifier: variable.undefined @@ -21984,24 +17412,12 @@ parameters: count: 1 path: ../../../htdocs/webhook/target_list.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/webportal/admin/setup.php - - message: '#^Loose comparison using \=\= between ''auto'' and ''auto'' will always evaluate to true\.$#' identifier: equal.alwaysTrue count: 1 path: ../../../htdocs/webportal/class/context.class.php - - - message: '#^Offset 0 on non\-empty\-list\ in isset\(\) always exists and is not nullable\.$#' - identifier: isset.offset - count: 1 - path: ../../../htdocs/webportal/class/html.formcardwebportal.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -22128,12 +17544,6 @@ parameters: count: 2 path: ../../../htdocs/webportal/class/webportalpartnership.class.php - - - message: '#^Property Partnership\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - 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 @@ -22146,12 +17556,6 @@ parameters: count: 1 path: ../../../htdocs/webportal/class/webportalpropal.class.php - - - message: '#^Property Propal\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/webportal/class/webportalpropal.class.php - - message: '#^Strict comparison using \=\=\= between ''nolink'' and ''nolink'' will always evaluate to true\.$#' identifier: identical.alwaysTrue @@ -22200,12 +17604,6 @@ parameters: count: 4 path: ../../../htdocs/website/class/website.class.php - - - message: '#^Property Website\:\:\$entity \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: ../../../htdocs/website/class/website.class.php - - message: '#^Property Website\:\:\$fk_default_home \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -22314,12 +17712,6 @@ parameters: count: 1 path: ../../../htdocs/website/index.php - - - message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/website/index.php - - message: '#^Variable \$fileoldalias in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -22344,126 +17736,12 @@ parameters: count: 1 path: ../../../htdocs/website/samples/wrapper.php - - - message: '#^Variable \$conf might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/website/samples/wrapper.php - - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/website/samples/wrapper.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/website/samples/wrapper.php - - message: '#^Variable \$socid in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 1 path: ../../../htdocs/website/websiteaccount_card.php - - - message: '#^Call to function method_exists\(\) with \$this\(Workstation\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(Workstation\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Workstation\) and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with \$this\(Workstation\) and ''thirdparty'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with Workstation and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with Workstation and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with Workstation and ''label'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with Workstation and ''ref'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Call to function property_exists\(\) with Workstation and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Method Workstation\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - 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 - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Property Workstation\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/workstation/class/workstation.class.php - - - - message: '#^Property Workstation\:\:\$status \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../htdocs/workstation/workstation_card.php - - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/workstation/workstation_card.php - - - - message: '#^Variable \$upload_dir might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/workstation/workstation_document.php - - message: '#^Variable \$val might not be defined\.$#' identifier: variable.undefined @@ -22476,18 +17754,6 @@ parameters: count: 1 path: ../../../htdocs/workstation/workstation_list.php - - - message: '#^Left side of && is always false\.$#' - identifier: booleanAnd.leftAlwaysFalse - count: 3 - path: ../../../htdocs/zapier/class/api_zapier.class.php - - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: ../../../htdocs/zapier/class/api_zapier.class.php - - message: '#^Variable \$num in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -22524,42 +17790,12 @@ parameters: count: 2 path: ../../../scripts/emailings/mailing-send.php - - - message: '#^Variable \$statut might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../scripts/emailings/mailing-send.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue count: 1 path: ../../../scripts/emailings/reset-invalid-emails.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../scripts/members/sync_members_dolibarr2ldap.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../scripts/members/sync_members_ldap2dolibarr.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../scripts/members/sync_members_types_dolibarr2ldap.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../scripts/members/sync_members_types_ldap2dolibarr.php - - message: '#^Loose comparison using \=\= between ''product'' and ''product'' will always evaluate to true\.$#' identifier: equal.alwaysTrue diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 269459c26ad..1487921ea47 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -234,7 +234,7 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php PHP TCPDI: ---------- -Add file fpdf_tpl.php 1.2 +Add file fpdf_tpl.php 1.2.3 Add file tcpdi.php diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index df72494cba0..76c102dfc44 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -57,7 +57,7 @@ if (empty($argv[1])) { print "Usage: $script_file nbofrecord\n"; print "Usage: $script_file 100\n"; print "\n"; - exit(-1); + exit(1); } define('GEN_NUMBER_FACTURE', ((int) $argv[1]) ?? 1); diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index 2c8f3029368..ac939716a77 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -64,7 +64,7 @@ if (empty($argv[1])) { print "Usage: $script_file nbofrecord\n"; print "Usage: $script_file 100\n"; print "\n"; - exit(-1); + exit(1); } define('GEN_NUMBER_COMMANDE', ((int) $argv[1]) ?? 10); diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index efe665d0a6a..430ea5d4910 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -62,7 +62,7 @@ if (empty($argv[1])) { print "Usage: $script_file nbofrecord\n"; print "Usage: $script_file 100\n"; print "\n"; - exit(-1); + exit(1); } define('GEN_NUMBER_PRODUIT', ((int) $argv[1]) ?? 100); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index eef4392e7ab..ede61ee5220 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -60,7 +60,7 @@ if (empty($argv[1])) { print "Usage: $script_file nbofrecord\n"; print "Usage: $script_file 100\n"; print "\n"; - exit(-1); + exit(1); } define('GEN_NUMBER_PROPAL', ((int) $argv[1]) ?? 10); diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 496a944d279..daa1a7c0697 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -65,7 +65,7 @@ if (empty($argv[1])) { print "Usage: $script_file nbofrecord\n"; print "Usage: $script_file 100\n"; print "\n"; - exit(-1); + exit(1); } define('GEN_NUMBER_SOCIETE', ((int) $argv[1]) ?? 10); diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index 20032593de5..d6db523815f 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -71,12 +71,12 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) | print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n"; print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n"; print "\n"; - exit(-1); + exit(1); } if (! file_exists($filepath)) { print "Error: File ".$filepath." not found.\n"; print "\n"; - exit(-1); + exit(1); } $ret = $user->fetch('', 'admin'); diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index fe42a047df5..d5e465bf91c 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -71,12 +71,12 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) | print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "\n"; - exit(-1); + exit(1); } if (! file_exists($filepath)) { print "Error: File ".$filepath." not found.\n"; print "\n"; - exit(-1); + exit(1); } $ret = $user->fetch('', 'admin'); diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index a698b6f99e2..a3ac0e02133 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -71,12 +71,12 @@ if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) | print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; print "Usage: $script_file test myfilepath.csv 2 1002\n"; print "\n"; - exit(-1); + exit(1); } if (! file_exists($filepath)) { print "Error: File ".$filepath." not found.\n"; print "\n"; - exit(-1); + exit(1); } $ret=$user->fetch('', 'admin'); diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 32e68b81100..5783fbf1c6b 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -32,7 +32,7 @@ $path=__DIR__.'/'; // Test si mode batch if (substr($sapi_type, 0, 3) == 'cgi') { echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit(-1); + exit(1); } // Recupere root dolibarr @@ -187,13 +187,13 @@ if (empty($mode) || ! in_array($mode, array('test','confirm'))) { print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "option can be ".implode(',', array_keys($sqls))."\n"; - exit(-1); + exit(1); } if (empty($option)) { print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n"; - exit(-1); + exit(1); } if ($option != 'all') { $listofoptions=explode(',', $option); @@ -202,7 +202,7 @@ if ($option != 'all') { print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n"; - exit(-1); + exit(1); } } } @@ -211,7 +211,7 @@ if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date != print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; print "\n"; print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n"; - exit(-1); + exit(1); } if ($date == 'all') { diff --git a/dev/initdemo/mysqldump_dolibarr_22.0.0.sql b/dev/initdemo/mysqldump_dolibarr_22.0.0.sql index 9353f1ce11e..f47cb8ee1c7 100644 --- a/dev/initdemo/mysqldump_dolibarr_22.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_22.0.0.sql @@ -65051,7 +65051,7 @@ INSERT INTO `llx_const` VALUES (11890,'MAIN_AGENDA_ACTIONAUTO_USER_CREATE',1,'1','chaine',0,'','2023-03-01 16:57:33'), (11891,'MAIN_AGENDA_ACTIONAUTO_USER_MODIFY',1,'1','chaine',0,'','2023-03-01 16:57:33'), (11892,'MAIN_AGENDA_ACTIONAUTO_USER_DELETE',1,'1','chaine',0,'','2023-03-01 16:57:33'), -(11893,'MAIN_AGENDA_ACTIONAUTO_USER_NEW_PASSWORD',1,'dolcrypt:AES-256-CTR:9eebc9ac2c57a4ec:ww==','chaine',0,'','2023-03-01 16:57:33'), +(11893,'MAIN_AGENDA_ACTIONAUTO_USER_NEW_PASSWORD',1,'1','chaine',0,'','2023-03-01 16:57:33'), (11894,'MAIN_AGENDA_ACTIONAUTO_USER_ENABLEDISABLE',1,'1','chaine',0,'','2023-03-01 16:57:33'), (11895,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2023-03-01 16:57:33'), (11896,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2023-03-01 16:57:33'), @@ -65205,7 +65205,6 @@ INSERT INTO `llx_const` VALUES (14411,'MARKETPLACE_BUYER_ORDER_CONFIRMATION_TEMPLATE',1,'-1','chaine',0,'','2025-02-05 14:08:06'), (14412,'MARKETPLACE_SELLERS_ORDER_CONFIRMATION_TEMPLATE',1,'-1','chaine',0,'','2025-02-05 14:08:06'), (14413,'MARKETPLACE_MINIMUM_PAYOUT_AMOUNT',1,'50','chaine',0,'','2025-02-05 14:08:06'), -(14417,'MARKETPLACE_SECRET_KEY',1,'dolcrypt:AES-256-CTR:a113efb19906f2be:q6ZG+E22cA==','chaine',0,'','2025-02-05 14:09:55'), (14459,'MARKETPLACE_PAYMENT_IN_FRAME',1,'1','chaine',0,'','2025-02-05 14:33:21'), (14491,'HELLOASSO_BANK_ACCOUNT_FOR_PAYMENTS',1,'6','chaine',0,'','2025-02-06 12:52:19'), (14521,'MAIN_MAIL_SENDMODE_PASSWORDRESET',1,'default','chaine',0,'','2025-02-12 18:07:29'), @@ -65251,7 +65250,7 @@ INSERT INTO `llx_const` VALUES (15001,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'','2025-03-03 02:52:32'), (15002,'PROPOSAL_FREE_TEXT',1,'Ceci est un lien','chaine',0,'','2025-03-03 02:52:32'), (15004,'PDF_SECURITY_ENCRYPTION',1,'0','chaine',1,'','2025-03-03 02:53:28'), -(15007,'MARKETPLACE_PUBLIC_API_KEY',1,'dolcrypt:AES-256-CTR:d515f8d303aad816:+32sG1DvuxkMOYlMzFOY6Y1VhKf5r+dvMfz2e+6EjHU=','chaine',0,'','2025-03-03 16:22:48'), +(15007,'MARKETPLACE_PUBLIC_API_KEY',1,'demokey','chaine',0,'','2025-03-03 16:22:48'), (15011,'MAIN_ENABLE_COMMUNITY_REPO',1,'1','chaine',1,'','2025-03-03 16:54:48'), (15020,'MAIN_ENABLE_DOLISTORE',1,'0','chaine',1,'','2025-03-04 22:03:12'), (15161,'MAIN_MODULE_OPENIDCONNECT',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\",\"lastactivationversion\":\"dolibarr\"}','2025-03-06 15:18:21'), @@ -65304,7 +65303,7 @@ INSERT INTO `llx_const` VALUES (15630,'MULTICURRENCY_APP_ID',1,'knJn9aj77LqcGtHp9m6rRWB5iD1yhfRO','chaine',0,'','2025-03-21 12:43:49'), (15726,'EMAILING_USE_ADVANCED_SELECTOR',1,'1','chaine',0,'','2025-03-25 11:08:47'), (15731,'CONTRACT_ALLOW_ONLINESIGN',1,'0','chaine',0,'','2025-03-25 12:47:09'), -(15746,'MULTICURRENCY_APP_KEY',1,'dolcrypt:AES-256-CTR:a972ff0c9e92c932:dqOrWexGkIENOk0Fen4hKMCN+jxY2ou0EDwmV1pk2uQ=','chaine',0,'','2025-03-25 15:03:23'), +(15746,'MULTICURRENCY_APP_KEY',1,'demokey','chaine',0,'','2025-03-25 15:03:23'), (15747,'MULTICURRENCY_APP_ENDPOINT',1,'https://api.apilayer.com/currency_data/live?base=__MULTICURRENCY_APP_SOURCE__','chaine',0,'','2025-03-25 15:03:23'), (15752,'MAIN_AGENDA_ACTIONAUTO_COMPANY_RIB_CREATE',1,'1','chaine',0,NULL,'2025-03-25 19:50:16'), (15753,'MAIN_AGENDA_ACTIONAUTO_COMPANY_RIB_MODIFY',1,'1','chaine',0,NULL,'2025-03-25 19:50:16'), @@ -65447,12 +65446,12 @@ INSERT INTO `llx_const` VALUES (17506,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL','chaine',0,'','2025-04-03 18:15:02'), (17586,'FACTURE_ADDON',1,'mod_facture_mars','chaine',0,'','2025-04-05 14:25:19'), (17777,'AI_API_SERVICE',1,'mistral','chaine',0,'','2025-04-07 23:24:36'), -(17778,'AI_API_CHATGPT_KEY',1,'dolcrypt:AES-256-CTR:9613a045bab6c491:GZp61Q3TMSMF/iTVCl/0QXXkGcMsTJetGBR5Zy6nLac=','chaine',0,'','2025-04-07 23:24:36'), +(17778,'AI_API_CHATGPT_KEY',1,'demokey','chaine',0,'','2025-04-07 23:24:36'), (17779,'AI_API_CHATGPT_URL',1,'https://api.openai.com/v1/','chaine',0,'','2025-04-07 23:24:36'), (17780,'AI_API_GROQ_URL',1,'https://api.groq.com/openai/','chaine',0,'','2025-04-07 23:24:36'), -(17781,'AI_API_MISTRAL_KEY',1,'dolcrypt:AES-256-CTR:1abe518475f89cfa:LNtWUSvYyIf8LQ/JEtpuu2ZrorjJMUxRFZG4VmmEn7o=','chaine',0,'','2025-04-07 23:24:36'), +(17781,'AI_API_MISTRAL_KEY',1,'demokey','chaine',0,'','2025-04-07 23:24:36'), (17782,'AI_API_MISTRAL_URL',1,'https://api.mistral.ai/v1/','chaine',0,'','2025-04-07 23:24:36'), -(17783,'AI_API_CUSTOM_KEY',1,'dolcrypt:AES-256-CTR:9733d785d0113ed2:+KXzk7ILKPq99LL2g9dpxGlprEWAScO26jEeFnpJBxQ=','chaine',0,'','2025-04-07 23:24:36'), +(17783,'AI_API_CUSTOM_KEY',1,'demokey','chaine',0,'','2025-04-07 23:24:36'), (17784,'AI_API_CUSTOM_URL',1,'https://mydomainofapi.com/v1','chaine',0,'','2025-04-07 23:24:36'), (17788,'SOCIETE_RIB_ALLOW_ONLINESIGN',1,'1','chaine',0,'','2025-04-08 08:59:48'), (17803,'SOCIETE_ENABLE_PUBLIC',1,'1','chaine',1,'','2025-04-08 10:55:06'), @@ -65506,7 +65505,7 @@ INSERT INTO `llx_const` VALUES (18204,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2025-04-16 19:50:19'), (18205,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2025-04-16 19:50:19'), (18206,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2025-04-16 19:50:19'), -(18234,'MAIN_MODULE_DOLISTORE_API_KEY',1,'dolcrypt:AES-256-CTR:d4169f5ecebe9852:mSXcyJujXRYwvP1DmsaFgevA','chaine',1,'','2025-04-17 10:04:08'), +(18234,'MAIN_MODULE_DOLISTORE_API_KEY',1,'dolistorepublicapi','chaine',1,'','2025-04-17 10:04:08'), (18241,'PROJET_VISIBILITY',1,'0','chaine',0,'','2025-04-18 11:17:47'), (18242,'PROJECT_ENABLE_PUBLIC',1,'1','chaine',0,'','2025-04-18 11:17:47'), (18243,'PROJECT_DEFAULT_OPPORTUNITY_STATUS_FOR_ONLINE_LEAD',1,'-1','chaine',0,'','2025-04-18 11:17:47'), @@ -65517,7 +65516,7 @@ INSERT INTO `llx_const` VALUES (18256,'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT',1,'34','chaine',0,'','2025-04-18 11:21:49'), (18257,'SERVICE_BOOTH_LOCATION',1,'0','chaine',0,'','2025-04-18 11:21:49'), (18258,'SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION',1,'0','chaine',0,'','2025-04-18 11:21:49'), -(18260,'EVENTORGANIZATION_SECUREKEY',1,'dolcrypt:AES-256-CTR:83f6e644d47eaf29:GIDq0w==','chaine',0,'','2025-04-18 13:46:59'), +(18260,'EVENTORGANIZATION_SECUREKEY',1,'demokey','chaine',0,'','2025-04-18 13:46:59'), (18271,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'','2025-04-21 12:59:49'), (18273,'RESOURCE_USED_IN_EVENT_CHECK',1,'1','chaine',0,'','2025-04-22 17:20:40'), (18275,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2025-04-24 12:08:27'), @@ -65556,8 +65555,6 @@ INSERT INTO `llx_const` VALUES (18588,'TAWKTO_WIDGET_ID',1,'123','chaine',0,'','2025-05-12 08:36:50'), (18678,'SELLYOURSAAS_ALLOW_SELECTION_OF_SERVICE',1,'1','chaine',0,'','2025-05-26 12:57:33'), (18719,'SELLYOURSAAS_ALLOW_RESELLER_PROGRAM',1,'1','chaine',0,'','2025-05-26 13:41:52'), -(18722,'STRIPE_TEST_PUBLISHABLE_KEY',1,'dolcrypt:AES-256-CTR:d484ce93b5b8497d:T5UVYovfd4RjjYBmTt7Xipdly/dt5R7A/7TwBytAV6E=','chaine',0,'','2025-05-26 15:26:42'), -(18723,'STRIPE_TEST_SECRET_KEY',1,'dolcrypt:AES-256-CTR:eebc90c2ac9810a9:87fh2hsZr7l+dExy/ngsDP25FaoEkRfHkjdqKGulFBU=','chaine',0,'','2025-05-26 15:26:42'), (18724,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2025-05-26 15:26:42'), (18725,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'0','chaine',0,'','2025-05-26 15:26:42'), (18726,'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS',1,'0','chaine',0,'','2025-05-26 15:26:42'), @@ -65824,12 +65821,12 @@ LOCK TABLES `llx_contrat_extrafields` WRITE; /*!40000 ALTER TABLE `llx_contrat_extrafields` DISABLE KEYS */; INSERT INTO `llx_contrat_extrafields` VALUES (1,'2023-01-19 12:39:56',2,NULL,NULL,NULL,'done',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(5,'2025-01-03 14:13:54',8,NULL,'DOLICLOUD','testldr1-ABC','processing','127.0.0.1','2025-01-03 15:13:54',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 15:13:54',NULL,NULL,NULL,NULL,NULL,'testldr1d.with1.home.lan','osuo724k4hqa','dolcrypt:AES-256-CTR:ce01e4a8ade3c2ee:Rn1kmDfhbw0Eb8zpBI8=','0','testldr1d.with1.home.lan','dbntq7Wk89Mt','3306','dbuZe76P3B70','dolcrypt:AES-256-CTR:e0775c31971de7f3:YsE0Bi6lWG63zd537qc=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(6,'2025-01-03 14:17:40',9,NULL,'DOLICLOUD','testldr1-ABC','processing','127.0.0.1','2025-01-03 15:17:40',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 15:17:40',NULL,NULL,NULL,NULL,NULL,'testldre.with1.home.lan','osuky642i38n','dolcrypt:AES-256-CTR:402192d99e39c190:5DrzVbVS5kac7ZQUchU=','0','testldre.with1.home.lan','dbnd3X892MlO','3306','dbuCbWmMi7O8','dolcrypt:AES-256-CTR:b22360d10ff565a0:DXpgecqzOn7X/3PQCo0=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(7,'2025-03-25 23:57:06',7,NULL,'DOLICLOUD','testldr1b-ABC','undeployed','127.0.0.1','2025-01-03 15:08:56',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-23 15:08:56','2025-01-03 15:26:46','127.0.0.1',NULL,NULL,NULL,'testldr1c.with1.home.lan','osu6viclw5if','dolcrypt:AES-256-CTR:281a87e3e9c5fccb:O/N7kTAeXiZaHqlEupE=','0','testldr1c.with1.home.lan','dbnrC5ydd7GC','3306','dbub5pLDMaTw','dolcrypt:AES-256-CTR:2e4a79eda1bf538a:PS7p579ZNsDQAycuq8o=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(8,'2025-01-03 14:26:46',5,NULL,'DOLICLOUD','testldr1-ABC','undeployed','127.0.0.1','2025-01-03 14:59:56',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 14:59:56','2025-01-03 15:26:46','127.0.0.1',NULL,NULL,NULL,'testldr1.with1.home.lan','osu07jp64r9z','dolcrypt:AES-256-CTR:d94d86baf2f8483b:Op7TNgxhUwrSgbilZDo=','0','testldr1.with1.home.lan','dbnL4N55fzF6','3306','dbuH73bA3QfX','dolcrypt:AES-256-CTR:535b648bbae2f12a:VEc+yVQFXPbxOqhIItQ=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(9,'2025-03-25 21:53:24',6,NULL,'DOLICLOUD','testldr1-ABC','undeployed','127.0.0.1','2025-01-03 15:05:10',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2026-01-19 15:05:10','2025-01-03 15:27:11','127.0.0.1',NULL,NULL,NULL,'testldr1b.with1.home.lan','osu7xkedfm24','dolcrypt:AES-256-CTR:fa3d910f3fbfdad2:o+C4Ksn2W5veGS5R5Ag=','0','testldr1b.with1.home.lan','dbnVmeQT2M8i','3306','dbuK7VsLk5c8','dolcrypt:AES-256-CTR:ccb4d385381f4b4b:lDR/2Y6QjlNt3onLr3U=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(10,'2025-01-28 16:39:40',10,NULL,'DOLICLOUD','Azerty01','processing','127.0.0.1','2025-01-28 17:39:40',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-02-12 17:39:40',NULL,NULL,NULL,NULL,NULL,'aaa.with1.home.lan','osuy6m0f5xtl','dolcrypt:AES-256-CTR:54fed010c0ce1d1c:8eXkLuQl7gNbC9RZEPM=','0','aaa.with1.home.lan','dbnSE8YB6jGm','3306','dbu8MhF1Dwcl','dolcrypt:AES-256-CTR:44f9f66acc719394:Bi7LNv+Vf6cf2ySF2aw=',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(5,'2025-01-03 14:13:54',8,NULL,'DOLICLOUD','testldr1-ABC','processing','127.0.0.1','2025-01-03 15:13:54',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 15:13:54',NULL,NULL,NULL,NULL,NULL,'testldr1d.with1.home.lan','osuo724k4hqa','demokey','0','testldr1d.with1.home.lan','dbntq7Wk89Mt','3306','dbuZe76P3B70','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(6,'2025-01-03 14:17:40',9,NULL,'DOLICLOUD','testldr1-ABC','processing','127.0.0.1','2025-01-03 15:17:40',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 15:17:40',NULL,NULL,NULL,NULL,NULL,'testldre.with1.home.lan','osuky642i38n','demokey','0','testldre.with1.home.lan','dbnd3X892MlO','3306','dbuCbWmMi7O8','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(7,'2025-03-25 23:57:06',7,NULL,'DOLICLOUD','testldr1b-ABC','undeployed','127.0.0.1','2025-01-03 15:08:56',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-23 15:08:56','2025-01-03 15:26:46','127.0.0.1',NULL,NULL,NULL,'testldr1c.with1.home.lan','osu6viclw5if','demokey','0','testldr1c.with1.home.lan','dbnrC5ydd7GC','3306','dbub5pLDMaTw','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(8,'2025-01-03 14:26:46',5,NULL,'DOLICLOUD','testldr1-ABC','undeployed','127.0.0.1','2025-01-03 14:59:56',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-01-18 14:59:56','2025-01-03 15:26:46','127.0.0.1',NULL,NULL,NULL,'testldr1.with1.home.lan','osu07jp64r9z','demokey','0','testldr1.with1.home.lan','dbnL4N55fzF6','3306','dbuH73bA3QfX','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(9,'2025-03-25 21:53:24',6,NULL,'DOLICLOUD','testldr1-ABC','undeployed','127.0.0.1','2025-01-03 15:05:10',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2026-01-19 15:05:10','2025-01-03 15:27:11','127.0.0.1',NULL,NULL,NULL,'testldr1b.with1.home.lan','osu7xkedfm24','demokey','0','testldr1b.with1.home.lan','dbnVmeQT2M8i','3306','dbuK7VsLk5c8','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(10,'2025-01-28 16:39:40',10,NULL,'DOLICLOUD','Azerty01','processing','127.0.0.1','2025-01-28 17:39:40',NULL,'127.0.0.1',NULL,NULL,NULL,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 - fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',NULL,'2025-02-12 17:39:40',NULL,NULL,NULL,NULL,NULL,'aaa.with1.home.lan','osuy6m0f5xtl','demokey','0','aaa.with1.home.lan','dbnSE8YB6jGm','3306','dbu8MhF1Dwcl','demokey',NULL,NULL,NULL,'Europe/Paris',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (13,'2025-06-26 17:54:04',14,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_contrat_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -78962,10 +78959,10 @@ INSERT INTO `llx_societe_rib` VALUES (2,1,'ban',10,'2023-02-06 14:28:24','2025-04-08 08:59:57','NLTechno','aaaa','','','','','LIABLT2XXXX',NULL,'FR76 1223 9000 0740 4608 0100 091',NULL,'','','',1,NULL,NULL,NULL,'sepamandate','societe/10/Mandat SEPA 10-NLTechno-UMR-CU1212-0005-2-1675704504.pdf','UMR-CU1212-0005-2-1675704504',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL), (3,1,'ban',33,'2023-02-21 21:33:04','2023-02-22 00:33:04','aaainlux','aaa','','','','','aaa',NULL,'aaa',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'UMR-2302212133-3-CU2212-00026',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL), (4,1,'card',33,'2023-02-21 22:26:00','2023-02-22 01:26:00','aa','',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,'aa',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'',1,2032,'FR',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(5,1,'ban',1,'2023-03-08 06:41:28','2025-06-26 22:04:48','Indian SAS RIB','dfgdfgfd','','','','','LIABLT2XXXX',NULL,'dolcrypt:AES-256-CTR:6c5e3bcfba8c0873:sGWo/KYhvG8bw/oDC1uxal95cpvQLuKdzDGk86DYpdV2',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'RUM-2303080641-5-CU1212-0007',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL), -(6,1,'ban',39,'2025-01-03 16:11:35','2025-01-03 15:11:37','test','test','','','','','LIABLT2XXXX',NULL,'dolcrypt:AES-256-CTR:d0fbb5f8f1882d9f:QruV8ONPL6fQK4ew6aDzI4VSdBU=',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'8ANKF3PEOTZ53TR4','2025-01-03','RCUR',NULL,NULL,'sepa_debit',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'pm_1QdCXECxfvxGwHdwPnN4agJk',0,'mandate_1QdCXECxfvxGwHdwIdo2yLTd',NULL,'cus_test@sk_test_xxx',NULL,NULL,NULL,'StripeTest',NULL), -(7,1,'ban',39,'2025-01-03 16:21:39','2025-01-03 15:21:56','Bank Testldr1','test2','','','','','',NULL,'dolcrypt:AES-256-CTR:2143648571f74d32:ohNxpDnLCHNMP97+7XVn5i7zLNc=',NULL,'','','',0,NULL,NULL,NULL,NULL,NULL,'SDB8CASXISKK0R7L','2025-01-03','FRST',NULL,NULL,'sepa_debit',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'pm_1QdChDCxfvxGwHdw57zEzGtC',1,'mandate_1QdChDCxfvxGwHdwvIt0244D',NULL,'cus_test@sk_test_xxx',NULL,NULL,NULL,'StripeTest',NULL), -(9,1,'ban',62,'2025-06-26 21:41:42','2025-06-26 21:41:42','Banque ddd','Banque ddd','','','','','aaa',NULL,'dolcrypt:AES-256-CTR:ef6a60cae760f8d1:Q8YW',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'RUM-2506262141-9-CU2506-0003',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL); +(5,1,'ban',1,'2023-03-08 06:41:28','2025-06-26 22:04:48','Indian SAS RIB','dfgdfgfd','','','','','LIABLT2XXXX',NULL,'val1',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'RUM-2303080641-5-CU1212-0007',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL), +(6,1,'ban',39,'2025-01-03 16:11:35','2025-01-03 15:11:37','test','test','','','','','LIABLT2XXXX',NULL,'val2',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'8ANKF3PEOTZ53TR4','2025-01-03','RCUR',NULL,NULL,'sepa_debit',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'pm_1QdCXECxfvxGwHdwPnN4agJk',0,'mandate_1QdCXECxfvxGwHdwIdo2yLTd',NULL,'cus_test@sk_test_xxx',NULL,NULL,NULL,'StripeTest',NULL), +(7,1,'ban',39,'2025-01-03 16:21:39','2025-01-03 15:21:56','Bank Testldr1','test2','','','','','',NULL,'val3',NULL,'','','',0,NULL,NULL,NULL,NULL,NULL,'SDB8CASXISKK0R7L','2025-01-03','FRST',NULL,NULL,'sepa_debit',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'pm_1QdChDCxfvxGwHdw57zEzGtC',1,'mandate_1QdChDCxfvxGwHdwvIt0244D',NULL,'cus_test@sk_test_xxx',NULL,NULL,NULL,'StripeTest',NULL), +(9,1,'ban',62,'2025-06-26 21:41:42','2025-06-26 21:41:42','Banque ddd','Banque ddd','','','','','aaa',NULL,'val4',NULL,'','','',1,NULL,NULL,NULL,NULL,NULL,'RUM-2506262141-9-CU2506-0003',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,'',1,NULL,NULL,'',NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_societe_rib` ENABLE KEYS */; UNLOCK TABLES; @@ -79918,13 +79915,13 @@ CREATE TABLE `llx_user` ( LOCK TABLES `llx_user` WRITE; /*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; INSERT INTO `llx_user` VALUES -(1,'2012-07-08 13:20:11','2025-03-13 09:13:00',NULL,NULL,'aeinstein',0,'','',NULL,1,NULL,NULL,'$2y$10$lIvMb5RJjxqmd6OxnZLqvuLZGOXj3gxIQhZQUqcY8fQTyh0cTtUpa',NULL,'dolcrypt:AES-256-CTR:10fbb3f05469219f:vCpWlcfDIoN6yOj2yGQ1WsOCfB8i2cjEKOAhNzPwf/A=','Einstein','Albert','','123456789','','','','aeinstein@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,'',0,NULL,NULL,NULL,44.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), +(1,'2012-07-08 13:20:11','2025-03-13 09:13:00',NULL,NULL,'aeinstein',0,'','',NULL,1,NULL,NULL,'$2y$10$lIvMb5RJjxqmd6OxnZLqvuLZGOXj3gxIQhZQUqcY8fQTyh0cTtUpa',NULL,'demokey','Einstein','Albert','','123456789','','','','aeinstein@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,'',0,NULL,NULL,NULL,44.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), (2,'2012-07-08 13:54:48','2025-05-05 12:08:56',NULL,NULL,'demo',1,'','',NULL,1,NULL,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Doe','David','Trainee','09123123','','','','daviddoe@example.com','','[]','',0,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,NULL,NULL,NULL,35.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), (3,'2012-07-11 16:18:59','2025-05-05 14:48:17',NULL,NULL,'pcurie',1,'','',NULL,1,NULL,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','','[]','',0,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'dolicloud_avent_saas.png',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,NULL,NULL,NULL,39.00000000,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), (4,'2015-01-23 17:52:27','2025-05-05 14:48:18',NULL,NULL,'bbookkeeper',1,'','',NULL,1,NULL,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','bbookkeeper@example.com','','{\"skype\":\"skypebbookkeeper\"}','',0,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,NULL,NULL,NULL,16.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), (10,'2017-10-03 11:47:41','2023-03-15 15:07:13',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Curie','Marie','','','','','','mcurie@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,NULL,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (11,'2017-10-05 09:07:52','2023-03-15 15:07:13',NULL,NULL,'zzeceo',1,NULL,'',NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Zeceo','Zack','President - CEO','','','','','zzeceo@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,NULL,0,NULL,NULL,NULL,39.00000000,NULL,'','2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), -(12,'2017-10-05 09:09:46','2025-03-27 23:27:43',NULL,12,'admin',0,'','',NULL,1,NULL,NULL,'$2y$10$MiDs0GVn0ksYbOHw8XgAf.oEihYvLI0ZYd0PSVq7/6ret6gifWSh6',NULL,'dolcrypt:AES-256-CTR:10fbb3f05469219f:5nJ/t5SbepR61dTsy2pTYfGEZS5j+bj3Ds0FN0OVM5M=','Adminson','Alice','Admin Technical','','','','','laurent@destailleur.fr','','[]','Alice - 123',1,NULL,NULL,NULL,'kmlk','2025-07-10 13:00:34','2025-07-09 16:26:18',NULL,'',1,NULL,NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,2700.00000000,NULL,NULL,39.00000000,'woman','',NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,NULL,'127.0.0.1','127.0.0.1','2025-03-27 23:27:43',NULL,NULL,'',NULL,'2025-03-27 23:27:38',NULL), +(12,'2017-10-05 09:09:46','2025-03-27 23:27:43',NULL,12,'admin',0,'','',NULL,1,NULL,NULL,'$2y$10$MiDs0GVn0ksYbOHw8XgAf.oEihYvLI0ZYd0PSVq7/6ret6gifWSh6',NULL,'demokey','Adminson','Alice','Admin Technical','','','','','laurent@destailleur.fr','','[]','Alice - 123',1,NULL,NULL,NULL,'kmlk','2025-07-10 13:00:34','2025-07-09 16:26:18',NULL,'',1,NULL,NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,2700.00000000,NULL,NULL,39.00000000,'woman','',NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,NULL,'127.0.0.1','127.0.0.1','2025-03-27 23:27:43',NULL,NULL,'',NULL,'2025-03-27 23:27:38',NULL), (13,'2017-10-05 21:29:35','2025-04-15 13:30:44',NULL,NULL,'ccommercy',1,'','',NULL,1,NULL,NULL,'$2y$10$KTaKE0NyYyJSCogsxtwR.eADst17XYMrOWlsFfVLR60IbjANIVLHK',NULL,NULL,'Commercy','Coraly','Commercial leader','','','','','ccommercy@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,'',0,1890.00000000,NULL,NULL,25.00000000,'woman','','2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,NULL), (14,'2017-10-05 21:33:33','2023-03-15 15:07:36',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Scientol','Sam','Scientist leader','','','','','sscientol@example.com','','[]','',0,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,NULL,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), (16,'2017-10-05 22:47:52','2025-01-30 14:37:22',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Charle1','Commerson','Sale representative','','','','','ccommerson@example.com','','[]','',0,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',0,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,NULL,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), @@ -80120,7 +80117,7 @@ INSERT INTO `llx_user_param` VALUES (12,1,'MAIN_BOXES_11','1'), (12,1,'MAIN_BOXES_2','1'), (12,1,'MAIN_BOXES_27','1'), -(12,1,'MAIN_LANG_DEFAULT','fr_FR'), +(12,1,'MAIN_LANG_DEFAULT','auto'), (12,1,'MAIN_SELECTEDFIELDS_/dolibarr_4.0/htdocs/adherents/list.php','d.zip,d.ref,d.lastname,d.firstname,d.company,d.login,d.morphy,t.libelle,d.email,d.datefin,d.statut,'), (12,1,'MAIN_SELECTEDFIELDS_accountancycustomerlist','l.rowid,f.ref,f.datef,p.ref,l.total_ht,l.tva_tx,s.nom,co.label,s.tva_intra,aa.data_suggest,aa.account_number,'), (12,1,'MAIN_SELECTEDFIELDS_accountancysupplierlines','l.rowid,f.ref,f.datef,p.ref,l.description,l.total_ht,l.tva_tx,s.nom,co.label,s.tva_intra,aa.account_number,'), diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index 530afb7a3e5..b147e854b81 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -84,7 +84,7 @@ if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n"; print "Return code: 0 if success, <>0 if error\n"; print "Warning, this script may take a long time.\n"; - exit(-1); + exit(1); } @@ -106,7 +106,7 @@ $connection = ssh2_connect($server, 22); if ($connection) { if (!@ssh2_auth_password($connection, $login, $password)) { dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR); - exit(-5); + exit(5); } else { //$stream = ssh2_exec($connection, '/usr/bin/php -i'); /* @@ -143,7 +143,7 @@ if ($connection) { } } else { print 'Failed to connect to ssh2 to '.$server; - exit(-6); + exit(6); } diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index 98e33835589..d0937a5333a 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -72,7 +72,7 @@ print "Update dates to current year for database name = ".$db->database_name."\n if (empty($confirm)) { print "Usage: $script_file confirm\n"; print "Return code: 0 if success, <>0 if error\n"; - exit(-1); + exit(1); } diff --git a/dev/setup/apache/virtualhost b/dev/setup/apache/virtualhost index 798031fb404..ae2916bb017 100644 --- a/dev/setup/apache/virtualhost +++ b/dev/setup/apache/virtualhost @@ -2,33 +2,33 @@ #php_admin_value sendmail_path "/usr/sbin/sendmail -t -i" #php_admin_value mail.force_extra_parameters "-f postmaster@mydomain.com" #php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f postmaster@mydomain.com" - + php_admin_value open_basedir /tmp/:/home/.../htdocs:/home/.../dolibarr_documents: - + # Add this to use a custom apparmor profile when using apache php handler AADefaultHatName sellyoursaas-instances - + # The URLs of the web site ServerName myvirtualalias ServerAlias myvirtualalias - + UseCanonicalName On - + KeepAlive On KeepAliveTimeout 5 MaxKeepAliveRequests 20 - + AddDefaultCharset UTF-8 - - + + # Detect if we are using DoliDroid #SetEnvIf User-Agent DoliDroid dolidroid - - + + # The directory and permissions for the web site DocumentRoot "/home/.../htdocs" @@ -36,24 +36,19 @@ Options -Indexes -MultiViews +FollowSymLinks -ExecCGI Require all granted - # To restrict access by a HTTP basic auth + # To restrict access by a HTTP basic auth #AuthType Basic #AuthName "Authenticate to backoffice" #AuthUserFile /etc/apache2/.htpasswd #require valid-user - # Leaving /public and /api, /dav, .well_known but also wrappers for document, viewimage and public json/img accessible to everyone + # Leaving /public, /dav and /.well_known directory accessible to everyone AuthType None Satisfy any Require all granted - - AuthType None - Satisfy any - Require all granted - AuthType None Satisfy any @@ -64,6 +59,14 @@ Satisfy any Require all granted + + # You may also want to allow access to everyone to wrappers for api, document, viewimage, manifest and public json/img + # but if you can avoid it, it is better. + + AuthType None + Satisfy any + Require all granted + AuthType None Satisfy any @@ -71,11 +74,11 @@ - # Log directives + # Log directives ErrorLog /var/log/apache2/myvirtualalias_error_log TransferLog /var/log/apache2/myvirtualalias_access_log - - + + # Compress is done on resources of type php pages, text file export, css and javascript AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript AddType text/javascript .jgz @@ -92,21 +95,21 @@ ExpiresByType text/javascript A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType application/javascript A2592000 - - + + # To enable the SSL if the certificate file exists SSLEngine On - + # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem - + #RewriteEngine on #RewriteCond %{SERVER_PORT} ^80$ #RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R] - + diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index cac680769c5..908365eb98c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -28,8 +28,15 @@ - + @@ -134,7 +141,7 @@ - + diff --git a/dev/setup/git/README.md b/dev/setup/git/README.md new file mode 100644 index 00000000000..b42b98c8091 --- /dev/null +++ b/dev/setup/git/README.md @@ -0,0 +1,5 @@ +To enable a default git commit template: +git config --local commit.template gitmessage + +To enable the git hook pre-commit, to make CI validation at commit: +See the file pre-commit/README.md diff --git a/.gitmessage b/dev/setup/git/gitmessage similarity index 100% rename from .gitmessage rename to dev/setup/git/gitmessage diff --git a/dev/setup/git/hooks/msg-commit b/dev/setup/git/hooks/msg-commit new file mode 100755 index 00000000000..8a1fc7e37e8 --- /dev/null +++ b/dev/setup/git/hooks/msg-commit @@ -0,0 +1,12 @@ +#!/bin/sh +# Hook to force a prefix on commits + +commit_msg_file=$1 +first_line=$(head -n1 "$commit_msg_file") + +if echo "$first_line" | grep -Eqi '^(QUAL|SEC|PERF|FIX|CLOSE|NEW|Clean code|Debug[CSS)'; then + exit 0 +else + echo "The commit message must start with QUAL, SEC, PERF, FIX, CLOSE, NEW, Clean code, Debug, CSS ..." + exit 1 +fi diff --git a/dev/setup/git/hooks/pre-commit b/dev/setup/git/hooks/pre-commit index c04e5a39609..25f6b4817b3 100755 --- a/dev/setup/git/hooks/pre-commit +++ b/dev/setup/git/hooks/pre-commit @@ -12,10 +12,10 @@ HERE="$(cd "$(dirname "$0")" && pwd)" ARGS+=(--hook-dir "$HERE" -- "$@") if [ -x "$INSTALL_PYTHON" ]; then - exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" 1>&2 + exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" 1>&2 elif command -v pre-commit > /dev/null; then - exec pre-commit "${ARGS[@]}" 1>&2 + exec pre-commit "${ARGS[@]}" 1>&2 else - echo 'pre-commit not found. Did you forget to activate your virtualenv?' 1>&2 - exit 1 + echo 'pre-commit not found. Did you forget to activate your virtualenv?' 1>&2 + exit 1 fi diff --git a/dev/tools/apstats.php b/dev/tools/apstats.php index 89a6fa4c76f..430f8c90946 100755 --- a/dev/tools/apstats.php +++ b/dev/tools/apstats.php @@ -124,14 +124,14 @@ $urlgit = 'https://github.com/Dolibarr/dolibarr/blob/develop/'; $output_arrproj = array(); $output_arrdep = array(); if ($dirscc != 'disabled') { - $commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/includes,htdocs/custom,htdocs/theme/common/fontawesome-5,htdocs/theme/common/octicons'; + $commandcheck = ($dirscc ? $dirscc.'/' : '').'scc . --exclude-dir=htdocs/custom,htdocs/includes,htdocs/public/includes,htdocs/theme/common/fontawesome-5,htdocs/public/theme/common/fontawesome-5 --cocomo-project-type semi-detached'; print 'Execute SCC to count lines of code in project: '.$commandcheck."\n"; $resexecproj = 0; exec($commandcheck, $output_arrproj, $resexecproj); // Count lines of code of dependencies - $commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/theme/common/fontawesome-5 htdocs/theme/common/octicons'; + $commandcheck = ($dirscc ? $dirscc.'/' : '').'scc htdocs/includes htdocs/public/includes htdocs/theme/common/fontawesome-5 htdocs/public/theme/common/fontawesome-5 --cocomo-project-type semi-detached'; print 'Execute SCC to count lines of code in dependencies: '.$commandcheck."\n"; $resexecdep = 0; exec($commandcheck, $output_arrdep, $resexecdep); @@ -149,7 +149,7 @@ $phpstanversion = $output_arrver[0]; $output_arrtd = array(); if ($dirphpstan != 'disabled') { - $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$PHPSTANLEVEL.' -v analyze -a dev/build/phpstan/bootstrap.php --memory-limit 5G --error-format=github -c ~/preview.dolibarr.org/dolibarr/phpstan_apstats.neon'; + $commandcheck = ($dirphpstan ? $dirphpstan.'/' : '').'phpstan --level='.$PHPSTANLEVEL.' -v analyze -a dev/build/phpstan/bootstrap.php --memory-limit 5G --error-format=github -c phpstan_apstats.neon'; print 'Execute PHPStan to get the technical debt: '.$commandcheck."\n"; $resexectd = 0; exec($commandcheck, $output_arrtd, $resexectd); @@ -254,19 +254,20 @@ foreach (array('proj', 'dep') as $source) { } +// Get stats on nb of commits +/* $nbofmonth = 2; $delay = (3600 * 24 * 30 * $nbofmonth); -// Get stats on nb of commits $commandcheck = "git log --all --shortstat --no-renames --no-merges --use-mailmap --pretty=".escapeshellarg('format:%cI;%H;%aN;%aE;%ce;%s')." --since=".dol_print_date(dol_now() - $delay, '%Y-%m-%d'); // --since= --until=... print 'Execute git log to get list of commits: '.$commandcheck."\n"; $output_arrglpu = array(); $resexecglpu = 0; //exec($commandcheck, $output_arrglpu, $resexecglpu); - +*/ // Get git information for security alerts -$nbofmonth = 3; +$nbofmonth = 6; $delay = (3600 * 24 * 30 * $nbofmonth); $arrayofalerts = array(); @@ -275,14 +276,14 @@ print 'Execute git log to get commits related to security: '.$commandcheck."\n"; $output_arrglpu = array(); $resexecglpu = 0; exec($commandcheck, $output_arrglpu, $resexecglpu); -foreach ($output_arrglpu as $val) { +foreach ($output_arrglpu as $valgitlog) { // The most recent lines are first. // Parse the line to split interesting data - $tmpval = cleanVal2($val); + $tmpval = cleanVal2($valgitlog); - if (preg_match('/(#yogosha|CVE|Sec:|Sec\s|Sec$)/i', $tmpval['title'])) { // Recommended git comment: "Sec: Fix #..." + if (preg_match('/(#yogosha|CVE[\s\-]*\d|Sec:|Sec\s|Sec$)/i', $tmpval['title'])) { // Recommended git comment: "Sec: Fix #..." $alreadyfound = ''; $alreadyfoundcommitid = ''; - foreach ($arrayofalerts as $val) { + foreach ($arrayofalerts as $val) { // Loop on already found alerts if ($val['issueidyogosha'] && $val['issueidyogosha'] == $tmpval['issueidyogosha']) { // Already in list $alreadyfound = 'yogosha'; $alreadyfoundcommitid = $val['commitid']; @@ -298,7 +299,9 @@ foreach ($output_arrglpu as $val) { $alreadyfoundcommitid = $val['commitid']; break; } - if ($val['title'] && $val['title'] == $tmpval['title']) { // Already in list + if ($val['title'] && $tmpval['title'] && + (strpos($val['title'], $tmpval['title']) === 0 || strpos($val['title'], $tmpval['title']) > 0 + || strpos($tmpval['title'], $val['title']) === 0 || strpos($tmpval['title'], $val['title']) > 0)) { // Already in list $alreadyfound = 'title'; $alreadyfoundcommitid = $val['commitid']; break; @@ -346,70 +349,22 @@ foreach ($output_arrglpu as $val) { /*var_dump($tmpval['commitid'].' '.$alreadyfoundcommitid); var_dump($arrayofalerts[$alreadyfoundcommitid]['branch']); var_dump($tmpval);*/ + + $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case. + + if (empty($arrayofalerts[$alreadyfoundcommitid]['issueid']) && !empty($tmpval['issueid'])) { // If not Github was defined, we set it. + $arrayofalerts[$alreadyfoundcommitid]['issueid'] = $tmpval['issueid']; + } + + if ($arrayofalerts[$alreadyfoundcommitid]['title'] != $tmpval['title']) { // Concat label of the new line to the already found one (if it differs) + $arrayofalerts[$alreadyfoundcommitid]['title'] .= ', '.preg_replace('/\.$/', '', $tmpval['title']); + } + $arrayofalerts[$alreadyfoundcommitid]['branch'] = array_merge($arrayofalerts[$alreadyfoundcommitid]['branch'], $tmpval['branch']); - - $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; } } } - -/* -//$urlgit = 'https://api.github.com/search/issues?q=is:pr+repo:Dolibarr/dolibarr+created:>'.dol_print_date(dol_now() - $delay, "%Y-%m"); -$urlgit = 'https://api.github.com/search/commits?q=repo:Dolibarr/dolibarr+yogosha+created:>'.dol_print_date(dol_now() - $delay, "%Y-%m"); - -// Count lines of code of application -$newurl = $urlgit.'+CVE'; -$result = getURLContent($newurl); -print 'Execute GET on github for '.$newurl."\n"; -if ($result && $result['http_code'] == 200) { - $arrayofalerts1 = json_decode($result['content']); - - foreach ($arrayofalerts1->items as $val) { - $tmpval = cleanVal($val); - if (preg_match('/CVE/i', $tmpval['title'])) { - $arrayofalerts[$tmpval['number']] = $tmpval; - } - } -} else { - print 'Error: failed to get github response'; - exit(-1); -} - -$newurl = $urlgit.'+yogosha'; -$result = getURLContent($newurl); -print 'Execute GET on github for '.$newurl."\n"; -if ($result && $result['http_code'] == 200) { - $arrayofalerts2 = json_decode($result['content']); - - foreach ($arrayofalerts2->items as $val) { - $tmpval = cleanVal($val); - if (preg_match('/yogosha:/i', $tmpval['title'])) { - $arrayofalerts[$tmpval['number']] = $tmpval; - } - } -} else { - print 'Error: failed to get github response'; - exit(-1); -} - -$newurl = $urlgit.'+Sec:'; -$result = getURLContent($newurl); -print 'Execute GET on github for '.$newurl."\n"; -if ($result && $result['http_code'] == 200) { - $arrayofalerts3 = json_decode($result['content']); - foreach ($arrayofalerts3->items as $val) { - $tmpval = cleanVal($val); - if (preg_match('/Sec:/i', $tmpval['title'])) { - $arrayofalerts[$tmpval['number']] = $tmpval; - } - } -} else { - print 'Error: failed to get github response'; - exit(-1); -} -*/ - $timeend = time(); @@ -616,7 +571,7 @@ $html .= 'Lines'; $html .= ''; $html .= 'Blanks'; $html .= 'Comments'; -$html .= 'Code'; +$html .= 'Code (SLOC)'; //$html .= ''.$val['Complexity'].''; $html .= ''; foreach (array('proj', 'dep') as $source) { @@ -733,12 +688,6 @@ $html .= <<'; $html .= ''; if (array_key_exists('proj', $arraycocomo)) { $html .= '
'; - $html .= 'COCOMO effort
(Basic organic model)
'; + $html .= 'COCOMO effort
(Basic/Semi-detached model)
'; $html .= ''.formatNumber($arraycocomo['proj']['people'] * $arraycocomo['proj']['effort'] + $arraycocomo['dep']['people'] * $arraycocomo['dep']['effort']); $html .= ' months people'; $html .= '
'; @@ -886,7 +835,7 @@ if (count($output_phan_json) != 0) { $title_security_short = "Last security issues"; $title_security = ($project ? "[".$project."] " : "").$title_security_short; -$html .= '
'."\n"; +$html .= '
'."\n"; $html .= '

'.$title_security_short.' (last '.($nbofmonth != 1 ? $nbofmonth.' months' : 'month').')

'."\n"; $html .= '
'."\n"; @@ -962,7 +911,7 @@ foreach ($arrayofalerts as $key => $alert) { } $html .= ''; - // Description + // Title - Description $html .= ''.dol_escape_htmltag($alert['title']).''; // Branches @@ -983,7 +932,7 @@ $html .= '
'; $html .= ''; $html .= '
'; -$html .= 'Note:Search is done in git repository on regexstring #yogosha|CVE|Sec:|Sec\s
'; +$html .= 'Note:Search is done in git repository on regex string "#yogosha|CVE[\s\-]*\d|Sec:|Sec\s" (not case sensitive)
'; $html .= 'You can use this URL for RSS notifications: '.$outputfilerss.'

'; $html .= '
'; @@ -1188,7 +1137,7 @@ function cleanVal2($val) $tmpval['issueid'] = ''; $tmpval['issueidyogosha'] = ''; $tmpval['issueidcve'] = ''; - $tmpval['title'] = array_key_exists(5, $tmp) ? $tmp[5] : ''; + $tmpval['title'] = array_key_exists(5, $tmp) ? preg_replace('/\.$/', '', $tmp[5]) : ''; $tmpval['created_at'] = array_key_exists(0, $tmp) ? $tmp[0] : ''; $tmpval['updated_at'] = ''; @@ -1197,7 +1146,7 @@ function cleanVal2($val) $tmpval['issueid'] = $reg[1]; } if (preg_match('/CVE([0-9\-\s]+)/', $tmpval['title'], $reg)) { - $tmpval['issueidcve'] = preg_replace('/^\-/', '', trim($reg[1])); + $tmpval['issueidcve'] = preg_replace('/^\-/', '', preg_replace('/\s+/', '-', trim($reg[1]))); } if (preg_match('/#yogosha(\d+)/i', $tmpval['title'], $reg)) { $tmpval['issueidyogosha'] = $reg[1]; diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 98b1966e2ed..08c4603f85e 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,42 +9,28 @@ */ return [ // # Issue statistics: - // PhanUndeclaredProperty : 440+ occurrences + // PhanUndeclaredProperty : 420+ occurrences // PhanTypeMismatchProperty : 100+ occurrences - // PhanTypeMismatchArgument : 80+ occurrences - // PhanUndeclaredGlobalVariable : 75+ occurrences - // PhanTypeMismatchArgumentNullable : 30+ occurrences - // PhanTypeExpectedObjectPropAccess : 20+ occurrences - // PhanTypeInvalidDimOffset : 20+ occurrences + // PhanTypeMismatchArgument : 70+ occurrences + // PhanUndeclaredGlobalVariable : 65+ occurrences + // PhanTypeMismatchArgumentNullable : 40+ occurrences + // PhanTypeInvalidDimOffset : 15+ occurrences // PhanTypeMismatchDimFetch : 15+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 9 occurrences // PhanUndeclaredMethod : 9 occurrences // PhanPossiblyUndeclaredGlobalVariable : 6 occurrences // PhanTypeArraySuspiciousNull : 6 occurrences // PhanTypeComparisonFromArray : 6 occurrences - // PhanParamTooMany : 4 occurrences + // PhanTypeExpectedObjectPropAccess : 5 occurrences + // PhanTypeMismatchArgumentProbablyReal : 5 occurrences // PhanPluginDuplicateArrayKey : 4 occurrences - // PhanPluginDuplicateExpressionBinaryOp : 4 occurrences - // PhanPluginUndeclaredVariableIsset : 4 occurrences - // PhanTypeMismatchDimAssignment : 2 occurrences - // PhanTypeSuspiciousStringExpression : 2 occurrences + // PhanParamTooMany : 3 occurrences + // PhanPluginUndeclaredVariableIsset : 3 occurrences // PhanPossiblyUndeclaredVariable : 1 occurrence // PhanTypeExpectedObjectPropAccessButGotNull : 1 occurrence - // PhanTypeMismatchArgumentNullableInternal : 1 occurrence // PhanTypeMismatchReturn : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ - 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeInvalidDimOffset'], - 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp'], - 'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], - 'htdocs/bom/tpl/objectline_create.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/bookcal/availabilities_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/bookcal/calendar_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'], @@ -55,12 +41,9 @@ return [ 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'], 'htdocs/comm/mailing/targetemailing.php' => ['PhanUndeclaredProperty'], 'htdocs/comm/propal/list.php' => ['PhanUndeclaredProperty'], - 'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/commande/class/api_orders.class.php' => ['PhanTypeMismatchArgument'], 'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'], 'htdocs/commande/list.php' => ['PhanUndeclaredProperty'], 'htdocs/commande/list_det.php' => ['PhanTypeInvalidDimOffset'], - 'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/class/account.class.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanTypeMismatchArgument'], @@ -68,16 +51,13 @@ return [ 'htdocs/compta/bank/various_payment/card.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/info.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'], 'htdocs/compta/clients.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/facture/card-rec.php' => ['PhanTypeMismatchArgument'], 'htdocs/compta/facture/card.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/localtax/card.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/localtax/clients.php' => ['PhanTypeExpectedObjectPropAccess'], 'htdocs/compta/localtax/index.php' => ['PhanTypeMismatchArgument'], 'htdocs/compta/localtax/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/card.php' => ['PhanUndeclaredProperty'], @@ -102,7 +82,7 @@ return [ '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', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/conf.class.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], 'htdocs/core/class/ctyperesource.class.php' => ['PhanUndeclaredProperty'], @@ -119,14 +99,12 @@ return [ 'htdocs/core/lib/company.lib.php' => ['PhanTypeMismatchArgumentNullable'], 'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/functions2.lib.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/lib/pdf.lib.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/pdf.lib.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'], 'htdocs/core/lib/product.lib.php' => ['PhanTypeMismatchArgument'], 'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/xcal.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeMismatchArgument'], 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanTypeMismatchArgument'], - 'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanTypeMismatchArgument'], 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanTypeMismatchArgument'], @@ -176,7 +154,6 @@ return [ 'htdocs/core/tpl/resource_view.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanTypeMismatchArgument'], 'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'], 'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'], 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'], @@ -192,18 +169,14 @@ return [ 'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'], 'htdocs/expensereport/card.php' => ['PhanUndeclaredProperty'], 'htdocs/expensereport/class/expensereport.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'], - 'htdocs/expensereport/payment/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fichinter/card-rec.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanUndeclaredProperty'], 'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/filefunc.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/fourn/commande/card.php' => ['PhanTypeMismatchDimAssignment', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredProperty'], + 'htdocs/fourn/commande/card.php' => ['PhanUndeclaredProperty'], 'htdocs/fourn/facture/card-rec.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/fourn/facture/card.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'], 'htdocs/fourn/facture/rapport.php' => ['PhanTypeMismatchArgument'], @@ -211,7 +184,6 @@ return [ 'htdocs/holiday/card_group.php' => ['PhanTypeMismatchArgument'], 'htdocs/holiday/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/hrm/class/evaluation.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/hrm/class/evaluationdet.class.php' => ['PhanUndeclaredProperty'], 'htdocs/hrm/class/job.class.php' => ['PhanUndeclaredProperty'], 'htdocs/hrm/class/position.class.php' => ['PhanUndeclaredProperty'], 'htdocs/hrm/class/skill.class.php' => ['PhanUndeclaredProperty'], @@ -258,7 +230,6 @@ return [ 'htdocs/projet/tasks.php' => ['PhanTypeMismatchArgument'], 'htdocs/projet/tasks/time.php' => ['PhanTypeInvalidDimOffset', 'PhanUndeclaredProperty'], 'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/public/eventorganization/subscriptionok.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/public/members/new.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/public/payment/newpayment.php' => ['PhanUndeclaredProperty'], 'htdocs/public/payment/paymentok.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -308,18 +279,7 @@ return [ 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'], 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanUndeclaredProperty'], 'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_actioncomm.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_category.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_contact.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_invoice.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_order.php' => ['PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_payment.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_productorservice.php' => ['PhanUndeclaredProperty'], 'htdocs/webservices/server_project.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_supplier_invoice.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_thirdparty.php' => ['PhanUndeclaredProperty'], - 'htdocs/webservices/server_user.php' => ['PhanUndeclaredProperty'], - 'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'], ], // '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/phan/config.php b/dev/tools/phan/config.php index d69ccc193de..e6670afe368 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This is the phan config file used by .github/workflows/phan.yml */ @@ -35,7 +35,8 @@ $sanitizeRegex 'restricthtmlallowclass', 'restricthtmlallowunvalid', 'restricthtmlnolink', - 'restricthtmlallowlinkscript' + 'restricthtmlallowlinkscript', + 'url', ) ).')*$/'; diff --git a/dev/tools/phpstan/phpstan_v1_apstats.neon b/dev/tools/phpstan/phpstan_v1_apstats.neon index f8ac1866608..065878f22a3 100644 --- a/dev/tools/phpstan/phpstan_v1_apstats.neon +++ b/dev/tools/phpstan/phpstan_v1_apstats.neon @@ -23,7 +23,6 @@ parameters: - htdocs/install/doctemplates/* - htdocs/langs/* - htdocs/modulebuilder/template/test/* - - htdocs/support/* analyse: - htdocs/includes/geoPHP/* - htdocs/includes/markrogoyski/* diff --git a/dev/tools/rector/README.md b/dev/tools/rector/README.md index 6ad928af5eb..e4234e6671c 100644 --- a/dev/tools/rector/README.md +++ b/dev/tools/rector/README.md @@ -16,15 +16,15 @@ composer install #### Usage -##### To make changes (Add --dry-run for test mode only) +##### To make changes (remove --dry-run for real run) ```shell cd dev/tools/rector -./vendor/bin/rector process --dry-run +./vendor/bin/rector process --debug --dry-run ``` ##### To make changes on a given directory ```shell cd dev/tools/rector -./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/ +./vendor/bin/rector process --debug [--dry-run] [--clear-cache] ../../../htdocs/core/ ``` diff --git a/dev/tools/rector/rector.php b/dev/tools/rector/rector.php index 154a01f3cec..23540fa78bb 100644 --- a/dev/tools/rector/rector.php +++ b/dev/tools/rector/rector.php @@ -18,7 +18,7 @@ /** * \file dev/tools/rector/rector.php * \ingroup core - * \brief Toolt to run rector + * \brief Tool to run rector * * cd dev/tools/rector * ./vendor/bin/rector process [--dry-run] [--clear-cache] ../../../htdocs/core/ @@ -33,17 +33,22 @@ use Rector\Set\ValueObject\SetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->phpVersion(PhpVersion::PHP_71); - //$rectorConfig->indent(' ', 4); + $rectorConfig->indent(' ', 4); // Traits seems not supported correctly by rector without declaring them as bootstrapFiles $arrayoftraitfiles = array( __DIR__ . '/../../../htdocs/core/class/commonincoterm.class.php', __DIR__ . '/../../../htdocs/core/class/commonpeople.class.php', - __DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php' + __DIR__ . '/../../../htdocs/core/class/commonsignedobject.class.php', + __DIR__ . '/../../../htdocs/core/class/commonsocialnetworks.class.php', + __DIR__ . '/../../../htdocs/core/class/commontrigger.class.php', + __DIR__ . '/../../../htdocs/core/class/doldeprecationhandler.class.php', + __DIR__ . '/../../../htdocs/subtotals/class/commonsubtotal.class.php', ); $rectorConfig->bootstrapFiles($arrayoftraitfiles); $rectorConfig->paths([ + __DIR__ . '/../../../dev/', __DIR__ . '/../../../htdocs/', __DIR__ . '/../../../scripts/', __DIR__ . '/../../../test/phpunit/', @@ -54,7 +59,8 @@ return static function (RectorConfig $rectorConfig): void { '**/custom/**', '**/vendor/**', '**/rector/**', // Disable this line to test the "test.php" file. - __DIR__ . '/../../../htdocs/custom/', + __DIR__ . '/../../../dev/tools/phan/stubs/*', + __DIR__ . '/../../../htdocs/custom/*', __DIR__ . '/../../../htdocs/install/doctemplates/*' //'test.php', ]); @@ -82,12 +88,18 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->rule(Dolibarr\Rector\Renaming\EmptyUserRightsToFunction::class); $rectorConfig->rule(Dolibarr\Rector\Renaming\GlobalToFunction::class); $rectorConfig->rule(Dolibarr\Rector\Renaming\UserRightsToFunction::class); - //$rectorConfig->rule(Dolibarr\Rector\Renaming\UsePositiveExit::class); + $rectorConfig->rule(Dolibarr\Rector\Renaming\UsePositiveExit::class); // This fix <> into != but it breaks other rules, so added at end. - $rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class); + //$rectorConfig->rule(Rector\CodeQuality\Rector\NotEqual\CommonNotEqualRector::class); + /* + $rectorConfig->skip([ + Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class, + Dolibarr\Rector\Renaming\GlobalToFunction::class + ]); + */ // Add all predefined rules to migrate to up to php 71. // Warning this break tab spacing of arrays on several lines diff --git a/dev/tools/rector/src/Renaming/GlobalToFunction.php b/dev/tools/rector/src/Renaming/GlobalToFunction.php index 1c98c9671f6..16c4b658c29 100644 --- a/dev/tools/rector/src/Renaming/GlobalToFunction.php +++ b/dev/tools/rector/src/Renaming/GlobalToFunction.php @@ -63,7 +63,7 @@ class GlobalToFunction extends AbstractRector 'Change $conf->global to getDolGlobal in context (1) conf->global Operator Value or (2) function(conf->global...)', [new CodeSample( '$conf->global->CONSTANT', - 'getDolGlobalInt(\'CONSTANT\')' + 'getDolGlobalString|Int(\'CONSTANT\')' )] ); } @@ -228,14 +228,36 @@ class GlobalToFunction extends AbstractRector return new Concat($leftConcat, $rightConcat); } + // If a && b and a or b is conf->global, we replace a or/and b if ($node instanceof BooleanAnd) { - $nodes = $this->resolveTwoNodeMatch($node); - if (!isset($nodes)) { - return; + // Transformation sur le nœud gauche + $changedone = 0; + if ($this->isGlobalVar($node->left)) { + $constName = $this->getConstName($node->left); + if (empty($constName)) { + return; + } + $node->left = new FuncCall( + new Name('getDolGlobalString'), + [new Arg($constName)] + ); + $changedone++; + } + if ($this->isGlobalVar($node->right)) { + $constName = $this->getConstName($node->right); + if (empty($constName)) { + return; + } + $node->right = new FuncCall( + new Name('getDolGlobalString'), + [new Arg($constName)] + ); + $changedone++; } - /** @var Equal $node */ - $node = $nodes->getFirstExpr(); + if ($changedone) { + return $node; + } } @@ -270,9 +292,42 @@ class GlobalToFunction extends AbstractRector return; } + // Now we process a comparison $isconfglobal = $this->isGlobalVar($node->left); if (!$isconfglobal) { - // The left side is not conf->global->xxx, so we leave + $isconfglobal = $this->isGlobalVar($node->right); + if (!$isconfglobal) { + // The left side and right side is not conf->global->xxx, so we leave + return; + } + // Right side is conf->global->xxx, but we can't know if we must use getDolGlobalInt or String, + // so we use getDolGlobalString if comparison is == + if ($typeofcomparison == 'Equal') { + $constName = $this->getConstName($node->right); + if (empty($constName)) { + return; + } + + // Test the type after the comparison conf->global->xxx to know the name of function + $typeleft = $node->left->getType(); + switch ($typeleft) { + case 'Scalar_LNumber': + $funcName = 'getDolGlobalInt'; + break; + case 'Scalar_String': + $funcName = 'getDolGlobalString'; + break; + default: // Can be Expr_FuncCall + $funcName = 'getDolGlobalString'; + break; + } + + $node->right = new FuncCall( + new Name($funcName), + [new Arg($constName)] + ); + return $node; + } return; } @@ -360,36 +415,6 @@ class GlobalToFunction extends AbstractRector } } - /** - * Get nodes with check empty - * - * @param BooleanAnd $booleanAnd A BooleandAnd - * @return TwoNodeMatch|null - */ - private function resolveTwoNodeMatch(BooleanAnd $booleanAnd): ?TwoNodeMatch - { - return $this->binaryOpManipulator->matchFirstAndSecondConditionNode( - $booleanAnd, - // Function to check if we are in the case $conf->global->... == $value - function (Node $node): bool { - if (!$node instanceof Equal) { - return \false; - } - return $this->isGlobalVar($node->left); - }, - // !empty(...) || isset(...) - function (Node $node): bool { - if ($node instanceof BooleanNot && $node->expr instanceof Empty_) { - return $this->isGlobalVar($node->expr->expr); - } - if (!$node instanceof Isset_) { - return $this->isGlobalVar($node); - } - return \true; - } - ); - } - /** * Check if node is a global access with format conf->global->XXX * diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index b40afa0b14d..e0d54a841bf 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -96,8 +96,6 @@ AADE_WEBSERVICE_USER API Accept AccountancyErrorMismatchLetteringCode -AccountingAccount -AccountingCode AccountingJournalType ActionAC_ ActionAC_ALL_ @@ -147,14 +145,12 @@ Banque Barcode BarcodeDesc BarcodeStickersMask -BatchInformationNotfound BillOfMaterialsLine BlockLogNeedAmountsValue BlockLogNeedElement BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote BlockedLogAuthorityUrl BlockedLogSetup -BookCalSystem Bookings BoxTitleLast BoxTitleLatest @@ -202,8 +198,6 @@ ConfirmActionMyObject ConfirmActionTarget ConfirmCloneMyObject ConfirmCloneTask -ConfirmCreateAdherent -ConfirmDeleteAdherent ConfirmDeleteIndividual ConfirmDeleteReport ConfirmDeleteWebsiteAccount @@ -291,7 +285,6 @@ EmailcollectorFilter EmailingTargetSelector Empty End -EnterAnIP EnterNameOfDictionnaryToDeleteDesc Entries ErrSCAAuthentication @@ -361,7 +354,6 @@ ErrorTechnicalError ErrorThirdPartyIdIsMandatory ErrorTicketIsNotValid ErrorTitreAlreadyExists -ErrorUpdatingUsersCP ErrorUserFetch ErrorValueMustBeInteger ErrorValueTooHigh @@ -433,7 +425,6 @@ Gzip HTTPBasicPassword HelpAbandonProductReturned HideVersionLink -HolidayStarted Hook Hooks IBANNotDefined @@ -619,7 +610,6 @@ PaymentCondition PaymentConditionShort PaymentDonation PaymentHigherThanReminderToPaySupplier -PaymentSalary PaymentSendToStripeTerminal PaymentType PaymentTypeShort @@ -643,10 +633,7 @@ PrintModule PrintUserConfDesc PrinterId PrinterIdEmpty -PrinterLocation -PrinterNameEmpty PrinterParameterEmpty -Printers Printing ProductCodeDesc ProductFournisseurPrice @@ -810,7 +797,6 @@ Templates TestPrinterTemplate TestTemplateToPrinter Theme -ThirdpartyHasNoDefaultBanAccount ThisIsInformationOnDocumentToSign ThisScreenAllowsYouToSignDocFrom TicketCategoryShort @@ -847,8 +833,6 @@ UpdateUser UpgradeHasBeenUnlocked Url Use of API for currency update is disabled by option MULTICURRENCY_DISABLE_SYNC_CURRENCYLAYER -UserRemovedFromGroup -UserSetInGroup VCard Vacant ValidateAndSign @@ -874,7 +858,6 @@ Widgets Windows WorkingBoard Workload -WrongAmount XDebug XmlCorrupted Y @@ -1031,10 +1014,6 @@ PDF/A-3b PartnershipSentByEMail PdfTitle ProcessingError -PurchaseOrder -PurchaseOrders -ReceptionSentByEMail -ReceptionValidated Recruited Ref. Product RefNewContract @@ -1042,7 +1021,6 @@ Stable Suggested TicketMessageMailSignatureText TicketSetupPage -Tiers Timeline Transfer TryAnotherConnectionMode diff --git a/doc/images/dolibarr_180x180_color.png b/doc/images/dolibarr_180x180_color.png new file mode 100644 index 00000000000..f3fdcd35002 Binary files /dev/null and b/doc/images/dolibarr_180x180_color.png differ diff --git a/htdocs/.gitignore b/htdocs/.gitignore index d0fe62f2e73..82c0ea2accb 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -21,7 +21,6 @@ /cabinetmed* /webmail* /conf/conf.php -/subtotal* /abricot* /nomenclature* /of/ diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 87186113860..2ebfc52b28d 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -61,7 +61,7 @@ $search_import_key = GETPOST('search_import_key', 'alpha'); $search_reconcilable = GETPOST("search_reconcilable", 'int'); $search_centralized = GETPOST("search_centralized", 'int'); $search_active = GETPOST("search_active", 'int'); -$toselect = GETPOST('toselect', 'array'); +$toselect = GETPOST('toselect', 'array:int'); $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $confirm = GETPOST('confirm', 'alpha'); @@ -98,20 +98,22 @@ if (!$sortorder) { $sortorder = "ASC"; } +$object = new AccountingAccount($db); + $arrayfields = array( 'aa.account_number' => array('label' => "AccountNumber", 'checked' => '1'), 'aa.label' => array('label' => "Label", 'checked' => '1'), - 'aa.labelshort' => array('label' => "LabelToShow", 'checked' => '1'), + 'aa.labelshort' => array('label' => "ShortLabel", 'checked' => '1'), 'aa.account_parent' => array('label' => "Accountparent", 'checked' => '1'), 'aa.pcg_type' => array('label' => "Pcgtype", 'checked' => '1', 'help' => 'PcgtypeDesc'), 'categories' => array('label' => "AccountingCategories", 'checked' => '-1', 'help' => 'AccountingCategoriesDesc'), 'aa.reconcilable' => array('label' => "Reconcilable", 'checked' => '1'), - 'aa.centralized' => array('label' => "Centralized", 'checked' => '1'), + 'aa.centralized' => array('label' => "Centralized", 'checked' => '1', 'help' => 'CentralizedAccountHelp'), 'aa.import_key' => array('label' => "ImportId", 'checked' => '-1', 'help' => ''), 'aa.active' => array('label' => "Activated", 'checked' => '1') ); -if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { +if (!getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING')) { unset($arrayfields['categories']); unset($arrayfields['aa.reconcilable']); } @@ -557,12 +559,10 @@ if ($resql) { } // Reconcilable - if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - if (!empty($arrayfields['aa.reconcilable']['checked'])) { - print ''; - print $form->selectyesno('search_reconcilable', $search_reconcilable, 1, false, 1, 1, 'search_status onrightofpage width75'); - print ''; - } + if (!empty($arrayfields['aa.reconcilable']['checked'])) { + print ''; + print $form->selectyesno('search_reconcilable', $search_reconcilable, 1, false, 1, 1, 'search_status onrightofpage width75'); + print ''; } // Centralized @@ -574,10 +574,11 @@ if ($resql) { // Active if (!empty($arrayfields['aa.active']['checked'])) { - print ''; + print ''; print $form->selectyesno('search_active', $search_active, 1, false, 1, 1, 'search_status onrightofpage width75'); print ''; } + // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; @@ -614,12 +615,14 @@ if ($resql) { print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"], "aa.account_parent", "", $param, '', $sortfield, $sortorder, 'left '); $totalarray['nbfield']++; } + // Main group if (!empty($arrayfields['aa.pcg_type']['checked'])) { - print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.pcg_type']['help'], 1); + print_liste_field_titre($arrayfields['aa.pcg_type']['label'], $_SERVER["PHP_SELF"], 'aa.pcg_type,aa.account_number', '', $param, '', $sortfield, $sortorder, 'right ', $arrayfields['aa.pcg_type']['help'].'::-1', 1); $totalarray['nbfield']++; } + // Number of custom groups if (!empty($arrayfields['categories']['checked'])) { - print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'], 1); + print_liste_field_titre($arrayfields['categories']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '', $arrayfields['categories']['help'].'::-1', 1); $totalarray['nbfield']++; } @@ -629,21 +632,19 @@ if ($resql) { print $hookmanager->resPrint; if (!empty($arrayfields['aa.import_key']['checked'])) { - print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'], 1); + print_liste_field_titre($arrayfields['aa.import_key']['label'], $_SERVER["PHP_SELF"], 'aa.import_key', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.import_key']['help'].'::-1', 1); $totalarray['nbfield']++; } - if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - if (!empty($arrayfields['aa.reconcilable']['checked'])) { - print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder, 'center '); - $totalarray['nbfield']++; - } + if (!empty($arrayfields['aa.reconcilable']['checked'])) { + print_liste_field_titre($arrayfields['aa.reconcilable']['label'], $_SERVER["PHP_SELF"], 'aa.reconcilable', '', $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; } if (!empty($arrayfields['aa.centralized']['checked'])) { - print_liste_field_titre($arrayfields['aa.centralized']['label'], $_SERVER["PHP_SELF"], 'aa.centralized', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['aa.centralized']['label'], $_SERVER["PHP_SELF"], 'aa.centralized', '', $param, '', $sortfield, $sortorder, '', $arrayfields['aa.centralized']['help'].'::-1', 1); $totalarray['nbfield']++; } if (!empty($arrayfields['aa.active']['checked'])) { - print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['aa.active']['label'], $_SERVER["PHP_SELF"], 'aa.active', '', $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } // Action column @@ -759,7 +760,7 @@ if ($resql) { } // Custom accounts if (!empty($arrayfields['categories']['checked'])) { - print ""; + print ''; // TODO Get all custom groups labels the account is in print dol_escape_htmltag($obj->fk_accounting_category); print "\n"; @@ -783,23 +784,21 @@ if ($resql) { } } - if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - // Activated or not reconciliation on an accounting account - if (!empty($arrayfields['aa.reconcilable']['checked'])) { - print ''; - if (empty($obj->reconcilable)) { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; - } + // Activated or not reconciliation on an accounting account + if (!empty($arrayfields['aa.reconcilable']['checked'])) { + print ''; + if (empty($obj->reconcilable)) { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; } } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 2b7c52d15fe..a3fc3777c8a 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -12,7 +12,7 @@ * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -92,6 +92,8 @@ $search_country_id = GETPOST('search_country_id', 'int'); if ($user->socid > 0) { accessforbidden(); } + +$permissiontoeditchart = $user->hasRight('accounting', 'chartofaccount'); if (!$user->hasRight('accounting', 'chartofaccount')) { accessforbidden(); } @@ -143,7 +145,6 @@ $tabhelp = array(); $tabhelp[31] = array('pcg_version' => $langs->trans("EnterAnyCode")); - /* * Actions */ @@ -198,32 +199,15 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { // Si verif ok et action add, on ajoute la ligne if ($ok && GETPOST('actionadd', 'alpha')) { $newid = 0; - if ($tabrowid[$id]) { - // Get free id for insert - $sql = "SELECT MAX(".$db->sanitize($tabrowid[$id]).") as newid FROM ".$db->sanitize($tabname[$id]); - $result = $db->query($sql); - if ($result) { - $obj = $db->fetch_object($result); - $newid = ($obj->newid + 1); - } else { - dol_print_error($db); - } - } // Add new entry $sql = "INSERT INTO ".$db->sanitize($tabname[$id])." ("; // List of fields - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) { - $sql .= $db->sanitize($tabrowid[$id]).","; - } $sql .= $db->sanitize($tabfieldinsert[$id]); $sql .= ",active)"; $sql .= " VALUES("; // List of values - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) { - $sql .= $newid.","; - } $i = 0; foreach ($listfieldinsert as $f => $value) { if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { @@ -259,19 +243,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { - $rowidcol = $tabrowid[$id]; - } else { - $rowidcol = "rowid"; - } - // Modify entry $sql = "UPDATE ".$db->sanitize($tabname[$id])." SET "; // Modifie valeur des champs - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) { - $sql .= $db->sanitize($tabrowid[$id])." = "; - $sql .= "'".$db->escape($rowid)."', "; - } + $i = 0; foreach ($listfieldmodify as $field) { if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { @@ -290,7 +265,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { } $i++; } - $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog("actionmodify", LOG_DEBUG); //print $sql; @@ -301,14 +276,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { } } -if ($action == 'confirm_delete' && $confirm == 'yes') { // delete - if ($tabrowid[$id]) { - $rowidcol = $tabrowid[$id]; - } else { - $rowidcol = "rowid"; - } - - $sql = "DELETE from ".$db->sanitize($tabname[$id])." WHERE ".$db->sanitize($rowidcol)." = ".((int) $rowid); +// delete +if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontoeditchart) { + $sql = "DELETE from ".$db->sanitize($tabname[$id])." WHERE rowid = ".((int) $rowid); dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); @@ -322,7 +292,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') { // delete } // activate -if ($action == 'activate') { +if ($action == 'activate' && $permissiontoeditchart) { $sql = "UPDATE ".$db->sanitize($tabname[$id])." SET active = 1 WHERE rowid = ".((int) $rowid); $result = $db->query($sql); if (!$result) { @@ -331,7 +301,7 @@ if ($action == 'activate') { } // disable -if ($action == $acts[1]) { +if ($action == $acts[1] && $permissiontoeditchart) { $sql = "UPDATE ".$db->sanitize($tabname[$id])." SET active = 0 WHERE rowid = ".((int) $rowid); $result = $db->query($sql); if (!$result) { @@ -359,7 +329,7 @@ print load_fiche_titre($titre, $linkback, 'title_accountancy'); // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.urlencode((string) ($page)).'&' : '').'sortfield='.urlencode((string) ($sortfield)).'&sortorder='.urlencode((string) ($sortorder)).'&rowid='.urlencode((string) ($rowid)).'&code='.urlencode((string) ($code)).'&id='.urlencode((string) ($id)), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); + print $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['page'=> $page, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'rowid' => $rowid, 'code' => $code, 'id' => $id]), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } @@ -607,36 +577,34 @@ if ($resql) { } } - // Can an entry be erased or disabled ? - $iserasable = 1; - $canbedisabled = 1; - $canbemodified = 1; // true by default + // $url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : ''); + // $url .= '&'.$param.'&'; - $url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : ''); - $url .= '&'.$param.'&'; + $query = []; + // decode and add param to query + parse_str($param, $query); + $query = array_merge($query, [ + 'action' => '', + 'page' => $page, + 'sortfield' => $sortfield, + 'sortorder' => $sortorder, + 'rowid' => (!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')), + 'code' => $obj->code, + ]); // Active print ''; - if ($canbedisabled) { - print ''.$actl[$obj->active].''; - } else { - print $langs->trans("AlwaysActive"); - } + $query['action'] = $acts[$obj->active]; + print ''.$actl[$obj->active].''; print ""; // Modify link - if ($canbemodified) { - print ''.img_edit().''; - } else { - print ' '; - } + $query['action'] = 'edit'; + print ''.img_edit().''; // Delete link - if ($iserasable) { - print ''.img_delete().''; - } else { - print ' '; - } + $query['action'] = 'delete'; + print ''.img_delete().''; print "\n"; } @@ -700,16 +668,8 @@ function fieldListAccountModel($fieldlist, $obj = null, $tabname = '', $context print ''; } } elseif ($fieldlist[$field] == 'type_cdr') { - if ($fieldlist[$field] == 'type_cdr') { - print ''; - } else { - print ''; - } - if ($fieldlist[$field] == 'type_cdr') { - print $form->selectarray($fieldlist[$field], array(0 => $langs->trans('None'), 1 => $langs->trans('AtEndOfMonth'), 2 => $langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : '')); - } else { - print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : ''), 1); - } + print ''; + print $form->selectarray($fieldlist[$field], array(0 => $langs->trans('None'), 1 => $langs->trans('AtEndOfMonth'), 2 => $langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : '')); print ''; } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 81a5e24588f..d53378f23e7 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,9 +1,9 @@ - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2024 Frédéric France - * Copyright (C) 2025 MDW +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2025 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 @@ -77,7 +77,7 @@ if (GETPOST('cancel', 'alpha')) { exit; } -if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) { +if ($action == 'add' /* && $user->hasRight('accounting', 'chartofaccount') // already checked */) { if (!$cancel) { if (!$account_number) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors'); @@ -132,7 +132,7 @@ if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) { } } } -} elseif ($action == 'edit' && $user->hasRight('accounting', 'chartofaccount')) { +} elseif ($action == 'edit' /* && $user->hasRight('accounting', 'chartofaccount') // already checked */) { if (!$cancel) { if (!$account_number) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountNumber")), null, 'errors'); @@ -245,7 +245,7 @@ if ($action == 'create') { print ''; // Label short - print ''.$langs->trans("LabelToShow").''; + print ''.$langs->trans("ShortLabel").''; print ''; // Account parent @@ -314,15 +314,15 @@ if ($action == 'create') { // Account number print ''.$langs->trans("AccountNumber").''; - print ''; + print ''; // Label print ''.$langs->trans("Label").''; - print ''; + print ''; // Label short - print ''.$langs->trans("LabelToShow").''; - print ''; + print ''.$langs->trans("ShortLabel").''; + print ''; // Account parent print ''.$langs->trans("Accountparent").''; @@ -386,7 +386,7 @@ if ($action == 'create') { print ''.$object->label.''; // Label to show - print ''.$langs->trans("LabelToShow").''; + print ''.$langs->trans("ShortLabel").''; print ''.$object->labelshort.''; // Account parent @@ -419,11 +419,11 @@ if ($action == 'create') { */ print '
'; - if ($user->hasRight('accounting', 'chartofaccount')) { - print 'id.'">'.$langs->trans('Modify').''; - } else { - print ''.$langs->trans('Modify').''; - } + // if ($user->hasRight('accounting', 'chartofaccount')) { // already checked + print 'id.'">'.$langs->trans('Modify').''; + // } else { + // print ''.$langs->trans('Modify').''; + // } // Delete $permissiontodelete = $user->hasRight('accounting', 'chartofaccount'); diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index ef03710d939..0b91f2e22b6 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,7 +1,7 @@ - * Copyright (C) 2011-2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2004-2023 Laurent Destailleur + * Copyright (C) 2011-2025 Alexandre Spangaro + * Copyright (C) 2024 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 8eef6549850..5a0a2e4d778 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -202,7 +202,7 @@ if ($result) { if (getDolGlobalString('ACCOUNTANCY_FISCALYEAR_DEFAULT') == (int) $fiscalyearstatic->ref) { print img_picto($langs->trans("Default"), 'on'); } else { - print 'ref).'&label='.urlencode($fiscalyearstatic->label).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').''; + print ' 'setdefault', 'value' => $fiscalyearstatic->ref, 'label'=>$fiscalyearstatic->label], true).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').''; } print ''; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 6a52d536d1e..40f8b1f97f4 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -82,7 +82,7 @@ $permissiontoadd = $user->hasRight('accounting', 'fiscalyear', 'write'); if ($user->socid > 0) { accessforbidden(); } -if (!$permissiontoadd) { +if (!$permissiontoadd) { // after this test $permissiontoadd is always true accessforbidden(); } @@ -97,7 +97,7 @@ if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } -if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) { +if ($action == 'confirm_delete' && $confirm == "yes" /* && $permissiontoadd // always true */) { $result = $object->delete($user); if ($result >= 0) { header("Location: fiscalyear.php"); @@ -105,7 +105,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) { } else { setEventMessages($object->error, $object->errors, 'errors'); } -} elseif ($action == 'add' && $permissiontoadd) { +} elseif ($action == 'add' /* && $permissiontoadd // always true */) { if (!GETPOST('cancel', 'alpha')) { $error = 0; @@ -147,7 +147,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) { header("Location: ./fiscalyear.php"); exit(); } -} elseif ($action == 'update' && $permissiontoadd) { +} elseif ($action == 'update' /* && $permissiontoadd // always true */) { // Update record if (!GETPOST('cancel', 'alpha')) { $result = $object->fetch($id); @@ -169,7 +169,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit(); } -} elseif ($action == 'reopen' && $permissiontoadd && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) { +} elseif ($action == 'reopen' /* && $permissiontoadd // always true */ && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) { $result = $object->fetch($id); $object->status = GETPOSTINT('status'); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 7c29ed6835d..7bf6f41e5e4 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -8,7 +8,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2021 Ferran Marcet - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,6 +69,7 @@ $formSetup = new FormSetup($db); // Main options $formSetup->newItem('BANK_DISABLE_DIRECT_INPUT')->setAsYesNo(); + $formSetup->newItem('ACCOUNTANCY_COMBO_FOR_AUX')->setAsYesNo(); $item = $formSetup->newItem('ACCOUNTING_MANAGE_ZERO')->setAsYesNo(); @@ -179,75 +180,73 @@ if ($action == 'updatemode') { if ($action == 'update2') { $error = 0; - if (!$error) { - foreach ($list as $constname) { - $constvalue = GETPOST($constname, 'alpha'); - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - if ($error) { - setEventMessages($langs->trans("Error"), null, 'errors'); - } - - // option in section binding - foreach ($list_binding as $constname) { - $constvalue = GETPOST($constname, 'alpha'); - - if ($constname == 'ACCOUNTING_DATE_START_BINDING') { - $constvalue = dol_mktime(0, 0, 0, GETPOSTINT($constname.'month'), GETPOSTINT($constname.'day'), GETPOSTINT($constname.'year')); - } - - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - - // options in section other - if (GETPOSTISSET('ACCOUNTING_LETTERING_NBLETTERS')) { - if (!dolibarr_set_const($db, 'ACCOUNTING_LETTERING_NBLETTERS', GETPOST('ACCOUNTING_LETTERING_NBLETTERS'), 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - - // Export options - $modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV'); - - if (!empty($modelcsv)) { - if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { - $error++; - } - //if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) { - // dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity); - //} - } else { + foreach ($list as $constname) { + $constvalue = GETPOST($constname, 'alpha'); + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { $error++; } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } - foreach ($main_option as $constname) { - $constvalue = GETPOST($constname, 'alpha'); + // option in section binding + foreach ($list_binding as $constname) { + $constvalue = GETPOST($constname, 'alpha'); - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + if ($constname == 'ACCOUNTING_DATE_START_BINDING') { + $constvalue = dol_mktime(0, 0, 0, GETPOSTINT($constname.'month'), GETPOSTINT($constname.'day'), GETPOSTINT($constname.'year')); + } + + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + + // options in section other + if (GETPOSTISSET('ACCOUNTING_LETTERING_NBLETTERS')) { + if (!dolibarr_set_const($db, 'ACCOUNTING_LETTERING_NBLETTERS', GETPOST('ACCOUNTING_LETTERING_NBLETTERS'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + + // Export options + $modelcsv = GETPOSTINT('ACCOUNTING_EXPORT_MODELCSV'); + + if (!empty($modelcsv)) { + if (!dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { + $error++; + } + //if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) { + // dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity); + //} + } else { + $error++; + } + + foreach ($main_option as $constname) { + $constvalue = GETPOST($constname, 'alpha'); + + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + + foreach ($listparam[$modelcsv] as $key => $value) { + $constante = $key; + + if (strpos($constante, 'ACCOUNTING') !== false) { + $constvalue = GETPOST($key, 'alpha'); + if (!dolibarr_set_const($db, $constante, $constvalue, 'chaine', 0, '', $conf->entity)) { $error++; } } + } - foreach ($listparam[$modelcsv] as $key => $value) { - $constante = $key; - - if (strpos($constante, 'ACCOUNTING') !== false) { - $constvalue = GETPOST($key, 'alpha'); - if (!dolibarr_set_const($db, $constante, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - } - - if (!$error) { - // reload - $configuration = $accountancyexport->getTypeConfig(); - $listparam = $configuration['param']; - } + if (!$error) { + // reload + $configuration = $accountancyexport->getTypeConfig(); + $listparam = $configuration['param']; } if (!$error) { @@ -460,9 +459,10 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1) { } -// Show form main options +// Show form for main parameters print $formSetup->generateOutput(true); + print '


'; @@ -498,7 +498,7 @@ foreach ($list_binding as $key) { 1=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece"), 2=>$langs->trans("ThirdPartyName") ); - print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); + print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width300'); } else { print ''; } @@ -579,8 +579,10 @@ print '
'; print '
'; + // Show numbering options -print '

'; +print '


'; + // Accountancy Numbering model $dirmodels = array_merge(array('/'), $conf->modules_parts['models']); @@ -695,7 +697,8 @@ print ''; // Show advanced options -print '

'; +print '


'; + // Advanced params print '
'; @@ -786,7 +789,8 @@ print '
'; print '
'; -print '

'; + +print '


'; // Export options diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index ff9fbcdb26d..b94e7a770dc 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -366,12 +366,9 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-adm $titre = $langs->trans("DictionarySetup"); $linkback = ''; -if ($id) { - $titre .= ' - '.$langs->trans($tablib[$id]); - $titlepicto = 'title_accountancy'; -} else { - $titlepicto = ''; -} + +$titre .= ' - '.$langs->trans($tablib[$id]); +$titlepicto = 'title_accountancy'; print load_fiche_titre($titre, $linkback, $titlepicto); @@ -384,309 +381,297 @@ if ($action == 'delete') { /* * Show a dictionary */ -if ($id) { - // Complete requete recherche valeurs avec critere de tri - $sql = $tabsql[$id]; - $sql .= " WHERE a.entity = ".((int) $conf->entity); - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') { - $sortfield = 'country_code'; - } - $sql .= $db->order($sortfield, $sortorder); - $sql .= $db->plimit($listlimit + 1, $offset); +// Complete requete recherche valeurs avec critere de tri +$sql = $tabsql[$id]; +$sql .= " WHERE a.entity = ".((int) $conf->entity); +// If sort order is "country", we use country_code instead +if ($sortfield == 'country') { + $sortfield = 'country_code'; +} +$sql .= $db->order($sortfield, $sortorder); +$sql .= $db->plimit($listlimit + 1, $offset); + +$fieldlist = explode(',', $tabfield[$id]); + +print '
'; +print ''; +print ''; + +print '
'; +print ''; + +// Form to add a new line +if ($tabname[$id]) { $fieldlist = explode(',', $tabfield[$id]); - print ''; - print ''; - print ''; + // Line for title + print ''; + foreach ($fieldlist as $field => $value) { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $valuetoshow = ucfirst($fieldlist[$field]); // By default + $valuetoshow = $langs->trans($valuetoshow); // try to translate + $class = "left"; + if ($fieldlist[$field] == 'code') { + $valuetoshow = $langs->trans("Code"); + } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { + $valuetoshow = $langs->trans("Label"); + } + if ($fieldlist[$field] == 'nature') { + $valuetoshow = $langs->trans("NatureOfJournal"); + } - print '
'; - print '
'; - - // Form to add a new line - if ($tabname[$id]) { - $fieldlist = explode(',', $tabfield[$id]); - - // Line for title - print ''; - foreach ($fieldlist as $field => $value) { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $valuetoshow = ucfirst($fieldlist[$field]); // By default - $valuetoshow = $langs->trans($valuetoshow); // try to translate - $class = "left"; - if ($fieldlist[$field] == 'code') { - $valuetoshow = $langs->trans("Code"); - } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { - $valuetoshow = $langs->trans("Label"); - } - if ($fieldlist[$field] == 'nature') { - $valuetoshow = $langs->trans("NatureOfJournal"); + if ($valuetoshow != '') { + print ''; + } + } - if ($valuetoshow != '') { - print ''; + print ''; + print ''; + print ''; + print ''; + + // Line to enter new values + print ''; + + $obj = new stdClass(); + // If data was already input, we define them in obj to populate input fields. + if (GETPOST('actionadd', 'alpha')) { + foreach ($fieldlist as $key => $val) { + if (GETPOST($val) != '') { + $obj->$val = GETPOST($val); + } + } + } + + $tmpaction = 'create'; + $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); + $reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; + $errors = $hookmanager->errors; + + if (empty($reshook)) { + fieldListJournal($fieldlist, $obj, $tabname[$id], 'add'); + } + + print ''; + print ""; + + print ''; // Keep   to have a line with enough height +} + + + +// List of available record in database +dol_syslog("htdocs/admin/dict", LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + + $param = '&id='.((int) $id); + if ($search_country_id > 0) { + $param .= '&search_country_id='.urlencode((string) ($search_country_id)); + } + $paramwithsearch = $param; + $paramwithsearch .= '&sortorder='.$sortorder; + $paramwithsearch .= '&sortfield='.$sortfield; + + if (GETPOST('from', 'alpha')) { + $paramwithsearch .= '&from='.GETPOST('from', 'alpha'); + } + + // There is several pages + if ($num > $listlimit) { + print ''; + } + + // Title line with search boxes + /*print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + */ + + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $class = "left"; + $sortable = 1; + $valuetoshow = ''; + /* + $tmparray=getLabelOfField($fieldlist[$field]); + $valuetoshow=$tmp['valuetoshow']; + $align=$tmp['align']; + $sortable=$tmp['sortable']; + */ + $valuetoshow = ucfirst($fieldlist[$field]); // By default + $valuetoshow = $langs->trans($valuetoshow); // try to translate + if ($fieldlist[$field] == 'code') { + $valuetoshow = $langs->trans("Code"); + } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { + $valuetoshow = $langs->trans("Label"); + } + if ($fieldlist[$field] == 'nature') { + $valuetoshow = $langs->trans("NatureOfJournal"); + } + + // Affiche nom du champ + print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "", $sortfield, $sortorder, $class.' '); + } + print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, 'center '); + print getTitleFieldOfList(''); + print getTitleFieldOfList(''); + print getTitleFieldOfList(''); + print ''; + + if ($num) { + // Lines with values + while ($i < $num) { + $obj = $db->fetch_object($resql); + //print_r($obj); + print ''; + if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + $tmpaction = 'edit'; + $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); + $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; + $errors = $hookmanager->errors; + + // Show fields + if (empty($reshook)) { + fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit'); } + + print ''; + } else { + $tmpaction = 'view'; + $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); + $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + + $error = $hookmanager->error; + $errors = $hookmanager->errors; + + if (empty($reshook)) { + $langs->load("accountancy"); + foreach ($fieldlist as $field => $value) { + $class = "left"; + $tmpvar = $fieldlist[$field]; + $valuetoshow = $obj->$tmpvar; + if ($valuetoshow == 'all') { + $valuetoshow = $langs->trans('All'); + } elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + $key = $langs->trans("AccountingJournalType".strtoupper($obj->nature)); + $valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + $valuetoshow = $langs->trans($obj->label); + } + + $class = 'tddict'; + // Show value for field + print ''; + } + } + + // Can an entry be erased or disabled ? + $iserasable = 1; + $canbedisabled = 1; + $canbemodified = 1; // true by default + if (isset($obj->code) && $id != 10) { + if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { + $iserasable = 0; + $canbedisabled = 0; + } + } + + $canbemodified = $iserasable; + + $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : ''); + $url .= '&'.$param; + $url .= '&'; + + // Active + print '"; + + // Modify link + if ($canbemodified) { + print ''; + } else { + print ''; + } + + // Delete link + if ($iserasable) { + print ''; + } else { + print ''; + } + + print ''; + print ''; } + + print "\n"; + $i++; } - - print ''; - print ''; - print ''; - print ''; - print ''; - - // Line to enter new values - print ''; - - $obj = new stdClass(); - // If data was already input, we define them in obj to populate input fields. - if (GETPOST('actionadd', 'alpha')) { - foreach ($fieldlist as $key => $val) { - if (GETPOST($val) != '') { - $obj->$val = GETPOST($val); - } - } - } - - $tmpaction = 'create'; - $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); - $reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; - $errors = $hookmanager->errors; - - if (empty($reshook)) { - fieldListJournal($fieldlist, $obj, $tabname[$id], 'add'); - } - - print ''; - print ""; - - print ''; // Keep   to have a line with enough height } - - - - // List of available record in database - dol_syslog("htdocs/admin/dict", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - - $param = '&id='.((int) $id); - if ($search_country_id > 0) { - $param .= '&search_country_id='.urlencode((string) ($search_country_id)); - } - $paramwithsearch = $param; - if ($sortorder) { - $paramwithsearch .= '&sortorder='.$sortorder; - } - if ($sortfield) { - $paramwithsearch .= '&sortfield='.$sortfield; - } - if (GETPOST('from', 'alpha')) { - $paramwithsearch .= '&from='.GETPOST('from', 'alpha'); - } - - // There is several pages - if ($num > $listlimit) { - print ''; - } - - // Title line with search boxes - /*print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - */ - - // Title of lines - print ''; - foreach ($fieldlist as $field => $value) { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $showfield = 1; // By default - $class = "left"; - $sortable = 1; - $valuetoshow = ''; - /* - $tmparray=getLabelOfField($fieldlist[$field]); - $showfield=$tmp['showfield']; - $valuetoshow=$tmp['valuetoshow']; - $align=$tmp['align']; - $sortable=$tmp['sortable']; - */ - $valuetoshow = ucfirst($fieldlist[$field]); // By default - $valuetoshow = $langs->trans($valuetoshow); // try to translate - if ($fieldlist[$field] == 'code') { - $valuetoshow = $langs->trans("Code"); - } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { - $valuetoshow = $langs->trans("Label"); - } - if ($fieldlist[$field] == 'nature') { - $valuetoshow = $langs->trans("NatureOfJournal"); - } - - // Affiche nom du champ - if ($showfield) { - print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "", $sortfield, $sortorder, $class.' '); - } - } - print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, 'center '); - print getTitleFieldOfList(''); - print getTitleFieldOfList(''); - print getTitleFieldOfList(''); - print ''; - - if ($num) { - // Lines with values - while ($i < $num) { - $obj = $db->fetch_object($resql); - //print_r($obj); - print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { - $tmpaction = 'edit'; - $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); - $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; - $errors = $hookmanager->errors; - - // Show fields - if (empty($reshook)) { - fieldListJournal($fieldlist, $obj, $tabname[$id], 'edit'); - } - - print ''; - } else { - $tmpaction = 'view'; - $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]); - $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - - $error = $hookmanager->error; - $errors = $hookmanager->errors; - - if (empty($reshook)) { - $langs->load("accountancy"); - foreach ($fieldlist as $field => $value) { - $showfield = 1; - $class = "left"; - $tmpvar = $fieldlist[$field]; - $valuetoshow = $obj->$tmpvar; - if ($valuetoshow == 'all') { - $valuetoshow = $langs->trans('All'); - } elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { - $key = $langs->trans("AccountingJournalType".strtoupper($obj->nature)); - $valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]}); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { - $valuetoshow = $langs->trans($obj->label); - } - - $class = 'tddict'; - // Show value for field - if ($showfield) { - print ''; - } - } - } - - // Can an entry be erased or disabled ? - $iserasable = 1; - $canbedisabled = 1; - $canbemodified = 1; // true by default - if (isset($obj->code) && $id != 10) { - if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { - $iserasable = 0; - $canbedisabled = 0; - } - } - - $canbemodified = $iserasable; - - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ? urlencode($obj->code) : ''); - if ($param) { - $url .= '&'.$param; - } - $url .= '&'; - - // Active - print '"; - - // Modify link - if ($canbemodified) { - print ''; - } else { - print ''; - } - - // Delete link - if ($iserasable) { - print ''; - } else { - print ''; - } - - print ''; - - print ''; - } - - print "\n"; - $i++; - } - } - } else { - dol_print_error($db); - } - - print '
'; + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) { + print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + } elseif (!empty($tabhelp[$id][$value])) { + print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); + } else { + print $valuetoshow; } + print ''; - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) { - print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - } elseif (!empty($tabhelp[$id][$value])) { - print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); - } else { - print $valuetoshow; + print ''; + print ''; + print '
'; + print ''; + print '
 
'; + print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), ''); + print '
'; + $searchpicto=$form->showFilterButtons(); + print $searchpicto; + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + print '
'.dol_escape_htmltag($valuetoshow).''; + if ($canbedisabled) { + print ''.$actl[$obj->active].''; + } else { + print $langs->trans("AlwaysActive"); + } + print "'.img_edit().' '; + if ($user->admin) { + print ''.img_delete().''; + } + //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin + print ' 
'; - print ''; - print '
'; - print ''; - print '
 
'; - print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), ''); - print '
'; - $searchpicto=$form->showFilterButtons(); - print $searchpicto; - print '
'; - print ''; - print ''; - print ''; - print ''; - print '
'; - print '
'.dol_escape_htmltag($valuetoshow).''; - if ($canbedisabled) { - print ''.$actl[$obj->active].''; - } else { - print $langs->trans("AlwaysActive"); - } - print "'.img_edit().' '; - if ($user->admin) { - print ''.img_delete().''; - } - //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin - print ' 
'; - print '
'; - - print '
'; +} else { + dol_print_error($db); } +print ''; +print ''; + +print ''; + + print '
'; // End of page diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 4d3ca988dc0..c03f08c3fcf 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -352,7 +352,7 @@ if ($action != 'export') { $newcardbutton .= dolGetButtonTitle($langs->trans('AccountBalance')." - ".$langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/balance.php?type=sub' . $url_param, '', 1, array('morecss' => 'marginleftonly')); } - $newcardbutton .= dolGetButtonTitle($langs->trans('ExportToCsv'), '', 'fa fa-file-csv paddingleft', $_SERVER['PHP_SELF'], 'exportcsvbutton', 1, array('morecss' => 'marginleftonly')); + $newcardbutton .= dolGetButtonTitle($langs->trans("Export").' (' . getDolGlobalString('ACCOUNTING_EXPORT_FORMAT').')', '', 'fa fa-file-csv paddingleft', $_SERVER['PHP_SELF'], 'exportcsvbutton', 1, array('morecss' => 'marginleftonly')); print '"; print ''; + }); + '; } print "\n"; // Company - print ''.$langs->trans("Company").''; + print ''.$langs->trans("Company").''.img_picto('', 'company', 'class="pictofixedwidth"').''; // Civility print ''.$langs->trans("UserTitle").''; @@ -1118,11 +1192,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // EMail print ''.(getDolGlobalString('ADHERENT_MAIL_REQUIRED') ? '' : '').$langs->trans("EMail").(getDolGlobalString('ADHERENT_MAIL_REQUIRED') ? '' : '').''; - print ''.img_picto('', 'object_email').' '; + print ''.img_picto('', 'object_email', 'class="pictofixedwidth"').' '; // Website print ''.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).''; - print ''.img_picto('', 'globe').' '; + print ''.img_picto('', 'globe', 'class="pictofixedwidth"').' '; // Address print ''.$langs->trans("Address").''; @@ -1328,7 +1402,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ""; // Company - print ''.$langs->trans("Company").'company).'">'; + print ''.$langs->trans("Company").''.img_picto('', 'company', 'class="pictofixedwidth"').'company).'">'; // Civility print ''.$langs->trans("UserTitle").''; @@ -1615,10 +1689,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
'.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
'.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= '
'.$langs->trans("MailRecipient").': '.$object->email.''; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1679,10 +1753,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnResiliate()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1740,10 +1814,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnExclude()), $substitutionarray, $outputlangs); $tmp = $langs->trans("SendingAnEMailToMember"); - $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').', '; + $tmp .= '
('.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).', '; $tmp .= $langs->trans("MailRecipient").': '.$object->email.')'; $helpcontent = ''; - $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM').'
'."\n"; + $helpcontent .= ''.$langs->trans("MailFrom").': '.getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from).'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("Subject").':
'."\n"; $helpcontent .= $subjecttosend."\n"; @@ -1777,6 +1851,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ($action == 'add_spip') { print $form->formconfirm("card.php?rowid=".$id, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } + + // Confirm merge + if ($action == 'merge') { + $formquestion = array( + array( + 'name' => 'member_origin', + 'label' => $langs->trans('MergeOriginMember'), + 'type' => 'other', + 'value' => $form->selectMembers('', 'member_origin', '', 0, 1, '', 0, array(), 0, 'SelectMember', 0, 'minwidth200', array(), 1, array($object->id)) + ) + ); + + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("MergeMembers"), $langs->trans("ConfirmMergeMembers"), "confirm_merge", $formquestion, 'no', 1, 300); + } + // Confirm removed from spip if ($action == 'del_spip') { print $form->formconfirm("card.php?rowid=$id", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); @@ -1793,7 +1882,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; - $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; @@ -2087,6 +2176,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } + // Merge + print dolGetButtonAction($langs->trans('MergeMembers'), $langs->trans('Merge'), 'danger', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=merge&token='.newToken(), '', $user->hasRight('adherent', 'supprimer')); + // Delete if ($user->hasRight('adherent', 'supprimer')) { print ''.$langs->trans("Delete").''."\n"; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index d6b7963783d..191cccae92c 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -1,10 +1,10 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2006-2013 Laurent Destailleur - * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2024 Alexandre Spangaro + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,22 +26,22 @@ * \brief Page to output members business cards */ require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/modules/member/modules_cards.php'; -require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php'; - /** * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager * @var Translate $langs * @var User $user - * - * @var array $_Avery_Labels */ +require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; +/** @var array $_Avery_Labels */ + +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/member/modules_cards.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php'; + $langs->loadLangs(array("members", "errors")); // Choice of printing year or current year. @@ -136,6 +136,12 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { } } + + $now = dol_now(); + $year = dol_print_date($now, '%Y'); + $month = dol_print_date($now, '%m'); + $day = dol_print_date($now, '%d'); + // List of values to scan for a replacement $substitutionarray = array( '__MEMBER_ID__' => $objp->rowid, @@ -163,6 +169,28 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { foreach ($adherentstatic->array_options as $key => $val) { $substitutionarray['__'.strtoupper($key).'__'] = $val; } + + // Add old values for backward compatibility (need upgrade of member setup to be removed) + $substitutionarrayold = array( + '__ID__' => $objp->rowid, + '__REF__' => $objp->ref, + '__LOGIN__' => empty($objp->login) ? '' : $objp->login, + '__TITLE__' => empty($objp->civility) ? '' : $langs->trans("Civility".$objp->civility), + '__FIRSTNAME__' => empty($objp->firstname) ? '' : $objp->firstname, + '__LASTNAME__' => empty($objp->lastname) ? '' : $objp->lastname, + '__FULLNAME__' => $adherentstatic->getFullName($langs), + '__COMPANY__' => empty($objp->company) ? '' : $objp->company, + '__ADDRESS__' => empty($objp->address) ? '' : $objp->address, + '__ZIP__' => empty($objp->zip) ? '' : $objp->zip, + '__TOWN__' => empty($objp->town) ? '' : $objp->town, + '__COUNTRY__' => empty($objp->country) ? '' : $objp->country, + '__COUNTRY_CODE__' => empty($objp->country_code) ? '' : $objp->country_code, + '__EMAIL__' => empty($objp->email) ? '' : $objp->email, + '__BIRTH__' => dol_print_date($objp->birth, 'day'), + '__TYPE__' => empty($objp->type) ? '' : $objp->type, + ); + $substitutionarray = array_merge($substitutionarray, $substitutionarrayold); + complete_substitutions_array($substitutionarray, $langs, $adherentstatic); // For business cards @@ -237,7 +265,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); } if (!$mesg) { - $result = members_card_pdf_create($db, $arrayofmembers, $modelcard, $outputlangs, '', 'standard', 'tmp_cards'); + $result = members_card_pdf_create($db, $arrayofmembers, $modelcard, $outputlangs, '', 'standard_member', 'tmp_cards'); } } elseif ($mode == 'cardlogin') { if (!count($arrayofmembers)) { @@ -247,7 +275,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); } if (!$mesg) { - $result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs, '', 'standard', 'tmp_cards_login'); + $result = members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs, '', 'standard_member', 'tmp_cards_login'); } } elseif ($mode == 'label') { if (!count($arrayofmembers)) { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 76214e0b5e3..29285113098 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -175,7 +175,7 @@ class Adherent extends CommonObject public $morphy; /** - * @var int<0,1> Info can be public + * @var ?int<0,1> Info can be public */ public $public; @@ -283,12 +283,12 @@ class Adherent extends CommonObject public $last_subscription_date_start; /** - * @var int|string date + * @var int|string|null date */ public $last_subscription_date_end; /** - * @var int|string date + * @var null|float|string date, null until set */ public $last_subscription_amount; @@ -338,7 +338,7 @@ class Adherent extends CommonObject * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) * 'noteditable' says if field is not editable (1 or 0) * 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0') - * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'default' is a default value for creation (can still be overwritten by the Setup of Default Values if the field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. * 'index' if we want an index in database. * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...). * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. @@ -505,11 +505,8 @@ class Adherent extends CommonObject $texttosend = dol_htmlentitiesbr($texttosend); } - // Envoi mail confirmation - $from = $conf->email_from; - if (getDolGlobalString('ADHERENT_MAIL_FROM')) { - $from = getDolGlobalString('ADHERENT_MAIL_FROM'); - } + // Send mail confirmation + $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); $trackid = 'mem'.$this->id; @@ -662,7 +659,7 @@ class Adherent extends CommonObject */ public function create($user, $notrigger = 0) { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $error = 0; @@ -827,6 +824,7 @@ class Adherent extends CommonObject // $this->note_private = ($this->note_private ? $this->note_private : $this->note_private); $this->url = $this->url ? clean_url($this->url, 0) : ''; $this->setUpperOrLowerCase(); + // Check parameters if (getDolGlobalString('ADHERENT_MAIL_REQUIRED') && !isValidEmail((string) $this->email)) { $langs->load("errors"); @@ -838,6 +836,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql .= " ref = '".$this->db->escape($this->ref)."'"; + $sql .= ", ref_ext = ".(empty($this->ref_ext) ? "null" : "'".$this->db->escape($this->ref_ext)."'"); $sql .= ", civility = ".($this->civility_id ? "'".$this->db->escape($this->civility_id)."'" : "null"); $sql .= ", firstname = ".($this->firstname ? "'".$this->db->escape($this->firstname)."'" : "null"); $sql .= ", lastname = ".($this->lastname ? "'".$this->db->escape($this->lastname)."'" : "null"); @@ -904,11 +903,9 @@ class Adherent extends CommonObject $action = 'update'; // Actions on extra fields - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; } // Update password @@ -951,7 +948,7 @@ class Adherent extends CommonObject if (!$error && $nbrowsaffected) { // If something has change in main data // Update information on linked user if it is an update - if (!$error && $this->user_id > 0 && !$nosyncuser) { + if ($this->user_id > 0 && !$nosyncuser) { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; dol_syslog(get_class($this)."::update update linked user"); @@ -1003,7 +1000,7 @@ class Adherent extends CommonObject } // Update information on linked thirdparty if it is an update - if (!$error && $this->fk_soc > 0 && !$nosyncthirdparty) { + if (!$error && $this->socid > 0 && !$nosyncthirdparty) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; dol_syslog(get_class($this)."::update update linked thirdparty"); @@ -1011,7 +1008,7 @@ class Adherent extends CommonObject // This member is linked with a thirdparty, so we also update thirdparty information // if this is an update. $lthirdparty = new Societe($this->db); - $result = $lthirdparty->fetch($this->fk_soc); + $result = $lthirdparty->fetch($this->socid); if ($result > 0) { $lthirdparty->address = $this->address; @@ -1025,7 +1022,7 @@ class Adherent extends CommonObject //$lthirdparty->phone_mobile=$this->phone_mobile; $lthirdparty->default_lang = $this->default_lang; - $result = $lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates + $result = $lthirdparty->update($this->socid, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates if ($result < 0) { $this->error = $lthirdparty->error; @@ -1133,7 +1130,7 @@ class Adherent extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('MEMBER_DELETE', $user); if ($result < 0) { @@ -1205,6 +1202,150 @@ class Adherent extends CommonObject } } + /** + * Merge a member with current one, deleting the given company $member_origin_id. + * The member given in parameter will be removed. + * This is called for example by the adherent/card.php file. + * It calls the method replaceMember() of each object with relation with member, + * including hook 'replaceMember' for external modules. + * + * @param int $member_origin_id Member to merge the data from + * @return int -1 if error, >=0 if OK + */ + public function mergeMembers($member_origin_id) + { + global $conf, $langs, $hookmanager, $user, $action; + + $error = 0; + $member_origin = new Adherent($this->db); // The member that we will delete + + dol_syslog("mergeMembers merge member id=".$member_origin_id." (will be deleted) into the member id=".$this->id); + if ($member_origin->fetch($member_origin_id) < 1) { + $this->error = $langs->trans('ErrorRecordNotFound'); + $error++; + } + + if (!$error) { + $this->db->begin(); + $listofproperties = array( + 'ref_ext', 'civility', 'lastname', 'firstname', 'morphy', 'societe', 'socid', 'user_id','address', + 'zip', 'town', 'state_id', 'country', 'phone', 'phone_perso', 'phone_mobile', 'email', + 'url', 'socialnetworks', 'birth', 'gender', 'photo', 'public', 'datefin', 'default_lang', + 'canvas', 'model_pdf', 'import_key' + ); + foreach ($listofproperties as $property) { + if (empty($this->$property)) { + $this->$property = $member_origin->$property; + } + } + + // Concat some data + $listofproperties = array( + 'note_public', 'note_private' + ); + foreach ($listofproperties as $property) { + $this->$property = dol_concatdesc($this->$property, $member_origin->$property); + } + + // Merge extrafields + if (is_array($member_origin->array_options)) { + foreach ($member_origin->array_options as $key => $val) { + if (empty($this->array_options[$key])) { + $this->array_options[$key] = $val; + } + } + } + + // Merge categories + include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $static_cat = new Categorie($this->db); + $custcats_ori = $static_cat->containing($member_origin->id, 'member', 'id'); + $custcats = $static_cat->containing($this->id, 'member', 'id'); + $custcats = array_merge($custcats, $custcats_ori); + $this->setCategories($custcats); + + $result = $this->update($user, 1, 1, 1, 1, 'merge'); + if ($result < 0) { + $error++; + } + + // Merge subscriptions + if (!$error && $member_origin->fetch_subscriptions() < 1) { + $error++; + } + + if (!$error) { + foreach ($member_origin->subscriptions as $key => $subscription) { + $subscription->fk_adherent = $this->id; + $result = $subscription->update($user); + if ($result < 0) { + $error++; + break; + } + } + } + + // External modules should update their ones too + if (!$error) { + $parameters = array('member_origin' => $member_origin->id, 'member_dest' => $this->id); + $reshook = $hookmanager->executeHooks('replaceMember', $parameters, $this, $action); + + if ($reshook < 0) { + $this->setErrorsFromObject($hookmanager); + $error++; + } + } + + if (!$error) { + $this->context = array('merge' => 1, 'mergefromid' => $member_origin->id); + + // Call trigger + $result = $this->call_trigger('MEMBER_MODIFY', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } + + if (!$error) { + // We finally remove the old member + if ($member_origin->delete($user) < 1) { + $this->setErrorsFromObject($member_origin); + $error++; + } + } + + if (!$error) { + // Move files from the dir of the third party to delete into the dir of the third party to keep + if (!empty($conf->adherent->multidir_output[$this->entity])) { + $srcdir = $conf->adherent->multidir_output[$this->entity]."/".$member_origin->id; + $destdir = $conf->adherent->multidir_output[$this->entity]."/".$this->id; + + if (dol_is_dir($srcdir)) { + $dirlist = dol_dir_list($srcdir, 'files', 1); + foreach ($dirlist as $filetomove) { + $destfile = $destdir.'/'.$filetomove['relativename']; + $result = dol_move($filetomove['fullname'], $destfile, '0', 0, 0, 1); + if (!$result) { + $error++; + } + } + } + } + } + + if (!$error) { + $this->db->commit(); + return 0; + } else { + $langs->load("errors"); + $this->error = $langs->trans('ErrorMembersMerge'); + $this->db->rollback(); + return -1; + } + } + return -1; + } /** * Change password of a user @@ -1447,23 +1588,23 @@ class Adherent extends CommonObject * * @param int $rowid Id of object to load * @param string $ref To load member from its ref - * @param int $fk_soc To load member from its link to third party + * @param int $socid To load member from its link to third party * @param string $ref_ext External reference * @param bool $fetch_optionals To load optionals (extrafields) * @param bool $fetch_subscriptions To load member subscriptions * @return int >0 if OK, 0 if not found, <0 if KO */ - public function fetch($rowid, $ref = '', $fk_soc = 0, $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) + public function fetch($rowid, $ref = '', $socid = 0, $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true) { global $langs; $sql = "SELECT d.rowid, d.ref, d.ref_ext, d.civility as civility_code, d.gender, d.firstname, d.lastname,"; - $sql .= " d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; + $sql .= " d.societe as company, d.fk_soc as socid, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; $sql .= " d.note_public,"; $sql .= " d.email, d.url, d.socialnetworks, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,"; $sql .= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql .= " d.datec as datec,"; - $sql .= " d.tms as datem,"; + $sql .= " GREATEST(d.tms, aef.tms) as datem,"; $sql .= " d.datefin as datefin, d.default_lang,"; $sql .= " d.birth as birthday,"; $sql .= " d.datevalid as datev,"; @@ -1475,18 +1616,19 @@ class Adherent extends CommonObject $sql .= " t.libelle as type, t.subscription as subscription,"; $sql .= " u.rowid as user_id, u.login as user_login"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as aef ON aef.fk_object = d.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.country = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.state_id = dep.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member"; $sql .= " WHERE d.fk_adherent_type = t.rowid"; if ($rowid) { $sql .= " AND d.rowid=".((int) $rowid); - } elseif ($ref || $fk_soc) { + } elseif ($ref || $socid) { $sql .= " AND d.entity IN (".getEntity('adherent').")"; if ($ref) { $sql .= " AND d.ref='".$this->db->escape($ref)."'"; - } elseif ($fk_soc > 0) { - $sql .= " AND d.fk_soc=".((int) $fk_soc); + } elseif ($socid > 0) { + $sql .= " AND d.fk_soc=".((int) $socid); } } elseif ($ref_ext) { $sql .= " AND d.ref_ext='".$this->db->escape($ref_ext)."'"; @@ -1513,8 +1655,8 @@ class Adherent extends CommonObject $this->login = $obj->login; $this->societe = $obj->company; $this->company = $obj->company; - $this->socid = $obj->fk_soc; - $this->fk_soc = $obj->fk_soc; // For backward compatibility + $this->socid = $obj->socid; + $this->fk_soc = $obj->socid; // For backward compatibility $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; @@ -1606,8 +1748,6 @@ class Adherent extends CommonObject public function fetch_subscriptions() { // phpcs:enable - global $langs; - require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note as note_public, c.fk_bank,"; @@ -1635,13 +1775,13 @@ class Adherent extends CommonObject $this->last_subscription_date = $this->db->jdate($obj->datec); $this->last_subscription_date_start = $this->db->jdate($obj->dateh); $this->last_subscription_date_end = $this->db->jdate($obj->datef); - $this->last_subscription_amount = $obj->subscription; + $this->last_subscription_amount = (float) $obj->subscription; $subscription = new Subscription($this->db); $subscription->id = $obj->rowid; $subscription->fk_adherent = $obj->fk_adherent; $subscription->fk_type = $obj->fk_type; - $subscription->amount = $obj->subscription; + $subscription->amount = (float) $obj->subscription; $subscription->note = $obj->note_public; $subscription->note_public = $obj->note_public; $subscription->fk_bank = $obj->fk_bank; @@ -1670,8 +1810,6 @@ class Adherent extends CommonObject */ public function fetchPartnerships($mode) { - global $langs; - require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; @@ -1688,15 +1826,16 @@ class Adherent extends CommonObject * @param double $amount Amount of subscription (0 accepted for some members) * @param int $accountid Id bank account. NOT USED. * @param string $operation Code of payment mode (if Id bank account provided). Example: 'CB', ... NOT USED. - * @param string $label Label operation (if Id bank account provided). - * @param string $num_chq Numero cheque (if Id bank account provided) + * @param string $label Label operation stored into public note. + * @param string $num_chq Numero cheque (if Id bank account provided). NOT USED. * @param string $emetteur_nom Name of cheque writer * @param string $emetteur_banque Name of bank of cheque * @param int $datesubend Date end subscription * @param int $fk_type Member type id + * @param string $ref_ext To save an external ref * @return int rowid of record added, <0 if KO */ - public function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0, $fk_type = null) + public function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0, $fk_type = null, $ref_ext = '') { global $user; @@ -1725,9 +1864,10 @@ class Adherent extends CommonObject $subscription->dateh = $date; // Date of new subscription $subscription->datef = $datefin; // End data of new subscription $subscription->amount = $amount; - $subscription->note = $label; // deprecated $subscription->note_public = $label; + $subscription->note_private = ''; $subscription->fk_type = $fk_type; + $subscription->ref_ext = $ref_ext; if (empty($subscription->user_creation_id)) { $subscription->user_creation_id = $user->id; @@ -1744,6 +1884,8 @@ class Adherent extends CommonObject $this->last_subscription_date_start = $date; $this->last_subscription_date_end = $datefin; $this->last_subscription_amount = $amount; + } else { + $error++; } if (!$error) { @@ -1834,7 +1976,7 @@ class Adherent extends CommonObject $customer = new Societe($this->db); if (!$error) { - if (!($this->fk_soc > 0)) { // If not yet linked to a company + if (!($this->socid > 0)) { // If not yet linked to a company if ($autocreatethirdparty) { // Create a linked thirdparty to member $companyalias = ''; @@ -1859,6 +2001,7 @@ class Adherent extends CommonObject $error++; } else { $this->fk_soc = $result; + $this->socid = $result; } } else { $langs->load("errors"); @@ -1869,7 +2012,7 @@ class Adherent extends CommonObject } } if (!$error) { - $result = $customer->fetch($this->fk_soc); + $result = $customer->fetch($this->socid); if ($result <= 0) { $this->error = $customer->error; $this->errors = $customer->errors; @@ -1890,7 +2033,7 @@ class Adherent extends CommonObject $this->errors[] = $this->error; } } - $invoice->socid = $this->fk_soc; + $invoice->socid = $this->socid; // set customer's payment bank account on the invoice if (!empty($customer->fk_account)) { $invoice->fk_account = $customer->fk_account; @@ -1913,8 +2056,7 @@ class Adherent extends CommonObject $result = $invoice->create($user); if ($result <= 0) { - $this->error = $invoice->error; - $this->errors = $invoice->errors; + $this->setErrorsFromObject($invoice); $error++; } else { $this->invoice = $invoice; @@ -1936,8 +2078,7 @@ class Adherent extends CommonObject // @phan-suppress-next-line PhanPluginSuspiciousParamPosition $result = $invoice->addline($label, 0, 1, $vattouse, 0, 0, $idprodsubscription, 0, $datesubscription, '', 0, 0, 0, 'TTC', $amount, 1); if ($result <= 0) { - $this->error = $invoice->error; - $this->errors = $invoice->errors; + $this->setErrorsFromObject($invoice); $error++; } } @@ -1946,8 +2087,7 @@ class Adherent extends CommonObject // Validate invoice $result = $invoice->validate($user); if ($result <= 0) { - $this->error = $invoice->error; - $this->errors = $invoice->errors; + $this->setErrorsFromObject($invoice); $error++; } } @@ -1975,22 +2115,18 @@ class Adherent extends CommonObject $paiement->ext_payment_id = $ext_payment_id; $paiement->ext_payment_site = $ext_payment_site; - if (!$error) { - // Create payment line for invoice - $paiement_id = $paiement->create($user); - if (!($paiement_id > 0)) { - $this->error = $paiement->error; - $this->errors = $paiement->errors; - $error++; - } + // Create payment line for invoice + $paiement_id = $paiement->create($user); + if (!($paiement_id > 0)) { + $this->setErrorsFromObject($paiement); + $error++; } if (!$error) { // Add transaction into bank account $bank_line_id = $paiement->addPaymentToBank($user, 'payment', '(SubscriptionPayment)', $accountid, $emetteur_nom, $emetteur_banque); if (!($bank_line_id > 0)) { - $this->error = $paiement->error; - $this->errors = $paiement->errors; + $this->setErrorsFromObject($paiement); $error++; } } @@ -2409,10 +2545,11 @@ class Adherent extends CommonObject $label = implode($this->getTooltipContentArray($params)); } - $url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id); + $baseurl = DOL_URL_ROOT . '/adherents/card.php'; if ($option == 'subscription') { - $url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.((int) $this->id); + $baseurl = DOL_URL_ROOT . '/adherents/subscription.php'; } + $query = ['rowid' => $this->id]; if ($option != 'nolink') { // Add param to save lastsearch_values or not @@ -2421,9 +2558,10 @@ class Adherent extends CommonObject $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { - $url .= '&save_lastsearch_values=1'; + $query = array_merge($query, ['save_lastsearch_values' => 1]); } } + $url = dolBuildUrl($baseurl, $query); $linkstart .= ' 0) { - $picto = ''.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).''; + $picto = ''.img_object('', 'user', ' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).''; } else { // Picto must be a photo - $picto = ''; + $picto = ''; $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.(($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1); $picto .= ''; } @@ -2460,7 +2597,7 @@ class Adherent extends CommonObject } if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) { if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { - $result .= 'status) || $this->status) ? '' : ' strikefordisabled'). ($morecss ? ' usertext'.$morecss : '').'">'; } if ($mode == 'login') { @@ -2973,9 +3110,10 @@ class Adherent extends CommonObject { $sql = 'SELECT a.rowid, a.datec as datec,'; $sql .= ' a.datevalid as datev,'; - $sql .= ' a.tms as datem,'; + $sql .= ' GREATEST(a.tms, aef.tms) as datem,'; $sql .= ' a.fk_user_author, a.fk_user_valid, a.fk_user_mod'; $sql .= ' FROM '.MAIN_DB_PREFIX.'adherent as a'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as aef ON aef.fk_object = a.rowid'; $sql .= ' WHERE a.rowid = '.((int) $id); dol_syslog(get_class($this)."::info", LOG_DEBUG); @@ -3015,7 +3153,7 @@ class Adherent extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - $nb = $obj->nb; + $nb = (int) $obj->nb; $this->db->free($resql); return $nb; @@ -3186,7 +3324,7 @@ class Adherent extends CommonObject $subject = make_substitutions($arraydefaultmessage->topic, $substitutionarray, $outputlangs); $msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs); - $from = getDolGlobalString('ADHERENT_MAIL_FROM'); + $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); $to = $adherent->email; $cc = getDolGlobalString('ADHERENT_CC_MAIL_FROM'); @@ -3220,9 +3358,9 @@ class Adherent extends CommonObject if ($message) { $actionmsg = $langs->transnoentities('MailFrom').': '.dol_escape_htmltag($from); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTo').': '.dol_escape_htmltag($sendto)); - if ($sendtocc) { - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".dol_escape_htmltag($sendtocc)); - } + // if ($sendtocc) { + // $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".dol_escape_htmltag($sendtocc)); + // } $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); $actionmsg = dol_concatdesc($actionmsg, $message); @@ -3290,10 +3428,31 @@ class Adherent extends CommonObject } else { $this->output = 'Found '.($nbok + $nbko).' members to send reminder to.'; $this->output .= ' Send email successfully to '.$nbok.' members'; - if (is_array($listofmembersok)) { + $listofids = ''; + $i = 0; + foreach ($listofmembersok as $idmember) { + if ($i > 100) { + $listofids .= ', ...'; + break; + } + if (empty($listofids)) { + $listofids .= ' ['; + } else { + $listofids .= ', '; + } + $listofids .= $idmember; + $i++; + } + if ($listofids) { + $listofids .= ']'; + } + $this->output .= ($listofids ? ' ids='.$listofids : ''); + + if ($nbko) { + $this->output .= ' - Canceled for '.$nbko.' member (no email or email sending error)'; $listofids = ''; $i = 0; - foreach ($listofmembersok as $idmember) { + foreach ($listofmembersko as $idmember) { if ($i > 100) { $listofids .= ', ...'; break; @@ -3309,33 +3468,8 @@ class Adherent extends CommonObject if ($listofids) { $listofids .= ']'; } - $this->output .= ($listofids ? ' ids='.$listofids : ''); } - if ($nbko) { - $this->output .= ' - Canceled for '.$nbko.' member (no email or email sending error)'; - if (is_array($listofmembersko)) { - $listofids = ''; - $i = 0; - foreach ($listofmembersko as $idmember) { - if ($i > 100) { - $listofids .= ', ...'; - break; - } - if (empty($listofids)) { - $listofids .= ' ['; - } else { - $listofids .= ', '; - } - $listofids .= $idmember; - $i++; - } - if ($listofids) { - $listofids .= ']'; - } - $this->output .= ($listofids ? ' ids='.$listofids : ''); - } - } } return $nbko; @@ -3355,25 +3489,23 @@ class Adherent extends CommonObject $return = '
'; $return .= '
'; $return .= ''; - if (property_exists($this, 'photo') || !empty($this->photo)) { + if (!empty($this->photo)) { $return .= Form::showphoto('memberphoto', $this, 0, 60, 0, 'photokanban photowithmargin photologintooltip', 'small', 0, 1); } else { $return .= img_picto('', 'user'); } $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= '' . $this->getNomUrl() . ''; if ($selected >= 0) { $return .= ''; } $return .= '
'.$this->getmorphylib('', 2).''; $return .= ''.$this->type.''; - if (method_exists($this, 'getLibStatut')) { - $return .= '
'; - $return .= $this->LibStatut($this->status, $this->need_subscription, $this->datefin, 5); - $return .= '
'; - } + $return .= '
'; + $return .= $this->LibStatut($this->status, $this->need_subscription, $this->datefin, 5); + $return .= '
'; $return .= '
'; $return .= '
'; $return .= '
'; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index d13c7016831..d04e3f77006 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2019 Thibault Foucart * Copyright (C) 2021 Waël Almoman - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -84,7 +84,7 @@ class AdherentType extends CommonObject * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) * 'noteditable' says if field is not editable (1 or 0) * 'alwayseditable' says if field can be modified also when status is not draft ('1' or '0') - * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'default' is a default value for creation (can still be overwritten by the Setup of Default Values if the field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. * 'index' if we want an index in database. * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...). * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. @@ -141,7 +141,7 @@ class AdherentType extends CommonObject public $morphy; /** - * @var string + * @var ?string */ public $duration; @@ -156,7 +156,7 @@ class AdherentType extends CommonObject public $duration_unit; /** - * @var int<0,1> Subscription required (0 or 1) + * @var null|'0'|'1' Subscription required (0 or 1) default '1' in DB, null until value is fetched */ public $subscription; @@ -180,7 +180,7 @@ class AdherentType extends CommonObject public $note_public; /** - * @var int<0,1> Can vote + * @var null|int<0,1> Can vote, null until fetched */ public $vote; @@ -516,11 +516,9 @@ class AdherentType extends CommonObject } // Actions on extra fields - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; } if (!$error && !$notrigger) { @@ -709,6 +707,81 @@ class AdherentType extends CommonObject return $amountbytype; } + /** + * Return the array of morphy per membership type id + * + * @param int $status Filter on status of type + * @return array Array of membership type + */ + public function morphyByType($status = null) + { + $morphybytype = array(); + + $sql = "SELECT rowid, morphy"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type"; + $sql .= " WHERE entity IN (".getEntity('member_type').")"; + if ($status !== null) { + $sql .= " AND statut = ".((int) $status); + } + + $resql = $this->db->query($sql); + if ($resql) { + $nump = $this->db->num_rows($resql); + + if ($nump) { + $i = 0; + while ($i < $nump) { + $obj = $this->db->fetch_object($resql); + + $morphybytype[$obj->rowid] = $obj->morphy; + $i++; + } + } + } else { + print $this->db->error(); + } + + return $morphybytype; + } + + /** + * Return the array of caneditamount per membership type id + * + * @param int $status Filter on status of type + * @return array Array of membership type + */ + public function caneditamountByType($status = null) + { + + $caneditamountbytype = array(); + + $sql = "SELECT rowid, caneditamount"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type"; + $sql .= " WHERE entity IN (".getEntity('member_type').")"; + if ($status !== null) { + $sql .= " AND statut = ".((int) $status); + } + + $resql = $this->db->query($sql); + if ($resql) { + $nump = $this->db->num_rows($resql); + + if ($nump) { + $i = 0; + while ($i < $nump) { + $obj = $this->db->fetch_object($resql); + + $caneditamountbytype[$obj->rowid] = $obj->caneditamount; + $i++; + } + } + } else { + print $this->db->error(); + } + + return $caneditamountbytype; + } + /** * Return array of Member objects for member type this->id (or all if this->id not defined) * @@ -795,7 +868,7 @@ class AdherentType extends CommonObject $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("MemberType").' '.$this->getLibStatut(4); $datas['label'] = '
'.$langs->trans("Label").': '.$this->label; if (isset($this->subscription)) { - $datas['subscription'] = '
'.$langs->trans("SubscriptionRequired").': '.yn($this->subscription); + $datas['subscription'] = '
'.$langs->trans("SubscriptionRequired").': '.yn((int) $this->subscription); } if (isset($this->vote)) { $datas['vote'] = '
'.$langs->trans("VoteAllowed").': '.yn($this->vote); @@ -803,9 +876,23 @@ class AdherentType extends CommonObject if (isset($this->duration)) { $datas['duration'] = '
'.$langs->trans("Duration").': '.$this->duration_value; if ($this->duration_value > 1) { - $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years")); + $dur = array( + "i" => $langs->trans("Minutes"), + "h" => $langs->trans("Hours"), + "d" => $langs->trans("Days"), + "w" => $langs->trans("Weeks"), + "m" => $langs->trans("Months"), + "y" => $langs->trans("Years") + ); } elseif ($this->duration_value > 0) { - $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year")); + $dur = array( + "i" => $langs->trans("Minute"), + "h" => $langs->trans("Hour"), + "d" => $langs->trans("Day"), + "w" => $langs->trans("Week"), + "m" => $langs->trans("Month"), + "y" => $langs->trans("Year") + ); } $datas['duration'] .= " " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : ''); } @@ -826,14 +913,12 @@ class AdherentType extends CommonObject public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { $result = ''; - $option = ''; $classfortooltip = 'classfortooltip'; $dataparams = ''; $params = [ 'id' => $this->id, 'objecttype' => $this->element, - 'option' => $option, 'nofetch' => 1, ]; if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { @@ -844,17 +929,18 @@ class AdherentType extends CommonObject $label = implode($this->getTooltipContentArray($params)); } - $url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id); - if ($option != 'nolink') { - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { - $add_save_lastsearch_values = 1; - } - if ($add_save_lastsearch_values) { - $url .= '&save_lastsearch_values=1'; - } + $baseurl = DOL_URL_ROOT . '/adherents/type.php'; + $query = ['rowid' => $this->id]; + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + $add_save_lastsearch_values = 1; } + if ($add_save_lastsearch_values) { + $query = array_merge($query, ['save_lastsearch_values' => 1]); + } + $url = dolBuildUrl($baseurl, $query); + $linkstart = '
'; @@ -999,7 +1085,7 @@ class AdherentType extends CommonObject $this->label = 'MEMBERS TYPE SPECIMEN'; $this->note_public = 'This is a public note'; $this->mail_valid = 'This is welcome email'; - $this->subscription = 1; + $this->subscription = '1'; $this->caneditamount = 0; $this->vote = 0; @@ -1092,7 +1178,7 @@ class AdherentType extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).''; + $return .= '' . $this->getNomUrl() . ''; //$return .= ''; @@ -1101,20 +1187,14 @@ class AdherentType extends CommonObject } else { $return .= ' '; } - if (property_exists($this, 'vote')) { - $return .= '
'.$langs->trans("VoteAllowed").' : '.yn($this->vote).''; - } - if (property_exists($this, 'amount')) { - if (is_null($this->amount) || $this->amount === '') { - $return .= '
'; - } else { - $return .= '
'.$langs->trans("Amount").''; - $return .= ' : '.price($this->amount).''; - } - } - if (method_exists($this, 'getLibStatut')) { - $return .= '
'.$this->getLibStatut(3).'
'; + $return .= '
'.$langs->trans("VoteAllowed").' : '.yn($this->vote).''; + if (is_null($this->amount) || $this->amount === '') { + $return .= '
'; + } else { + $return .= '
'.$langs->trans("Amount").''; + $return .= ' : '.price($this->amount).''; } + $return .= '
'.$this->getLibStatut(3).'
'; $return .= '
'; $return .= ''; $return .= ''; diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 9d2d9cda8d5..40a3b69a472 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Xebax Christy * Copyright (C) 2017 Regis Houssin * Copyright (C) 2020 Thibault FOUCART - * Copyright (C) 2020-2024 Frédéric France + * Copyright (C) 2020-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -138,7 +138,7 @@ class Members extends DolibarrApi throw new RestException(403); } - $sql = "SELECT rowid, fk_soc, key_account, site, date_creation, tms FROM ".MAIN_DB_PREFIX."societe_account"; + $sql = "SELECT rowid, fk_soc as socid, key_account, site, date_creation, tms FROM ".MAIN_DB_PREFIX."societe_account"; $sql .= " WHERE site = '".$this->db->escape($site)."' AND key_account = '".$this->db->escape($key_account)."'"; $sql .= " AND entity IN (".getEntity('adherent').")"; @@ -147,7 +147,7 @@ class Members extends DolibarrApi if ($result && $this->db->num_rows($result) == 1) { $obj = $this->db->fetch_object($result); $thirdparty = new Societe($this->db); - $result = $thirdparty->fetch($obj->fk_soc); + $result = $thirdparty->fetch($obj->socid); if ($result <= 0) { throw new RestException(404, 'thirdparty not found'); @@ -655,14 +655,15 @@ class Members extends DolibarrApi * * @throws RestException 403 Access denied * @throws RestException 404 Member not found + * @throws RestException 422 Malformed data */ public function createSubscription($id, $start_date, $end_date, $amount, $label = '') { if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) { throw new RestException(403); } - if (is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) { - throw new RestException(422, 'Malformed data'); + if (!is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) { + throw new RestException(422, 'Malformed data: subscription start or end date, or subscription amount, is not numeric'); } $member = new Adherent($this->db); diff --git a/htdocs/adherents/class/api_subscriptions.class.php b/htdocs/adherents/class/api_subscriptions.class.php index 18e55424e7a..b00f10a9123 100644 --- a/htdocs/adherents/class/api_subscriptions.class.php +++ b/htdocs/adherents/class/api_subscriptions.class.php @@ -139,7 +139,8 @@ class Subscriptions extends DolibarrApi if ($result) { $i = 0; $num = $this->db->num_rows($result); - while ($i < min($limit, $num)) { + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) { $obj = $this->db->fetch_object($result); $subscription = new Subscription($this->db); if ($subscription->fetch($obj->rowid)) { diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index c021e335604..ebae7156dd8 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -1,8 +1,8 @@ - * Copyright (C) 2006-2015 Laurent Destailleur - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2002-2004 Rodolphe Quiedeville + * Copyright (C) 2006-2015 Laurent Destailleur + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -165,12 +165,14 @@ class Subscription extends CommonObject $type = $this->fk_type; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, fk_user_creat)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note, note_private, ref_ext, fk_user_creat)"; $sql .= " VALUES (".((int) $this->fk_adherent).", '".$this->db->escape((string) $type)."', '".$this->db->idate($now)."',"; $sql .= " '".$this->db->idate($this->dateh)."',"; $sql .= " '".$this->db->idate($this->datef)."',"; $sql .= " ".((float) $this->amount).","; $sql .= " '".$this->db->escape($this->note_public ? $this->note_public : $this->note)."',"; + $sql .= " '".$this->db->escape($this->note_private)."',"; + $sql .= " ".(empty($this->ref_ext) ? "null" : "'".$this->db->escape($this->ref_ext)."'").","; $sql .= " ".((int) ($this->user_creation_id > 0 ? $this->user_creation_id : $user->id)); $sql .= ")"; @@ -319,7 +321,7 @@ class Subscription extends CommonObject $result = $member->fetch($this->fk_adherent); $result = $member->update_end_date($user); - if (!$error && !$notrigger) { + if (!$notrigger) { $this->context = array('member' => $member); // Call triggers $result = $this->call_trigger('MEMBER_SUBSCRIPTION_MODIFY', $user); @@ -365,15 +367,13 @@ class Subscription extends CommonObject $this->db->begin(); - if (!$error) { - if (!$notrigger) { - // Call triggers - $result = $this->call_trigger('MEMBER_SUBSCRIPTION_DELETE', $user); - if ($result < 0) { - $error++; - } // Do also here what you must do to rollback action if trigger fail - // End call triggers - } + if (!$notrigger) { + // Call triggers + $result = $this->call_trigger('MEMBER_SUBSCRIPTION_DELETE', $user); + if ($result < 0) { + $error++; + } // Do also here what you must do to rollback action if trigger fail + // End call triggers } if (!$error) { @@ -390,17 +390,10 @@ class Subscription extends CommonObject if ($this->fk_bank > 0 && is_object($accountline) && $accountline->id > 0) { // If we found bank account line (this means this->fk_bank defined) $result = $accountline->delete($user); // Return false if refused because line is reconciled - if ($result > 0) { - $this->db->commit(); - return 1; - } else { - $this->error = $accountline->error; - $this->db->rollback(); - return -1; + if ($result <= 0) { + $this->setErrorsFromObject($accountline); + $error++; } - } else { - $this->db->commit(); - return 1; } } else { $this->db->commit(); @@ -452,9 +445,8 @@ class Subscription extends CommonObject if (!empty($this->datef)) { $label .= '
'.$langs->trans('DateEnd').': '.dol_print_date($this->datef, 'day'); } - - $url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.((int) $this->id); - + $baseurl = DOL_URL_ROOT . '/adherents/subscription/card.php'; + $query = ['rowid' => $this->id]; if ($option != 'nolink') { // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); @@ -462,9 +454,10 @@ class Subscription extends CommonObject $add_save_lastsearch_values = 1; } if ($add_save_lastsearch_values) { - $url .= '&save_lastsearch_values=1'; + $query = array_merge($query, ['save_lastsearch_values' => 1]); } } + $url = dolBuildUrl($baseurl, $query); $linkstart = '
'; $linkend = ''; @@ -564,7 +557,7 @@ class Subscription extends CommonObject if ($selected >= 0) { $return .= ''; } - if (property_exists($this, 'dateh') || property_exists($this, 'datef')) { + if (!empty($this->dateh) || !empty($this->datef)) { $return .= '
'.dol_print_date($this->dateh, 'day').' - '.dol_print_date($this->datef, 'day').''; } @@ -572,15 +565,14 @@ class Subscription extends CommonObject $return .= '
'.$arraydata['member']->getNomUrl(-4).'
'; } - if (property_exists($this, 'amount')) { - $return .= '
'.price($this->amount).''; - if (!empty($arraydata['bank'])) { - $return .= '   '.$arraydata['bank']->getNomUrl(-1).''; - } + $return .= '
'.price($this->amount).''; + if (!empty($arraydata['bank'])) { + $return .= '   '.$arraydata['bank']->getNomUrl(-1).''; } $return .= ''; $return .= ''; $return .= ''; + return $return; } } diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 88505e566bb..4bd03721b6f 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -5,7 +5,7 @@ * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -150,7 +150,7 @@ if ($id > 0) { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; - $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index e8924b20636..eea353f37c0 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -57,7 +57,7 @@ $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); -$toselect = GETPOST('toselect', 'array'); +$toselect = GETPOST('toselect', 'array:int'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $optioncss = GETPOST('optioncss', 'aZ'); @@ -406,7 +406,7 @@ $memberstatic = new Adherent($db); $now = dol_now(); // Page Header -$title = $langs->trans("Members")." - ".$langs->trans("List"); +$title = $langs->trans("Members"); $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder'; $morejs = array(); $morecss = array(); @@ -415,7 +415,7 @@ $morecss = array(); // Build and execute select // -------------------------------------------------------------------- $sql = "SELECT"; -$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,"; +$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc as socid,"; $sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,"; $sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,"; $sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut as status, d.datec as date_creation, d.tms as date_modification,"; @@ -1228,7 +1228,7 @@ while ($i < $imaxinloop) { $memberstatic->gender = $obj->gender; $memberstatic->status = $obj->status; $memberstatic->datefin = $datefin; - $memberstatic->socid = $obj->fk_soc; + $memberstatic->socid = $obj->socid; $memberstatic->photo = $obj->photo; $memberstatic->email = $obj->email; $memberstatic->morphy = $obj->morphy; @@ -1236,7 +1236,7 @@ while ($i < $imaxinloop) { $memberstatic->note_private = $obj->note_private; $memberstatic->need_subscription = $obj->subscription; - if (!empty($obj->fk_soc)) { + if (!empty($obj->socid)) { $memberstatic->fetch_thirdparty(); if ($memberstatic->thirdparty->id > 0) { $companyname = $memberstatic->thirdparty->name; @@ -1273,7 +1273,7 @@ while ($i < $imaxinloop) { } else { // Show line of result $j = 0; - print ''; + print ''; // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { diff --git a/htdocs/adherents/messaging.php b/htdocs/adherents/messaging.php index de637315753..d41d8ac2085 100644 --- a/htdocs/adherents/messaging.php +++ b/htdocs/adherents/messaging.php @@ -6,7 +6,7 @@ * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2015 Marcos García - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -147,7 +147,7 @@ print dol_get_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user'); $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; -$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); +$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 752f9465484..396fd4c7adc 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015-2025 Frédéric France * Copyright (C) 2024 Alexandre Spangaro * Copyright (C) 2024 MDW * @@ -94,9 +94,11 @@ $hookmanager->initHooks(array('membernote')); // Security check $result = restrictedArea($user, 'adherent', $object->id, '', '', 'socid', 'rowid', 0); + /* * 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) { @@ -129,7 +131,7 @@ if (is_object($adht)) { $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; - $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); diff --git a/htdocs/adherents/partnership.php b/htdocs/adherents/partnership.php index b2080b86470..11a94d5657f 100644 --- a/htdocs/adherents/partnership.php +++ b/htdocs/adherents/partnership.php @@ -113,7 +113,7 @@ if (($action == 'update' || $action == 'edit') && $object->status != $object::ST // Security check -$result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', 0); +restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', 0); /* diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index d92d9ee274a..4c0aa51da52 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -49,7 +49,7 @@ if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$result = restrictedArea($user, 'adherent', '', '', 'cotisation'); +restrictedArea($user, 'adherent', '', '', 'cotisation'); $year = (int) dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 99aea16bd6b..56736ffd687 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -51,7 +51,7 @@ if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$result = restrictedArea($user, 'adherent', '', '', 'cotisation'); +restrictedArea($user, 'adherent', '', '', 'cotisation'); $year = (int) dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index d2840c1c303..432069604fc 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -57,7 +57,7 @@ if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$result = restrictedArea($user, 'adherent', '', '', 'cotisation'); +restrictedArea($user, 'adherent', '', '', 'cotisation'); $year = (int) dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $startyear = $year - (!getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS')))); diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 56c2f7e9639..44b32c55d9a 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2012-2017 Regis Houssin * Copyright (C) 2015-2024 Alexandre Spangaro - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2019 Thibault FOUCART * Copyright (C) 2023 Waël Almoman * Copyright (C) 2024-2025 MDW @@ -496,7 +496,7 @@ print dol_get_fiche_head($head, 'subscription', $langs->trans("Member"), -1, 'us $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = ''; -$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); +$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; dol_banner_tab($object, 'rowid', $linkback, 1, 'rowid', 'ref', $morehtmlref); @@ -631,7 +631,7 @@ if (isModEnabled('societe')) { print ''; print ''; print ''; print ''; print '
'; - print $form->select_company($object->fk_soc, 'socid', '', 1); + print $form->select_company($object->socid, 'socid', '', 1); print '
'; @@ -1055,11 +1055,11 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h print 'fk_soc)) print ' disabled'; print '>