Commit Graph

289 Commits

Author SHA1 Message Date
MDW
14d68131de Qual: Fix phan notices (workstation) 2025-02-28 14:39:00 +01:00
MDW
78f5938485 Qual: Fix phan notices (resource+salary) 2025-02-14 01:42:25 +01:00
Laurent Destailleur (aka Eldy)
de321e8f01 Fix typo 2025-01-09 02:01:49 +01:00
Laurent Destailleur (aka Eldy)
c0250e4c91 FIX CVE-2024-55227 CSRF when MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY is
on (hidden option not on by default)
2025-01-08 17:41:45 +01:00
Frédéric FRANCE
13b8f5feff keep only commonobject property oldcopy (#32123)
* clean properties

* clean properties

* clean properties

* clean properties

* clean phpcs

* clean phan

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-27 21:59:41 +01:00
iouston
7a84561bba Fix issue n° 30845 - Resources not saved on new event creation (#31889)
* short_open_tag was always on No

* Fix Bug - Return an error if SOCIETE_EMAIL_UNIQUE = 1

if SOCIETE_EMAIL_UNIQUE is on 1, this form return an error because thirdparty already exist.

* fix issue n°31839

* fix wrong parameters

* fix issue n°30845

* Revert "fix issue n°30845"

This reverts commit cf88b7b236.

* fix issue n°30845

* replace space by tabs for CI

* fix cat statement

* precommit is very ball breaker ;-)

* is this the right one?

* fix precommit error

* Please phpstan...

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-16 14:56:42 +01:00
MDW
278d301f32 Qual: Fix phan/phpstan notices in class files (part 6) (#31634)
* Qual: Fix notices for paymentdonation...workstationusergroup.class

* Qual: Fix PhanPluginRedundantReturnComment, update baseline

* Qual: Complete array phpdoc for properties
2024-11-06 23:57:45 +01:00
Frédéric FRANCE
24e7285539 fix CI (#31692)
* Update commonobjectline.class.php

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-05 15:33:09 +01:00
MDW
1834c37c16 Qual: Fix phan notices (#31212)
* Qual: Fix phan notices

# Qual: Fix phan notices

Fix several phan notices related to classes with UnknownObject
classes.

* Qual: Fix phan notices

* Qual: Fix phan notices

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-03 19:40:34 +02:00
Laurent Destailleur
6b2fa56d52 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-10-01 15:01:18 +02:00
Laurent Destailleur
075d0dee3c FIX Selection of country - state in resource 2024-10-01 14:27:45 +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
MDW
5e02bec9df Qual: Fix getTooltipContentArray typing hints (#31081)
* Qual: Fix getTooltipContentArray typing hints

# Qual: Fix getTooltipContentArray typing hints

This defines the aray type for all getTooltipContentArray occurences

* Ignore undeclared property ref_supplier (does not exist on OrderLine)
2024-09-23 03:24:19 +02:00
Frédéric FRANCE
2a6bbf88df fix phpstan (#30944)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-13 17:40:03 +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
Laurent Destailleur
21e4c0e73c Clean code 2024-07-03 18:35:19 +02:00
Frédéric FRANCE
6cfd7d16e6 fix phpstan check class case (#30058) 2024-06-18 15:48:18 +02:00
Frédéric FRANCE
efdc7f92b9 fix phpstan empty oldcopy is not falsy (#30049)
* fix phpstan empty olcopy is not falsy

* fix phpstan empty olcopy is not falsy

* remove code not used

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-06-17 13:22:20 +02:00
Laurent Destailleur
1d07e2a36b css 2024-06-10 15:01:45 +02:00
Laurent Destailleur
796440459d Debug v20 2024-04-22 18:57:21 +02:00
MDW
04c3e80fc5 Fix typing 2024-03-29 18:26:48 +01:00
MDW
8602ca9885 Fix: implode->join and duplicated if condition (#28761)
* Fix: join->implode

# Fix: join->implode

Update new cases of join

* Fix: Duplicate if condition in if/else sequence

# Fix: Duplicate if condition in if/else sequence

Fixed repeated if condition and action
2024-03-11 12:55:55 +01:00
Laurent Destailleur
f32bf4b3a7 Fix join -> implode 2024-03-11 12:38:21 +01:00
Laurent Destailleur
0887664888 NEW: All fetchAll() method now support the USF syntax. 2024-03-11 11:23:34 +01:00
Laurent Destailleur
a63d7e0802 Fix regression 2024-03-07 19:06:08 +01:00
Laurent Destailleur
e6b2756c19 QUAL The signature for all ->delete() method has been modified to match
the modulebuilder template (so first param is now always $user), except
  the delete for thirdparty (still accept the id of thirdparty to delete
as first parameter). Will probably be modified into another version.
2024-03-07 17:58:02 +01:00
Laurent Destailleur
c544efec7f QUAL: Remove use of customurl filter. Must use the USF syntax. 2024-03-05 03:51:36 +01:00
Frédéric FRANCE
0de5807423 fix phpstan (#28416)
Default value of the parameter #8 $filterkey (string) of method FormResource::select_resource_list() is incompatible with type array.
2024-02-25 22:14:02 +01:00
thibdrev
2b4bc3b4bc qual: phpstan for htdocs/resource/class/dolresource.class.php (#28352)
htdocs/resource/class/dolresource.class.php	723	Property Dolresource::$busy (int) does not accept string.

htdocs/resource/class/dolresource.class.php	726	Property Dolresource::$mandatory (int) does not accept string.
2024-02-22 13:22:24 +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
a95cd96278 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-19 16:47:21 +01:00
Laurent Destailleur
213cca0c8d Fix warning and migration error 2024-02-19 16:47:04 +01:00
William Mead
8c186d570c Added resource URL (#28277) 2024-02-19 16:40:25 +01:00
Laurent Destailleur
87c9fa1902 Fix phpunit 2024-02-18 23:23:57 +01:00
William Mead
0ad5f06059 Qual resource date user (#28209)
* Added resource creation date & modification date

* Added user create & user modify

* Cleaned code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-18 22:58:17 +01:00
thibdrev
f7f9dfd77c qual: phpstan - Property CommonObject::$tms (int) does not accept string. (#28247)
* Update paymentdonation.class.php

* Update paymentexpensereport.class.php

* Update productbatch.class.php

* Update propalmergepdfproduct.class.php

* Update productstockentrepot.class.php

* Update stocktransfer.class.php

* Update dolresource.class.php

* Update paymentsalary.class.php

* Update salary.class.php
2024-02-18 14:56:31 +01:00
William Mead
423e0d9124 Fixed empty status (#28200) 2024-02-16 12:15:36 +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
William Mead
0a0edcf273 Qual clean dolresource (#27864)
* Updated PHPDoc

* Cleaned code & comments. Typed method parameters.

* Cleaned code

* Force int cast

* Fixed PHP 7.0 compatibility

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-15 16:49:54 +01:00
Frédéric FRANCE
5f1c679142 fix warning (#28177)
* fix warning

* clean properties

* clean properties
2024-02-15 13:59:19 +01:00
William Mead
d612e32c06 NEW resource phone, email & maxusers (#28185)
* Added resource phone, email & max_users

* Cleaned code

* Added phone, email & max_users

* Cleaned code. Removed fields shown in header.

* Cleaned code

* Fixed resource create

* Add MaxUsers localization
2024-02-15 13:44:29 +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
Laurent Destailleur
038fcbab3d Fix compatibility 2024-02-08 00:24:27 +01:00
Laurent Destailleur
18a6d9695c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-01-20 17:55:39 +01:00
Laurent Destailleur
72f2547422 Update dolresource.class.php 2024-01-20 00:46:02 +01:00
William Mead
89257dbd76 Updated parameter clean for numeric values 2024-01-19 11:32:19 +01:00
William Mead
ee101fd6ff Updated code comments 2024-01-19 10:45:55 +01:00
William Mead
8fbeb2deac Merge branch 'develop' into fix-dolresource-phpstan-lvl3
# Conflicts:
#	htdocs/resource/card.php
2024-01-19 09:55:07 +01:00
Frédéric FRANCE
2dca7faf26 phpdoc 2024-01-18 21:37:43 +01:00
William Mead
097a220674 Cleaned code 2024-01-18 12:40:37 +01:00