Commit Graph

601 Commits

Author SHA1 Message Date
Laurent Destailleur
38a7524846 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-28 20:01:36 +02:00
ldestailleur
752e06f5fc FIX #35520 FIX #35522 2025-09-28 15:21:20 +02:00
ldestailleur
4a363478ae Clean code with rector 2025-09-18 16:26:38 +02:00
R0ck3n
6334fa5bea NEW: Add prepare() method to DoliDB class (rebuild) (#35249)
* feat:prepared sql for mysqli and postgres

* refactor:remove whitespace

* Update DoliDB.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-08 02:37:42 +02:00
ldestailleur
4e89f046d1 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-01 16:47:39 +02:00
ldestailleur
bb0974add9 FIX Security when using feature Advanced Target of emailing (hidden in
v21, default in v22+). Possible SQL injection by users with permissions
to make mass emailing. Reported by Simon Perdrisat.
2025-09-01 16:38:01 +02:00
Marc de Lima Lucio
d5250eadeb FIX: pgsql: cast string_agg arguments (#34210)
* FIX local taxes text in object line view mode (#34103)

* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode (#34170)

* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode

* FIX: product suplier tab: last modif date column was wrongly dependant of module barcode, part 2

* FIX: pgsql: cast string_agg arguments

* FIX: pgsql group concat conversion: modify tests as a consequence

---------

Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
2025-06-04 18:24:19 +02:00
ldestailleur
7b9b32cb9e Debug pgsql DDLInfoTable 2025-03-25 21:32:28 +01:00
ldestailleur
3e24bbd419 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-03-08 14:51:36 +01:00
ldestailleur
18a4224e5d Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-03-08 14:51:04 +01:00
ldestailleur
c3401e5793 Fix typo in test
if class_exists('mysqli')
2025-03-08 14:17:34 +01:00
ldestailleur
07177fab0a Fix join into implde 2025-03-07 13:15:01 +01:00
Faisal Azhar
b500efd6ff Update pgsql.class.php - function num_rows (#33358)
to avoid error when $resultset = null or false

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-06 18:14:50 +01:00
ldestailleur
9276042264 Fix CI 2025-03-06 11:34:27 +01:00
ldestailleur
7a0e9d4dc1 Accept utf8 chars in the natural_search in mode 3. Close #32930 2025-03-06 04:00:42 +01:00
ldestailleur
996770b8f2 Fix protect use of sanitize to make sql injection 2025-03-06 03:39:47 +01:00
ldestailleur
caead5de9f Fix protect use of sanitize to make sql injection 2025-03-06 03:29:54 +01:00
MDW
32bf8c5cd5 Qual: Fix phan notices (website) 2025-02-27 11:40:42 +01:00
MDW
97099b854f Qual: Fix phan notices (install) 2025-02-05 01:43:41 +01:00
MDW
f750f2c40c Qual: Fix phan notices not seen locally 2025-02-03 16:06:01 +01:00
MDW
ba32606084 Fix return value for getListOfCollation() 2025-01-24 10:55:47 +01:00
Laurent Destailleur (aka Eldy)
113a59a135 Debug v21 2025-01-03 19:50:38 +01:00
Laurent Destailleur (aka Eldy)
f0ae6b999f Debug v21 2025-01-03 15:55:05 +01:00
MDW
ec2a1928ba Qual: Update fields phpdoc to include fields that are defined/used in some cases
# Qual: Update fields phpdoc to include fields that are defined/used in some cases

comment, copytoclipboard, autofocusoncreated are documented and used in some cases for the
$fields definition
2024-12-05 02:36:50 +01:00
Laurent Destailleur
bd170e0474 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-11-12 11:33:31 +01:00
Frédéric FRANCE
1adc883b56 add baseline exclude for phpstan (#31632)
* add baseline exclude for phpstan

* update

* update

* update

* update

* update

* merge

* restore one filter

* delete old errors

* fix

* fix

* fix

* $moreforfilter can t be empty

* fix

* enable check

* refresh baseline

* add phpdoc

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
MDW
b91c99b18a Qual: Fix phan/phpstan notices in class files (part 3) (#31578)
* fix phpstan in conf class (#31630)

* fix phpstan

* fix phan

* Fix merge

* Qual: Avoid notification with typing hint

* Qual: Fix notices link.class

* Qual: Fix notices link..socialneetworkmanager.class and DoliDb->DoliDB

* Qual: Fix notices for link..utils.class

* Qual: Fix notices for db classes

* Update translate.class.php

* Update translate.class.php

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-29 22:44:47 +01:00
Laurent Destailleur
e6f1d4835f Clean sql code 2024-10-29 02:58:20 +01:00
Laurent Destailleur
df2211e9f2 Fix phan 2024-10-20 00:05:00 +02:00
Laurent Destailleur
4db9323706 Fix phan 2024-10-20 00:03:46 +02:00
Laurent Destailleur
88d0636dcc Fix travis 2024-10-19 19:40:04 +02:00
Laurent Destailleur
c70973c0c8 Merge v20 2024-10-19 14:44:55 +02:00
Laurent Destailleur
c9ed9bb6eb FIX Avoid fatal error when mysqli not available 2024-10-18 23:48:24 +02:00
Laurent Destailleur
471668b940 FIX Toolt to convert utf8mb4 2024-09-30 23:12:01 +02:00
Laurent Destailleur
4a3d081dca FIX Toolt to convert utf8mb4 2024-09-30 23:11:31 +02:00
MDW
42bb4fbf3e Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
Laurent Destailleur
96046c40a8 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-27 16:13:39 +02:00
John BOTELLA
25754d87c9 FIX : FATAL ERROR abusively triggered due to incomplete regex (#31052)
* Fix regex detection

* New regular expression to include offset
2024-09-26 22:38:38 +02:00
Laurent Destailleur
3bf7bab967 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-12 02:21:46 +02:00
Laurent Destailleur
a52963020d Doc 2024-09-12 02:21:14 +02:00
Laurent Destailleur
b1ee18864f Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-12 01:43:43 +02:00
Laurent Destailleur
cbf3cbfa1f Better debug log 2024-09-12 01:33:58 +02:00
MDW
ca414de526 Qual: Fix $fields related notices with Phan (#30704)
* Qual: Typing hints/ignore directives for phan notices

* Update field typing
2024-08-21 13:23:35 +02:00
MDW
54880f92cd Qual: Fix PhanTypeMismatchProperty and some other phan notices (#30542)
* Qual: Fix PhanTypeMismatchProperty and some other phan notices

* Qual: Phan fixes for BOM

* Phan - fix fields

* fixup! Qual: Phan fixes for BOM

* Fix phpstan double array keys for syslog

* Fix $fields phpdoc

* Fix phan typing issues with intermediate var and ??

* Fix phan typing issue with ?? operator

* Ignore htdocs/install/install.forced.php for git

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Update baseline

* Qual: Phan fixes for BOM

* fixup! Qual: Phan fixes for BOM

* Fix phpstan double array keys for syslog

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Ignore PhanTypeSuspiciousNonTraversableForeach to allow integration

* Fix typing hints (phpstan)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-15 17:05:00 +02:00
Charlène Benke
1a3dddb3cc FIX sanitize must allow space on attribute (#30566)
sanitize must allow space on attribute

otherwhise  "on update CURRENT_TIMESTAMP" for tms fields goes wrong
2024-08-11 00:02:05 +02:00
MDW
d6948077b2 Qual: Fix spelling/update .pre-commit configuration (versions) (#30546)
* Qual: Update pre-commit configuration

* Qual: Update spelling

* Ignore use of deprecated constant
2024-08-07 01:20:43 +02:00
MDW
46eb5f83c2 Qual: Updates for phpstan notices (#30509)
* Fix int<0> typing to int<0,0> for phpstan

* Fix phpdoc for phpstan

* Fix phpdoc for phpstan

* Qual: Several phpstan notice fixes

* Fix phpdoc

* Qual: totalpaid is never null, remove null test

* improve phpdoc typing

* Also return null to statisfy phpstan

* Allow null value for $var

* object->Object to make it meaningful

* Type EvalMathStack properties

* Comment out unused private methods (phpstan)

* Changes for phpstan (return values, phpdoc, code)

* Change order of tests for phpstan

* phpdoc object to Object for correct typing

* Typing hing for phpstan

* UPdate test for phpstan

* Change phpdoc position for phpstan

* Update phpdoc for phpstan

This needs further improvement

* Change $op to $ope to fix phpstan

* Update sqlite3.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 12:59:45 +02:00
Charlène Benke
0a2d4bee75 FIX sanitize must allow space on attribute (#30490)
* sanitize must allow space on attribute

otherwhise  "on update CURRENT_TIMESTAMP" for tms fields goes wrong

* Update mysqli.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-31 15:41:00 +02:00
Frédéric FRANCE
fbbdf7fb3e fix cti (#30323) 2024-07-09 19:29:35 +02:00
Laurent Destailleur
bd2a0b9e55 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-06-25 15:13:51 +02:00