Commit Graph

1239 Commits

Author SHA1 Message Date
MDW
fb2aadf006 Fix PhanPluginRedundantAssignment 2024-03-13 00:40:36 +01:00
MDW
88d59896ec Qual: 'enabled' in fields can be string ('isModEnabled(...)')
# Qual: 'enabled' in fields can be string ('isModEnabled(...)')

Update PHPdoc to allow that enabled is a string
2024-03-12 13:38:08 +01:00
MDW
ed703c7241 Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:38:55 +01:00
JeromeBARBOTIN
5371db3c0b FIX: Verification of variables (#28623)
* Verifcation of variables

Modification of the variable setting before its use.

* To check if the property exists

* Modification as per @frederic34 suggestion

* Update propal.class.php

* Application of coding rules

Modification of the called function.

* Verification of variables

* Verification of variable

* Typo error

* Update actions_sendmails.inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-08 22:50:15 +01:00
Laurent Destailleur
7ab339e97f Fix regression 2024-03-08 17:54:32 +01:00
Frédéric FRANCE
fba15178eb all initAsSpecimen return int (#28577)
* all initAsSpecimen return int

* all initAsSpecimen return int

* all initAsSpecimen return int
2024-03-02 16:38:35 +01:00
MDW
c332251816 Fix: Replace deprecated module names in code strings (#28462)
* Fix: Replace deprecated module names in code strings

# Fix: Replace deprecated module names in code strings

A few cases that slipped through the manual replacements

* Qual: Enable deprecation notices in CodingPhpTest for isModEnabled

# Qual: Enable deprecation notices in CodingPhpTest for isModEnabled

As all detections are now fixed, we can enable the deprecation notice
trigger in the CodingPhpTest.
2024-02-28 23:01:01 +01:00
Goldron
6876f9fcc3 Fixes an error by initializing ->line in the insert_discount method. (#28407)
* Fixes an error by initializing ->line in the insert_discount method.

* Update propal.class.php

---------

Co-authored-by: David IGREJA <david@siladel.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-25 09:58:24 +01:00
thibdrev
d4faa5e2b5 qual: phpstan - Property CommonObjectLine::$fk_unit (int|null) does not accept string|null. (#28372)
* Update propal.class.php

htdocs/comm/propal/class/propal.class.php	746	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/comm/propal/class/propal.class.php	963	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update commande.class.php

htdocs/commande/class/commande.class.php	1692	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/commande/class/commande.class.php	3273	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update facture.class.php

htdocs/compta/facture/class/facture.class.php	3990	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/compta/facture/class/facture.class.php	4243	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update fournisseur.commande.class.php

htdocs/fourn/class/fournisseur.commande.class.php	2149	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/fourn/class/fournisseur.commande.class.php	3031	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update fournisseur.facture.class.php

htdocs/fourn/class/fournisseur.facture.class.php	2257	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/fourn/class/fournisseur.facture.class.php	2453	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.
2024-02-23 17:13:15 +01:00
MDW
7b54824d49 Fix #28071 - New branch to fix bad merge (#28083)
* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Qual: Introduce getDataToShowPhoto to prepare generic code

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix missing trans

* Fix langs

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Remove useless files in web templates

* Clean code

* Fix duplicate translation key

* Fix duplicate translation key

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix duplicate key

* Fix $object

* Debug v19

* WIP SMSing

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP EMAILINGS_SUPPORT_ALSO_SMS

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* WIP SMSing

* Debug the "validate" feature

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Clean code

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Move rights->x->y into hasRight('x', 'y')

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Enhance rector to fix empty($user->rights->modulex->perm1)

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

* Fix template to use v19 dev rules

* Fix use v19 dev rules

* Fix phpunit

* Debug v19

* Clean code

* Use rector to convert user->rights into user->hasRight

* Clean code

* Use rector to convert user->rights into user->hasRight

* Use rector to convert user->rights into user->hasRight

* Clean code

* Fix phpcs

* add editorconfig for sql files (#27999)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* add model_pdf field in llx_ticket-ticket.sql (#27996)

* add model_pdf field in llx_ticket-ticket.sql

* Update 19.0.0-20.0.0.sql

* Update 19.0.0-20.0.0.sql

* Improve wording in README (#27994)

* fix phpstan (#27989)

* fix phpstan

* Update UserRightsToFunction.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* Qual: Fix spelling/working in datapolicy translations (#28006)

# Qual: Fix spelling/wording in datapolicy translations

Fixed some spelling and wording in datapolicy translations.

* qual: phpstan for htdocs/ticket/class/ticketstats.class.php (#27986)

htdocs/ticket/class/ticketstats.class.php	98	Parameter #1 $year (string) of method TicketStats::getNbByMonth() should be compatible with parameter $year (int) of method Stats::getNbByMonth()

* Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

* Fix user with readonly perm on email template must be able to read.

* Fix doc

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Better message

* Add missing fields in merge of thirdparty

* Debug v19 selection of ticket printer per terminal

* Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

* Use constant

* NEW: Adding a recipient on emails sent, change status to sent partialy.

* fix travis (#28052)

* fix travis

* Update partnership.class.php

* fix php doc (#28047)

* fix undefined array key (#28048)

* Add region and departament for Cuba (#28046)

* Update llx_10_c_regions.sql

Add Cuba Regions (id_country=77)

* Update llx_20_c_departements.sql

Add Provinces Cuba (id country=77)

* Find the typo (#28050)

* Find the typo

* clean code

* add last_main_doc field to product (#28045)

* add las_main_doc field to product

* add field fetch

* NEW Add Categorie filter for ActionComm (#28041)

* New Add Categorie filter for ActionComm

New Add Categorie filter for ActionComm

* Fix space errors

Fix space errors

* Fix space errors 2

Fix space errors 2

* Update cunits.class.php (#28056)

FIX: error SQL when creating a Cunit

* Update codespell-lines-ignore.txt to avoid PR merge conflict

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: thibdrev <thibault.drevet@gmail.com>
Co-authored-by: sonikf <93765174+sonikf@users.noreply.github.com>
Co-authored-by: Ikarus <44511582+LeKarSol@users.noreply.github.com>
Co-authored-by: Anthony Damhet <73399671+EchoLoGeek@users.noreply.github.com>
Co-authored-by: Quentin-Seekness <72733832+Quentin-Seekness@users.noreply.github.com>
2024-02-09 15:58:49 +01:00
thibdrev
40450e4313 qual: phpstan for htdocs/comm/propal/class/propal.class.php (#28034)
* qual: phpstan for htdocs/comm/propal/class/propal.class.php

htdocs/comm/propal/class/propal.class.php	75	Property Propal::$table_element_line (int) does not accept default value of type string.
htdocs/comm/propal/class/propal.class.php	1414	Property CommonObject::$fk_delivery_address (int) does not accept string.
htdocs/comm/propal/class/propal.class.php	1426	Property CommonObject::$fk_project (int) does not accept string.
htdocs/comm/propal/class/propal.class.php	1499	Property CommonObject::$user_author (User) does not accept int.

* Update propal.class.php

use $object->user_creation_id rather than $object->user_author
2024-02-08 00:22:11 +01:00
Laurent Destailleur
1d6cbe1fda Fix GETPOST use should be avoid in classes 2024-02-02 23:46:12 +01:00
Laurent Destailleur
c9823f2b8d Move 401 to 403 2024-02-01 19:34:13 +01:00
Frédéric France
03e29c6960 fix param 2024-01-20 09:22:38 +01:00
Frédéric France
b3bcdeafe5 rename method 2024-01-18 18:55:53 +01:00
MDW
a04f2bf4e7 Qual: Spelling fixes that newly appeared. (#27495)
* Qual: Spelling fixes that newly appeared.

# Qual: Fix spelling erros that appeared since the bulk updates.

These issues mostly appeared since the bulk updates (a few ones were postponed
to make sure no real spelling errors were missed.)

* Update modulebuilder.lib.php

* Update pdf_standard.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-14 12:26:37 +01:00
William Mead
e64b942a06 Added status type 2024-01-10 12:33:58 +01:00
William Mead
855723ab40 Added contributor details 2024-01-10 12:28:36 +01:00
William Mead
feba8d3e62 Added canceled status label 2024-01-10 12:26:15 +01:00
William Mead
c691549f43 Refactored code 2024-01-10 09:40:56 +01:00
William Mead
0f2415a75c Added cancel & confirm_cancel actions. Cleaned code. 2024-01-10 09:29:23 +01:00
William Mead
3f1f4829e4 Added cancel status & setCancel method 2024-01-10 09:07:28 +01:00
Laurent Destailleur
910a541c60 Clean code 2024-01-09 13:08:22 +01:00
Laurent Destailleur
e2f49c407f Clean sql request to use exist instead of left join 2024-01-09 10:44:50 +01:00
Laurent Destailleur
4501872f17 Clean code with rector 2 2024-01-05 04:33:58 +01:00
Fabian Heinz
b78632a20e api fixes
According to [RFC2616](https://www.rfc-editor.org/rfc/rfc2616#section-10.2), APIs should return 2xx status codes if the request was correct.
The response should be status 200 with an empty result array.
2023-12-31 14:11:05 +01:00
Hystepik
5e4a4da130 Fix some php codce smell 2023-12-20 14:22:45 +01:00
Laurent Destailleur
d92c65ad91 FIX infinite loop in API call/trigger by adding a caller 2023-12-15 12:15:33 +01:00
Laurent Destailleur
e145a087fb Merge pull request #27084 from altairisfr/MAIN_IGNORE_CONTACTS_ON_CLONING
add constant MAIN_IGNORE_CONTACTS_ON_CLONING
2023-12-14 01:49:43 +01:00
Christophe Battarel
a65631c355 add constant PROPAL_DISABLE_AUTOUPDATE_ON_CLOSE 2023-12-13 16:49:55 +01:00
Christophe Battarel
a0f097c0a8 add constant MAIN_IGNORE_CONTACTS_ON_CLONING 2023-12-13 16:44:12 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Laurent Destailleur
ba10d60a0b Fix with php-cs-fixer 2023-12-04 12:02:35 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
53dab922fd Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
Laurent Destailleur
7659bba97a Fix bad delete of lines into llx_ecm_files 2023-11-13 12:24:47 +01:00
Laurent Destailleur
c154a72d88 Debug v19 2023-11-06 19:32:04 +01:00
Laurent Destailleur
74e1ec4099 FIX On object validation, ecm index are not updated for uploaded files 2023-10-31 19:28:11 +01:00
Laurent Destailleur
d3c9549154 Comment dead code 2023-10-26 01:36:44 +02:00
Laurent Destailleur
a318031034 QUAL Standardize code. Renamed ID of user properties into ->user_xxx_id 2023-10-24 11:37:29 +02:00
Laurent Destailleur
e1bf377f20 QUAL: Removed deprecated field remise, remise_percent, remise_absolute 2023-10-20 10:47:08 +02:00
Lucas Marcouiller
42865a975a Fix some code smell (#26277)
* Fix some code smell

* Update commande.class.php

---------

Co-authored-by: Hystepik <lucas.marcouiller@gmail.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2023-10-20 02:20:26 +02:00
Laurent Destailleur
2cfa9f8290 Debug v19 2023-10-17 15:43:56 +02:00
Laurent Destailleur
b37a438067 The property ->user_validation to store ID of user validating has been
renamed into ->user_validation_id.
2023-10-17 11:10:25 +02:00
Laurent Destailleur
f18529f944 Clean code 2023-10-17 10:52:19 +02:00
Laurent Destailleur
fb8b4acdbf The duplicated and deprecated property ->date_livraison that was renamed
into ->delivery_date has been completely removed.
2023-10-17 10:36:11 +02:00
dev2a
765d60efdf Fix: Apply rector rule user permission on comm folder (#26163) 2023-10-10 09:14:30 +02:00
Laurent Destailleur
d3dc6615db Remove deprecated use of ->modelpdf (good is ->model_pdf) 2023-10-02 21:49:08 +02:00
pascal
80f060c771 fix tab indentation 2023-09-26 18:43:25 +02:00
pascal
871f896962 implementation of properties filter 2023-09-26 18:04:48 +02:00