2
0
forked from Wavyzz/dolibarr
Commit Graph

877 Commits

Author SHA1 Message Date
Laurent Destailleur
326c75dc51 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-09 17:58:54 +02:00
Laurent Destailleur
473ddbc53a Merge remote-tracking branch 'origin/19.0' into 20.0 2025-06-09 17:42:02 +02:00
Laurent Destailleur
c444fe3c1f Merge remote-tracking branch 'origin/18.0' into 19.0 2025-06-09 17:25:03 +02:00
William Mead
1aaa29ad9e Fixed expense report permission. Added contributor details. (#34368) 2025-06-08 14:37:23 +02:00
ptibogxiv
ce455f1236 NEW More options in api_documents.class.php (#34329)
* More options in api_documents.class.php

add pagination et filter by mime content type

* Update api_documents.class.php

* Update api_documents.class.php

* Update api_documents.class.php
2025-06-04 11:10:59 +02:00
ldestailleur
36b00c5951 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-02 14:59:18 +02:00
ldestailleur
14c2db425d Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-02 14:53:12 +02:00
ldestailleur
ca11136092 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-06-02 14:37:54 +02:00
ldestailleur
11d357b79e Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-02 14:31:05 +02:00
William Mead
4fb79ba8a1 FIX API expense report line comments (v18+) (#34297)
* Fixed API expense report line comments

* Added contributor details
2025-05-27 15:57:48 +02:00
Laurent Destailleur
0f4bf91fcd Fix default value of dol_move 2025-05-19 09:45:31 +02:00
Laurent Destailleur
88c4669d19 FIX missing thumbs when uploading image files with API 2025-05-15 02:51:45 +02:00
Charlène Benke
0fe942983e FIX api fail dictionary/contact_types when use type parameters (#34010)
* api fail dictionary/contact_types when use type parameters

* Update api_setup.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-29 07:07:14 +02:00
Jon Bendtsen
9142dbb4d2 FIX BUG: default value not changed when updating an extrafield using API #33949 (#33950)
* FIX BUG: default value not changed when updating an extrafield #33949

Update can now change default value for extrafields and fixes #33949

* Also use $default in updateExtrafields

The previous commit changed postExtrafields, but that is okay, because both needs to be changed

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-24 02:33:32 +02:00
Jon Bendtsen
783807af14 Tiniest event attendee API - just the POST endpoint (#33934)
* check if MAIN_AGENDA_XCAL_EXPORTKEY is set before using it

* suggestion from frederic34

* adding 5 new statuses and their functions

* adding 5 new statuses and their functions

* copy and modified from email template api

* remove some unset because they are present in the database

* all objects are ConferenceOrBoothAttendee's

* load eventattendee API file from eventorganization/ folder

* ref is not required and should perhaps be banned because it is ignored during create + nonexisting apifetch function replaced with call to just fetch + making usre to use the correct class

* variable named paid is unused?

* get all event attendees

* fixing the sql statement

* adjusting function checking access rights

* UNTESTED! multicompany support by leftjoining with the projet table which does have an entity column + adjusting checkAccessRights function to prepare for testing project visibility

* adding more statuses and explaining boarding pass better

* expanding access rights checks with a project id and starting to use that after fetch so we know the project_id

* checking if the user has access to the project specified in fk_project

* phan fix getting  right

* checking if isModEnabled('multicompany')

* will only show rows of projects which is either public or the user is a contact of

* 2 new status changing functions and some protection for the existing status changing functions

* fix pre-commit check

* typo fix = that should be ==

* adding extrafields and linkedobjectids to event attendee

* should be back to develop branch contents so PR can be smaller

* reducing PR size, just GET and POST

* smallest commit, just the post and functions needed by post

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-22 11:45:50 +02:00
ldestailleur
7db8252225 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-04-21 13:52:25 +02:00
ptibogxiv
f1fbb98acd Fix api_setup.class.php (#33930) 2025-04-20 18:55:35 +02:00
Frédéric FRANCE
255300a29e test fix phan (#33879)
* test fix phan

* test fix phan

* test fix phan

* test fix phan

* test fix phan
2025-04-16 19:55:44 +02:00
Jon Bendtsen
772337d162 redoing PR Api objectlinks #33738 (#33781)
* redoing PR Api objectlinks #33738

* loading objectlinks api from main api folder

* bringing $FIELDS up to develop branch standard

* trying to tell phan the expected array types

* phan return and input type specifications

* trying to fix 'Method ObjectLink::_makeobject() should return int but return statement is missing.'

* trying to return an ObjecTLink

* get returns an ObjectLink object

* making sure that function _makeobject always has an return

* making sure deleteByValues always has a return statement

* remove empty line

* making sure getByValues always has a return value

* trying to fix phan for _validate

* no < around objectlink

* trying to fix some phan and phan-stan errors

* public variable target should be fk_target

* making TRIGGER_PREFIX more like in core/class/commonobject.class.php

* trying to save and use the notrigger value

* typecast objectlink fk_source and fk_target to string in the hope that they are later made correctly to int

* whitespace to trigger a build of my branch

* back to being int - because that is what they are

* trying to typecast

* trying to help PHPStan to validate fk_source and fk_target

* trying to use  the same way as  are used

* splitting  over multiple lines

* Fix: update ObjectLink return type in API methods

### FIX: Update ObjectLink return type in API methods

- Updated the return type of several methods from `ObjectLink` to `Object` to reflect a return type compatible with Luracast/Restler

* fix: refactor field setting in ObjectLinks class

# Fix: Refactor field setting in ObjectLinks class

- Removed the static `$INTFIELDS` array and moved its logic to a new private
method `_setObjectLinkField`.
- Updated `create`, `getByValues`, and `deleteByValues` methods to use
`_setObjectLinkField` for setting fields.
- Cleaned up the code by removing redundant field validation and type casting
logic.

* noting that relation type can both be string and null

* escaping strings before parsing them to the database

* -> not global

* trying to fix phpstan errors by flipping so the string part is first

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: MDW <mdeweerd@users.noreply.github.com>
2025-04-16 14:49:39 +02:00
ldestailleur
1325b249b0 Clean code to fix some phan warnings 2025-04-01 09:36:36 +02:00
ldestailleur
1726312fc3 Fix travis 2025-03-24 18:23:31 +01:00
Charlène Benke
5fe018cdba NEW ; Add hook on API call (#33501)
* NEW ; Add hook on API call

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-19 13:53:17 +01:00
ldestailleur
461cf5616e Clean code. WIP To manage permission on extrafields. 2025-03-18 14:55:37 +01:00
MDW
f625f8de60 Qual: Fix api phan notices 2025-03-05 13:22:08 +01:00
MDW
6b9361d252 Fix phpstan notices 2025-03-02 20:49:48 +01:00
MDW
035ede5874 Qual: Fix phan notices in API classes 2025-03-02 20:49:46 +01:00
ldestailleur
b65189f4e3 Fix regression 2025-02-17 18:18:57 +01:00
ldestailleur
33d722c84f API use syntax "Authorization: Bearer ..." instead of "DOLAPIKEY: ..." 2025-02-17 16:02:22 +01:00
MDW
a42bc6755c Qual: Fix PhanPluginUnknownPropertyType, PhanPossiblyUndeclaredVariable 2025-01-27 10:24:16 +01:00
Frédéric France
86e1625793 fix phpstan 2025-01-06 18:27:30 +01:00
Jon Bendtsen
e22ec699c0 FIX better error when api tempdir is not writeable (#32150)
* When api/temp folder does not exist or isn't writeable dol_syslog what the folder is and print where to find that information

* flipping line order

* putting suslog line first

* back to original print

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-12-01 23:18:38 +01:00
Laurent Destailleur
c2a3a93342 Debug v21 - renameto avoid future conflit 2024-11-24 14:58:40 +01:00
MDW
9ec4618199 Qual: Fix FunctionArray phan notices (#31754)
* Qual: Fix FunctionArray phan notices

* Fix class name in typing of htdocs/modulebuilder/index.php

* Fix customreports phpdoc

* Adjust file type after completeFileArrayWithDatabaseInfo

* Further phpdoc typing improvements

* More phpdoc

* Improve typing with cast on position field

* Force phpstan version

* Add phpstan exception

* Fix array index type + adjust phan config comment
2024-11-11 14:48:18 +01:00
Frédéric FRANCE
92ef950e6d fix phpstan (#31761)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* hide new error with phpstan 1.12.9
2024-11-10 23:47:14 +01:00
Frédéric FRANCE
0d7bc505d3 add phpdoc and clean phpstan baseline (#31702)
* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline

* add phpdoc and clean phpstan baseline
2024-11-06 19:39:46 +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
Frédéric FRANCE
0f563edb5f replace fetch_projet() and fetch_project() by fetchProject() (#29821)
* fix cti

* fix cti

* deprecate fetch_projet fetch_project to fetchProject

* deprecate fetch_projet fetch_project to fetchProject

* deprecate fetch_projet fetch_project to fetchProject

* odfHandler->setSegment only throw OdfExceptionSegmentNotFound

* odfHandler->setSegment only throw OdfExceptionSegmentNotFound

* fix deprecated

* fix

* fix sql
2024-10-26 22:43:44 +02:00
Frédéric FRANCE
44fdcdd8ed can set position of file with dol_move (#31201)
* can set position of file with dol_move

* Update api_documents.class.php

* Update api_documents.class.php

* fix

* fix

* fix

* fix

* fix
2024-09-30 16:49:38 +02:00
Frédéric FRANCE
a760fc0092 fix phpstan (#31189)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-29 21:51:51 +02:00
Laurent Destailleur
2f506b0948 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-26 03:46:21 +02:00
Laurent Destailleur
ae2ceccc5b Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-09-26 03:44:09 +02:00
Laurent Destailleur
9dc1c6f8f4 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-09-26 03:38:49 +02:00
Laurent Destailleur
e125ab4783 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-09-26 03:36:52 +02:00
Laurent Destailleur
a8cb076bbd Fix move 2024-09-26 03:34:32 +02:00
Laurent Destailleur
4ea503f366 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-09-26 03:30:40 +02:00
Laurent Destailleur
65c9bd7dcf Merge remote-tracking branch 'origin/15.0' into 16.0 2024-09-26 03:25:38 +02:00
Laurent Destailleur
16a0d1d7d5 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2024-09-26 03:23:00 +02:00
thomas-Ngr
bb40a43c5f FIX Add same security test whe nuploading files from API than from GUI (#31114)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-26 03:13:34 +02:00
MDW
099dbd9c1e Qual: Fix notices for htdocs/admin/* (#30982)
* Fix (Possibly)UndeclaredGlobalVariable

* Update phan baseline

* Fix (Possibly)UndeclaredGlobalVariable (2)

* Qual: Fix notices for htdocs/admin/*

# Qual: Fix notices for htdocs/admin/*

Fixes most phan/phpstan noticies for files under htdocs/admin/* and ai.
2024-09-18 03:27:25 +02:00
Laurent Destailleur
bf697f83eb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-09-12 21:50:31 +02:00