2
0
forked from Wavyzz/dolibarr
Commit Graph

34632 Commits

Author SHA1 Message Date
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
Laurent Destailleur
6e8786241c Fix regression 2024-02-16 18:18:17 +01:00
MDW
844bc42240 FIX: Check valid mail server record correction. (#28197)
# FIX: Check valid mail server record correction.

The test for isValidMXRecord did not pass on Windows platform:

```bash
php -r '$a=getmxrr("yhaoo.com", $mxhosts, $weight);var_dump([$a,$mxhosts]);'

array(2) {
  [0] =>
  bool(true)
  [1] =>
  array(1) {
    [0] =>
    string(1) "."
  }
}

array(2) {
  [0] =>
  bool(true)
  [1] =>
  array(3) {
    [0] =>
    string(21) "mta5.am0.yahoodns.net"
    [1] =>
    string(21) "mta7.am0.yahoodns.net"
    [2] =>
    string(21) "mta6.am0.yahoodns.net"
  }
}

```

So an "invalid" MX record can be returned as a dot '.'.
2024-02-16 13:03:16 +01:00
Frédéric FRANCE
7cb8177de1 fix typos (#28198) 2024-02-16 12:13:25 +01:00
Frédéric FRANCE
647cf21b54 fix warnings in select_resource_list (#28189)
* fix warnings in select_resource_list

* fix warnings in select_resource_list

* fix warnings in select_resource_list

* fix warnings in select_resource_list
2024-02-16 02:40:27 +01:00
thibdrev
f445d1e376 qual: phpstan for various mod_xxx.php (#28190)
* Update mod_contract_magre.php

* Update mod_contract_olive.php

* Update mod_contract_serpis.php

* Update mod_holiday_immaculate.php

* Update mod_holiday_madonna.php

* Update mod_member_advanced.php

* Update mod_member_simple.php

* Update modules_product.class.php

* Update mod_sn_free.php

* phpcs

* phpcs
2024-02-16 02:30:55 +01:00
Laurent Destailleur
77db116447 Debug custom report 2024-02-16 02:11:04 +01:00
Laurent Destailleur
b48455c9d7 Can remove filter entries 2024-02-16 01:50:03 +01:00
Laurent Destailleur
7107b5feb3 Debug custom report filter management 2024-02-16 01:19:53 +01:00
Laurent Destailleur
a549f095b7 Fix custom reports for external modules 2024-02-15 18:40:04 +01:00
Laurent Destailleur
5d7232f637 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-15 17:07:14 +01:00
Laurent Destailleur
0eee181afd Remove duplicate line 2024-02-15 17:06:54 +01:00
Laurent Destailleur
ce0c4601bb Close #28181 New substitution variables for invoice 2024-02-15 17:05:54 +01:00
Frédéric FRANCE
4bf4f587b2 fix phpstan pdf_einstein.modules.php (#28166) 2024-02-15 16:43:25 +01:00
Laurent Destailleur
41fa5758c9 Avoid error 2024-02-15 15:22:33 +01:00
MDW
43967a83a3 SEC: #28168 Correct protocol limitations (PHP7.4/Win) (#28172)
# SEC: #28168 Correct protocol limitations (PHP7.4/Win)

Protocol limitation was not active during test on windows platform.
Moving the application of the limitation just before the curl_exec
instruction made the limitation effective.

Also extended the code to enable allowing ftp and ftps and extended
the code for [CURLOPT_REDIR_PROTOCOLS_STR](https://www.php.net/manual/en/curl.constants.php#constant.curlopt-redir-protocols-str).
2024-02-15 15:20:21 +01:00
thibdrev
b0658c48f0 qual: phpstan - Property mod_xxxx::$code_modifiable (string) does not accept int. (#28173)
* qual: phpstan for commonnumrefgenerator.class.php

* qual: phpstan for mod_codeproduct_elephant.php

* qual: phpstan for mod_codeproduct_leopard.php

htdocs/core/modules/product/mod_codeproduct_leopard.php	79	Property mod_codeproduct_leopard::$code_modifiable (string) does not accept int.

* qual: phpstan for mod_lot_free.php

htdocs/core/modules/product_batch/mod_lot_free.php	76	Property mod_lot_free::$code_modifiable (string) does not accept int.

* Update mod_codeclient_elephant.php

htdocs/core/modules/societe/mod_codeclient_elephant.php	46	PHPDoc type int of property mod_codeclient_elephant::$code_modifiable is not covariant with PHPDoc type string of overridden property ModeleThirdPartyCode::$code_modifiable.

* qual: phpstan for mod_codeclient_leopard.php

htdocs/core/modules/societe/mod_codeclient_leopard.php	76	Property mod_codeclient_leopard::$code_modifiable (string) does not accept int.

* qual: phpstan for mod_codeclient_monkey.php

htdocs/core/modules/societe/mod_codeclient_monkey.php	76	Property mod_codeclient_monkey::$code_modifiable (string) does not accept int.

* phpcs

* phpcs

* phpcs

* qual: phpstan for modules_societe.class.php

* Update mod_lot_free.php
2024-02-15 14:59:07 +01:00
Laurent Destailleur
c65870c026 QUAL: Properties ->date_update and ->date_modification were merged into
date_modification.
2024-02-15 14:08:08 +01:00