Commit Graph

130303 Commits

Author SHA1 Message Date
MDW
8655d5a86b
QUAL Use phan to help detect new issues (#27706)
* Qual: Add phan flow

- Add phan configuration (config, baseline, stubs);
- Add github action;
- Update apstats.php.

* Add directives to ignore false phan notices

* Qual: Add typing hints for extrafields TPL files

# Qual: Add typing hints for extrafields TPL files

Add typing hints for phan on view files

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 18:14:29 +01:00
Benjamin Falière
5460b97e8b
NEW contact type on auto add contributor (#26077)
* NEW contact type on auto add contributor

* ADD second option

* RESTORE ticket module for external and fix constant

* GetDolGlobalInt

* Update ticket.class.php

---------

Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 18:08:35 +01:00
Laurent Destailleur
5c01965e9e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-21 17:42:03 +01:00
Laurent Destailleur
e69fa236ef Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-21 17:41:50 +01:00
Laurent Destailleur
b5400ff7a9 Comment 2024-02-21 17:41:19 +01:00
MDW
05527d3998
Fix: Allow new & old names to check if module is loaded. (#28297)
* Fix: Allow new & old names to check if module is loaded.

# Fix: Allow new & old names to check if module is loaded.

The method 'isModEnabled()' was already checking some modules for
their new name, but after transitioning Conf this was not working
for 'member'.  Now testing for both names as 'Conf' can handle
both and deprecation will be reported.

Several issues were discovered after removing deprecated values.

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 17:31:08 +01:00
William Mead
05f809818e
Fixed duplicate llxHeader (#28330) 2024-02-21 16:54:40 +01:00
MDW
7eb3f03eb2
Fix: Remove unused invalid global $lang (#28327)
# Fix: Remove unused invalid global

$lang was invalid but not used in function -> removed.
2024-02-21 16:52:54 +01:00
Laurent Destailleur
de789e03df QUAL Deprecated "domiciliation". Replaced with "address" 2024-02-21 16:43:41 +01:00
Laurent Destailleur
b6d0e1d21e Fix phpstan 2024-02-21 16:09:03 +01:00
Laurent Destailleur
6b7113f9f3 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-21 16:07:02 +01:00
Laurent Destailleur
bcd5baa62e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-21 16:04:23 +01:00
Laurent Destailleur
5e322d2807 Fix phpstan 2024-02-21 16:02:31 +01:00
Laurent Destailleur
9bccfd95c9 FIX bankaccount address not visible in view mode 2024-02-21 16:02:21 +01:00
Laurent Destailleur
f01fa6e098 Fix datatable 2024-02-21 15:00:14 +01:00
Laurent Destailleur
4a68630fba Clean exakat 2024-02-21 14:55:44 +01:00
Laurent Destailleur
85ed3ad6d0 restore dolPrintLabel() 2024-02-21 14:51:44 +01:00
Laurent Destailleur
a732e72be0 Fix apstats 2024-02-21 14:41:13 +01:00
William Mead
37a31f75b7
Qual clean dolresource class (#28308)
* Use address, town, zip & email from CommonPeople

* Use element & table_element from CommonObject

* Updated PHPDoc

* Deleted unused properties

* Revert "Use element & table_element from CommonObject"

This reverts commit 88a06164d1.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 13:59:41 +01:00
MDW
af01b3d73a
Qual: Re-enable open_basedir restriction in tests (#28315)
* Fix: Workaround for false security issue in tests

# Fix: Workaround for false security issue in tests

This is a quick workaround for the false security issues in tests
by setting the ['SELF'] variable to something that is
considered harmless

* Update windows-ci workflow

# Update windows-ci workflow

- Setup_conf.sh - Added caching feature;
- phpunit.bat - Example updated based on experience with php web server
- Provide dolibarr.log and phpunit output as artefacts.
- Convert PHPUNIT log to Github Annotations
- Setup php web server for API tests
- Enable caching sql initialisation

* Qual: Re-enable open_basedir restriction in tests

# Qual: Re-enable open_basedir restriction in tests

Using open_basedir restriction is closer to the production reality
and seemed to generate some issues on a windows development machine.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-21 13:57:05 +01:00
Laurent Destailleur
ca7f06f7d3 Try to fix the "Return of error for #28319" 2024-02-21 13:53:51 +01:00
Laurent Destailleur
4acf87f43d Fix warning 2024-02-21 12:46:20 +01:00
Laurent Destailleur
4431f44f6a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-21 12:40:38 +01:00
Laurent Destailleur
f66b8987ec Sync transifex 2024-02-21 12:40:11 +01:00
Laurent Destailleur
9294662bb5 QUAL Check lang files does not contains 'notranslate' 2024-02-21 12:21:44 +01:00
MDW
b343181789
Update phpunit.bat sample script and setup_conf.sh (#28307)
# Update phpunit.bat sample script and setup_conf.sh

- setup_conf.sh - Added caching feature;
- phpunit.bat - Example updated based on experience with php web server
2024-02-20 23:02:59 +01:00
Laurent Destailleur
7dd9a448cb Fix lang files and add phpunit test to avoid bad < 2024-02-20 22:53:59 +01:00
Laurent Destailleur
4fa736a6fa Fix closing tags 2024-02-20 20:59:46 +01:00
Jon Bendtsen
6d480ff782 error in </span> tag (#28316)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-02-20 20:46:22 +01:00
Jon Bendtsen
f336c648fd
error in </span> tag (#28316)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-02-20 20:45:33 +01:00
MDW
db223a041f
Qual: Optimisation in load criteria (dol_dir_list) (#28263)
# Qual: Optimisation in load criteria (dol_dir_list)

By moving the "$sortcriteria" conditions into the load conditions, the
comparison between strings is less frequent.

The original test can probably even be removed as it is part of load_*.

The only side-effect that I can see is with the hook, but I think
in theory there should not be a negative side-effect, only a positive
one as this tells the hook to load the data we need without relying
on the hook to make the proper interpretation of the searchcriteria.
2024-02-20 19:36:30 +01:00
William Mead
c3538ca361
Clean function addlink parameter (#28311) 2024-02-20 18:57:28 +01:00
Laurent Destailleur
61f571a367 Avoir error 2024-02-20 18:55:38 +01:00
Laurent Destailleur
313b1edd93 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 18:45:40 +01:00
William Mead
3aebda050f
Added customer code export (#28309) 2024-02-20 18:45:03 +01:00
Laurent Destailleur
8acd3451d1 Doc 2024-02-20 18:40:14 +01:00
Laurent Destailleur
e36c2b2e29 doc 2024-02-20 18:29:11 +01:00
thibdrev
c67461bb38
qual: phpstan for htdocs/salaries/class/paymentsalary.class.php (#28291)
* qual: phpstan for htdocs/salaries/class/paymentsalary.class.php

htdocs/salaries/class/paymentsalary.class.php	205	Property PaymentSalary::$amount (float) does not accept string.

htdocs/salaries/class/paymentsalary.class.php	292	Property PaymentSalary::$amount (float) does not accept string.

htdocs/salaries/class/paymentsalary.class.php	389	Property PaymentSalary::$amount (float) does not accept string.

htdocs/salaries/class/paymentsalary.class.php	565	Property PaymentSalary::$datec (int) does not accept string.

* Update paymentsalary.class.php - apply price2num() on $totalamount before testing if $totalamount==0

* typo
2024-02-20 15:02:05 +01:00
Laurent Destailleur
02e9ef8023 Close #28293 2024-02-20 14:58:46 +01:00
Laurent Destailleur
6030efacd6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 14:58:20 +01:00
Laurent Destailleur
ae49542197 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 14:50:51 +01:00
Laurent Destailleur
0f8b433142 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-20 14:48:51 +01:00
Laurent Destailleur
0492fb6098 FIX close #28279 2024-02-20 14:46:56 +01:00
MDW
b3702b2467
Fix: Do not use exit in Testcase environment (#28301)
# Fix: Do not use exit in Testcase environment

Let tests continue in test case environment and allow identifying
the cause for what would be an exit in a production setup.
2024-02-20 12:29:41 +01:00
Laurent Destailleur
f0ffe83fe6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 11:18:01 +01:00
Laurent Destailleur
977f6b5a61 Complete doc to mention MAIN_DISALLOW_URL_INTO_DESCRIPTIONS option 2024-02-20 11:17:40 +01:00
MDW
db9ce13849
Test/adminlib/remove deprecation (#28302)
* Fix: Deprecation message for backupGlobalsBlackList

# Fix: Deprecation message for backupGlobalsBlackList

Fix the deprecation messages during the tests:

1) AdminLibTest::testVersionCompare
PHPUnit\Framework\TestCase::$backupGlobalsBlacklist is deprecated and will be removed in PHPUnit 10. Please use PHPUnit\Framework\TestCase::$backupGlobalsExcludesList instead.

* Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList

# Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList

The  backupGlobalsBlacklist/backupGlobalsExcludesList does not seem required
and it is not documented why it is required, so remove this to simplify
the code (see https://github.com/Dolibarr/dolibarr/pull/28292#discussion_r1495116364 ).
2024-02-20 10:38:27 +01:00
Laurent Destailleur
ec2e324a0d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 02:27:05 +01:00
Laurent Destailleur
67a23fd57f Add more choices in lenght of list in apstats 2024-02-20 02:26:42 +01:00
noec764
db6b17ad49
NEW: Add Filter on product reffering object status(Order and Order Supplier) (#28275)
* NEW: Add Filter on product reffering object status(Order and Order Supplier)

* Update html.formorder.class.php

* Update commande.php

* Update commande_fournisseur.php

---------

Co-authored-by: Noé <noe@scopen.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-20 02:12:06 +01:00