Commit Graph

34349 Commits

Author SHA1 Message Date
William Mead
640774d554 Qual clean dolibarrtriggers (#27968)
* Moved property init to constructor

* Added VERSIONS constant

* Updated code comments

* Refactor to use switch statement

* Added contributor details

* Refactored to use VERSIONS constant

* Added method return & parameter types

* Added getter methods

* Clean code

* Remove runTrigger return type

* Refactored & cleaned code. Added contributor details.

* Refactored modulebuilder trigger interface

* Cleaned code

* Fixed runTrigger types

* Added changelog warning

* Fixed return type

* Fixed return type

* Fixed PHP 7.0 compatibility

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-18 23:54:01 +01:00
Laurent Destailleur
0ec6c6f0ea Fix use log instead of fatal error 2024-02-18 23:49:23 +01:00
MDW
cb382eabe1 Fix: PhanParamSignatureMismatch (#28143)
* Fix: PhanParamSignatureMismatch

# Fix: PhanParamSignatureMismatch

PhanDoc was updated to require specific types which changes the method signature
versus the parent.
This results in a signature mismatch.
Updated to maintain the method signature but dynamically check that
the object type is correct.

* Update pre-commit for php-cs
2024-02-18 23:46:30 +01:00
MDW
275d190a2a Qual: Add verification on filters (dol_dir_list) (#28234)
# Qual: Add verification on filters (dol_dir_list)

As-is, '/' must be escaped in the regexes, this adds code to enforce
that requirement and avoid mistakes.

Even if the mathod using '{}' as delimiters is applied this check
could remain in place.

Also, returning empty array immediately - when the directory could
not be opened, closedir() can not be applied.
2024-02-18 23:44:35 +01:00
Laurent Destailleur
c3ba74173a Fix phpstan 2024-02-18 23:42:00 +01:00
Laurent Destailleur
778e7364e6 Fix phpunit 2024-02-18 23:23:01 +01:00
Lucas Marcouiller
88232ff0fc fix php warnings and errors (#28207)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-02-18 23:00:01 +01:00
kkhelifa-opendsi
926462e218 FIX: Not trancate the multicurrency rate shown on cards (even if the global MAIN_MAX_DECIMALS_SHOWN is set to 0) (#28211) 2024-02-18 22:56:19 +01:00
Laurent Destailleur
685cdecca5 FIX Picto for mime 2024-02-18 22:39:31 +01:00
Laurent Destailleur
fe7f94e1d9 Debug v20 2024-02-18 22:23:26 +01:00
Laurent Destailleur
50b4e6f81a NEW Add a link "Fill with layout" 2024-02-18 21:15:26 +01:00
Laurent Destailleur
1c0068c248 Doc 2024-02-18 18:27:10 +01:00
Laurent Destailleur
3c108a1e53 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-18 17:20:29 +01:00
Laurent Destailleur
9b288e349e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-18 17:20:16 +01:00
Laurent Destailleur
e38e9618ac Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-18 17:14:03 +01:00
Laurent Destailleur
ebe68c9075 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-18 17:06:36 +01:00
Laurent Destailleur
e6120d409f Clean code 2024-02-18 17:00:42 +01:00
William Mead
21752d7a4d Fixed null dir_output (#28213) 2024-02-18 16:32:48 +01:00
thibdrev
d12b2d7ee6 qual: phpstan for htdocs/commande/card.php (#28215)
* Update commonobject.class.php

* Update card.php
2024-02-18 16:32:12 +01:00
Florian Mortgat
6e5fd5eb58 FIX: notification module: for supplier orders (any of the 3 triggers), user can choose an e-mail template in conf, but the conf is not used when sending the notification (#28216) 2024-02-18 16:31:12 +01:00
Frédéric FRANCE
cb995b293d add photos in category banner (#28221) 2024-02-18 15:39:42 +01:00
Frédéric FRANCE
144ed48fcb fix warning in list_print_total.tpl.php (#28233)
* fix warning in list_print_total.tpl.php

* Update list.php
2024-02-18 15:24:14 +01:00
Laurent Destailleur
f48ab54513 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-18 15:16:22 +01:00
Laurent Destailleur
44f718232c Doc 2024-02-18 15:13:56 +01:00
MDW
f5dd7d7c93 FIX: Fix unneeded access outside open_basedir when looking for modules (#28237)
* FIX: Fix unneeded access outside open_basedir when looking for modules

# FIX: Fix unneeded access outside open_basedir when looking for modules

Change the order in which the if conditions are tested so that an is_dir("dir/..") is avoided
by first testing if the subpath starts with a dot.

Also changed uppercased the first 3 letters of the file before comparing to CVS.

Finally, improved the typing hint and documentation.

The PHPUNIT test failed like this:

```
35) ExportTest::testExportModulesDatasets
is_dir(): open_basedir restriction in effect. File(D:\a\dolibarr\dolibarr\htdocs/..) is not within the allowed path(s): (D:\a\dolibarr\dolibarr\htdocs;D:\a\dolibarr\dolibarr\documents;D:\a\dolibarr\dolibarr\test;D:\a\dolibarr\dolibarr\dev\initdemo;c:\tools\php)

D:\a\dolibarr\dolibarr\htdocs\core\lib\functions2.lib.php:100
D:\a\dolibarr\dolibarr\htdocs\exports\class\export.class.php:119
D:\a\dolibarr\dolibarr\test\phpunit\ExportTest.php:463
```

* Fix spelling
2024-02-18 15:09:01 +01:00
thibdrev
56ddeadd07 qual: phpstan for htdocs/compta/bank/class/account.class.php (#28242)
* qual: phpstan for htdocs/compta/bank/class/account.class.php

htdocs/compta/bank/class/account.class.php	206	PHPDoc type array of property Account::$status is not covariant with PHPDoc type int of overridden property CommonObject::$status.

htdocs/compta/bank/class/account.class.php	799	Property AccountLine::$amount (float) does not accept string.

* Update commonobject.class.php

* phpcs
2024-02-18 15:04:44 +01:00
thibdrev
538dbb509e qual: phpstan for htdocs/compta/facture/class/facture.class.php (#28243)
* qual: phpstan for htdocs/compta/facture/class/facture.class.php

htdocs/compta/facture/class/facture.class.php	1253	Property CommonObject::$fk_project (int) does not accept string.

htdocs/compta/facture/class/facture.class.php	1254	Property CommonObject::$fk_delivery_address (int) does not accept string.

htdocs/compta/facture/class/facture.class.php	4474	Property Facture::$remise_percent (int) does not accept float.

* Update commoninvoice.class.php

* Update facture.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-18 15:04:18 +01:00
thibdrev
e9eccb7ad2 qual: phpstan for htdocs/core/modules/barcode/modules_barcode.class.php (#28244)
* qual: phpstan for htdocs/core/modules/barcode/modules_barcode.class.php

htdocs/core/modules/barcode/modules_barcode.class.php	59	PHPDoc type int of property ModeleNumRefBarCode::$code_null is not covariant with PHPDoc type int<0, 1> of overridden property CommonNumRefGenerator::$code_null.

htdocs/core/modules/barcode/modules_barcode.class.php	64	PHPDoc type int of property ModeleNumRefBarCode::$code_auto is not covariant with PHPDoc type int<0, 1> of overridden property CommonNumRefGenerator::$code_auto.

* Update modules_barcode.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-18 15:02:20 +01:00
Laurent Destailleur
fb61fa4c4d Close #28245 2024-02-18 15:01:19 +01:00
Laurent Destailleur
a59fa7eca0 Test 2024-02-18 14:27:15 +01:00
Laurent Destailleur
ba8c7d14c9 Test 2024-02-18 13:44:48 +01:00
Laurent Destailleur
7662df7672 Test 2024-02-18 13:43:04 +01:00
Laurent Destailleur
ce367eb389 Update precommit 2024-02-18 13:40:33 +01:00
Laurent Destailleur
fb54306a1e Update precommit 2024-02-18 13:39:25 +01:00
Laurent Destailleur
a72077731f FIX Bad CRLF when sending text only content. Fix dol_htmlwithnojs() 2024-02-18 02:23:04 +01:00
Laurent Destailleur
56bd7be836 Add log 2024-02-18 02:12:34 +01:00
Laurent Destailleur
4b6347e7e7 FIX Bad CRLF when sending text only content. Fix dol_htmlwithnojs() 2024-02-18 02:11:15 +01:00
Laurent Destailleur
66615477ae Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-17 20:58:40 +01:00
Laurent Destailleur
3f99cce347 Fix #yogosha20850 2024-02-17 20:53:56 +01:00
Laurent Destailleur
17c3f6003e Fix pb letting think a user with no perm can change prospect status 2024-02-17 19:30:42 +01:00
Laurent Destailleur
8abe663d6f Add phpunit to test the rename/move into a corrupted pdf file. 2024-02-17 18:59:57 +01:00
Laurent Destailleur
bb06e674ad Add dol_escape_htmltag 2024-02-17 18:05:31 +01:00
Laurent Destailleur
750e3270ac Enhance apstats 2024-02-17 16:46:06 +01:00
Laurent Destailleur
00f69f90e6 FIX Pb in redirect of a website page in USEDOLIBARRSERVER mode 2024-02-17 15:11:20 +01:00
Laurent Destailleur
a23addd21e FIX Pb in redirect of a website page in USEDOLIBARRSERVER mode 2024-02-17 15:10:42 +01:00
Laurent Destailleur
713ee984d7 Fix syntax error 2024-02-17 14:40:45 +01:00
Laurent Destailleur
7f49fd355a NEW Add id of last page accessed in website 2024-02-17 14:35:57 +01:00
Laurent Destailleur
f9f549ef26 Work on generic filter 2024-02-17 04:07:34 +01:00
Laurent Destailleur
6085fe7e49 Work on custom reports 2024-02-17 00:10:41 +01:00
Laurent Destailleur
c711791197 Work on custom reports 2024-02-16 23:56:07 +01:00