2
0
forked from Wavyzz/dolibarr
Commit Graph

34632 Commits

Author SHA1 Message Date
Laurent Destailleur
3ef33e59a0 Doc 2024-02-23 17:06:56 +01:00
MDW
25617ab982 Fix: Protect from negative array index access (#28379)
# Fix: Protect from negative array index access

Negative array index access can happen when $i is 0.
While this raises a notice before PHP7.1 it would compare to the last
value in the string so it's invalid.

Detected with phan: PhanCompatibleNegativeStringOffset
2024-02-23 16:55:15 +01:00
Alban Durrheimer
36d364fb2d Add sendEmailsRemindersOnSupplierInvoiceDueDate cron function (#28378)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-23 16:50:21 +01:00
Laurent Destailleur
85803c9dbf Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-23 16:45:19 +01:00
Laurent Destailleur
ad6fe34361 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-02-23 14:27:51 +01:00
AWeerWolf
be571fd372 #28334 (#28336)
Update lib_head.js.php concerning Date Format
Replace 1900 by 2000
2024-02-23 13:40:30 +01:00
thibdrev
db2fc174cd qual: phpstan for htdocs/compta/paiement/class/paiement.class.php (#28364)
htdocs/compta/paiement/class/paiement.class.php	115	PHPDoc type array<int, float> of property Paiement::$multicurrency_tx is not covariant with PHPDoc type float of overridden property CommonObject::$multicurrency_tx.

htdocs/compta/paiement/class/paiement.class.php	120	PHPDoc type array<int, string> of property Paiement::$multicurrency_code is not covariant with PHPDoc type string of overridden property CommonObject::$multicurrency_code.
2024-02-23 13:40:22 +01:00
Laurent Destailleur
8aa3be1a82 Standardization 2024-02-23 13:28:17 +01:00
Laurent Destailleur
007b2bf758 Doygen 2024-02-22 19:29:31 +01:00
Laurent Destailleur
260505e2aa Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-22 19:27:03 +01:00
Laurent Destailleur
71dc610c25 Doc 2024-02-22 19:26:47 +01:00
thibdrev
132e98a4c7 qual: phpstan for CommonObject->origin (#28361)
htdocs/commande/class/commande.class.php	538	Property CommonObject::$origin (string) does not accept $this(Commande).
htdocs/commande/class/commande.class.php	675	Property CommonObject::$origin (string) does not accept $this(Commande).
htdocs/compta/facture/class/facture.class.php	2859	Property CommonObject::$origin (string) does not accept $this(Facture).
htdocs/compta/facture/class/facture.class.php	3378	Property CommonObject::$origin (string) does not accept $this(Facture).
htdocs/compta/facture/class/facture.class.php	3696	Property CommonObject::$origin (string) does not accept $this(Facture).
htdocs/expedition/class/expedition.class.php	1245	Property CommonObject::$origin (string) does not accept null.
htdocs/expedition/class/expedition.class.php	1438	Property CommonObject::$origin (string) does not accept null.
htdocs/expedition/class/expedition.class.php	2326	Property CommonObject::$origin (string) does not accept $this(Expedition).
htdocs/expedition/class/expedition.class.php	2487	Property CommonObject::$origin (string) does not accept $this(Expedition).
htdocs/fourn/class/fournisseur.commande.class.php	1283	Property CommonObject::$origin (string) does not accept $this(CommandeFournisseur).
htdocs/fourn/class/fournisseur.commande.class.php	2278	Property CommonObject::$origin (string) does not accept $this(CommandeFournisseur).
htdocs/fourn/class/fournisseur.facture.class.php	1858	Property CommonObject::$origin (string) does not accept $this(FactureFournisseur).
htdocs/fourn/class/fournisseur.facture.class.php	1999	Property CommonObject::$origin (string) does not accept $this(FactureFournisseur).
htdocs/fourn/commande/dispatch.php	435	Property CommonObject::$origin (string) does not accept CommandeFournisseur.
htdocs/fourn/commande/dispatch.php	482	Property CommonObject::$origin (string) does not accept CommandeFournisseur.
htdocs/fourn/commande/dispatch.php	489	Property CommonObject::$origin (string) does not accept CommandeFournisseur.
htdocs/reception/class/reception.class.php	582	Property CommonObject::$origin (string) does not accept $this(Reception).
htdocs/reception/class/reception.class.php	1081	Property CommonObject::$origin (string) does not accept null.
htdocs/reception/class/reception.class.php	1674	Property CommonObject::$origin (string) does not accept $this(Reception).
htdocs/reception/class/reception.class.php	1833	Property CommonObject::$origin (string) does not accept $this(Reception).
htdocs/reception/class/reception.class.php	1967	Property CommonObject::$origin (string) does not accept $this(Reception).
htdocs/takepos/invoice.php	332	Property CommonObject::$origin (string) does not accept Facture.
htdocs/takepos/invoice.php	336	Property CommonObject::$origin (string) does not accept Facture.
2024-02-22 19:25:01 +01:00
Can Arslan
2a03df95b4 FIX: duplicate with lines: 414-416 (#28358) 2024-02-22 19:17:38 +01:00
thibdrev
87a5ca7756 qual: phpstan for $fk_unit (#28359)
* Update bom.class.php

* Update commonobjectline.class.php

* Update product.class.php

* phpcs

* phpcs

* phpcs

* phpcs

* phpcs

* phpcs
2024-02-22 19:14:31 +01:00
Laurent Destailleur
838c748fae Reduce variable parts into website template so risk of git conflict is
lower
2024-02-22 17:30:54 +01:00
thibdrev
999af4951b qual: phpstan - various "$hidden (bool) does not accept string." (#28350)
* Update modWebsite.class.php

* Update DolibarrModules.class.php

* Update modCron.class.php

* Update modSocialNetworks.class.php

* qual: phpstan for htdocs/core/modules/modCollab.class.php

htdocs/core/modules/modCollab.class.php	68	Property DolibarrModules::$hidden (bool) does not accept string.
2024-02-22 13:27:04 +01:00
MDW
f1f516f54c NEW: Global constant for deprecated module mapping (#28348)
* Qual: Add another deprecated module mapping

* NEW: Global constant for deprecated module mapping
2024-02-22 13:23:39 +01:00
thibdrev
009a4856b3 qual: phpstan - various fixes (#28351)
* qual: phpstan for htdocs/compta/tva/class/paymentvat.class.php

htdocs/compta/tva/class/paymentvat.class.php	540	Property CommonObject::$tms (int) does not accept string.

* qual: phpstan - various "$enabled (int) does not accept bool."

htdocs/core/boxes/box_actions.php	54	Property box_actions::$enabled (int) does not accept bool.

htdocs/core/boxes/box_actions_future.php	54	Property box_actions_future::$enabled (int) does not accept bool.

htdocs/core/boxes/box_activity.php	53	Property box_activity::$enabled (int) does not accept string.

* qual: phpstan for htdocs/core/boxes/box_activity.php

htdocs/core/boxes/box_activity.php	53	Property box_activity::$enabled (int) does not accept string.

* qual: phpstan for htdocs/core/modules/modTakePos.class.php

htdocs/core/modules/modTakePos.class.php	284	Property Societe::$code_client (string) does not accept int.

htdocs/core/modules/modTakePos.class.php	285	Property Societe::$code_fournisseur (string) does not accept int.
2024-02-22 13:22:06 +01:00
Laurent Destailleur
757abcfaae Fix warning 2024-02-22 13:20:00 +01:00
Laurent Destailleur
8ba8b62180 Standardize field name 2024-02-22 13:11:32 +01:00
Eric
af062aa5f6 datenextrun is mandatory as dolibarr 16.0 (#28344) 2024-02-22 11:34:39 +01:00
MDW
5f9047b2e3 #FIX modulenames (#28338)
* Fix: modulename

* Fix: modulename
2024-02-22 02:45:57 +01:00
MDW
5faf933d26 #FIX modulenames (#28338)
* Fix: modulename

* Fix: modulename
2024-02-22 02:45:36 +01:00
Laurent Destailleur
ae84bf8752 Fix error if result empty 2024-02-22 02:36:21 +01:00
Laurent Destailleur
c5b0a13557 Fix warning 2024-02-22 02:27:19 +01:00
Laurent Destailleur
2807c9410f Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-22 00:19:19 +01:00
Laurent Destailleur
32d35d5443 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-22 00:18:42 +01:00
Laurent Destailleur
9874d008aa Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-22 00:16:59 +01:00
Laurent Destailleur
88da45d9dd Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-02-22 00:16:14 +01:00
Laurent Destailleur
a76eafa0d4 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-02-22 00:15:35 +01:00
Laurent Destailleur
8c2a910a94 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-02-22 00:13:59 +01:00
Saami PERDRIX
52646ee9f5 fix aperçu/dl fichier quand il est dans {userid}/temp (#27211) 2024-02-22 00:10:04 +01:00
Laurent Destailleur
c396dcdfbb Fix from #27211 2024-02-22 00:09:45 +01:00
MDW
e363e53516 FIx: modulenames (#28337)
* Fix modulename

* Fix modulename

* Fix modulename
2024-02-21 19:17:56 +01:00
MDW
5a4c8c6ce7 FIx: modulenames (#28337)
* Fix modulename

* Fix modulename

* Fix modulename
2024-02-21 19:10:32 +01:00
Laurent Destailleur
c3868af0fb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-21 19:09:47 +01:00
MDW
0fa220d138 FIx: modulenames (#28337)
* Fix modulename

* Fix modulename

* Fix modulename
2024-02-21 19:09:37 +01:00
Laurent Destailleur
ff524c9a52 Reduce label 2024-02-21 19:05:08 +01:00
Laurent Destailleur
3a23581b9e Mutualize code 2024-02-21 18:59:46 +01:00
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
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
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
5e322d2807 Fix phpstan 2024-02-21 16:02:31 +01:00
Laurent Destailleur
85ed3ad6d0 restore dolPrintLabel() 2024-02-21 14:51:44 +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
Laurent Destailleur
ca7f06f7d3 Try to fix the "Return of error for #28319" 2024-02-21 13:53:51 +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
Laurent Destailleur
313b1edd93 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-20 18:45:40 +01:00