2
0
forked from Wavyzz/dolibarr
Commit Graph

140 Commits

Author SHA1 Message Date
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
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
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
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
Laurent Destailleur
03bc26dcbb Fix API_DISABLE_LOGIN_API 2024-08-17 16:29:52 +02:00
Lucas Marcouiller
2655cd156b New api call counter (#29323)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-04-11 19:14:10 +02:00
Laurent Destailleur
990216b13f NEW Api parameters are sanitized by the WAF, same code than GET/POST 2024-04-02 13:07:13 +02:00
MDW
a408288ba1 Fix & enable PhanPluginUnknownClosureParamType
# Fix & enable PhanPluginUnknownClosureParamType

Typing of anonymous functions to fix this notice.
Optimised some minor things.
2024-03-14 22:42:26 +01:00
MDW
ec8f2a420d Fix: Use of deprecated fichinter in dynamic modulename (#28456)
# Fix: Use of deprecated fichinter in dynamic modulename

The modulename is computed dynamically and could use deprecated fichinter
module name.
Also optimised the test.
2024-02-27 15:29:58 +01:00
Laurent Destailleur
200fd95074 NEW All apis has a hook context of "api" initialized 2024-02-12 05:25:45 +01:00
Laurent Destailleur
6c91d3d8b7 Fix typo english 2024-01-18 15:15:05 +01:00
Laurent Destailleur
8706d58ea6 Move code only if required 2024-01-18 12:39:45 +01:00
Mathieu "rid" Soula
1bece7f104 Fix PHPStan / php-stan check failure 2024-01-18 10:52:39 +01:00
Mathieu "rid" Soula
b1b16677ae Fix indentation. 2024-01-18 10:36:10 +01:00
Mathieu "rid" Soula
480d35ccc9 Move termination callback back to api/index.php
As discussed in the pull request conversation : 
- remove unnecessary flush calls ;
- remove termination callback method from Restler code and set it back into api/index.php
2024-01-18 10:26:42 +01:00
Mathieu "rid" Soula
12a30cb907 Update index.php
Fix PHPScan error
2024-01-17 11:37:10 +01:00
Mathieu "rid" Soula
85b90373f5 QUAL Sending API response data to clients before completing post-processing tasks.
This commit allows Rester to immediately send response data back to the client before completing some time consuming post-processing tasks (such as sending emails) in a termination callback if defined.

Termination callback should be created into the same class as the API method it terminates. Callback name must match the following format : "_terminate_" + <API_METHOD_NAME> + "_" + <API_METHOD_RESPONSE_FORMAT_EXTENSION>.

For instance, termination callback for orders "post" method defined in htdocs/commande/class/api_orders.class.php must be named "_terminate_post_json".
2024-01-17 11:16:43 +01:00
MDW
85ad4ecdf8 Qual: Spelling for htdocs/[a-b]* (#27422)
Mostly comments, one variable changed from misspelling to .
Also changed CNAT to C.N.A.T in comment to avoid fix from CNAT to CAN'T.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-12 20:58:09 +01:00
Laurent Destailleur
fb083a6cfc Fix warning with rector 2023-12-13 16:33:17 +01:00
Laurent Destailleur
987d6c41b9 Fix with php-cs-fixer 2023-12-04 11:41:14 +01:00
Laurent Destailleur
ca145ef912 QUAL: Endpoint for API /partnershipapi has been renamed into
/partnerships to follow conventions
2023-10-31 13:31:02 +01:00
Laurent Destailleur
5b15b5c647 QUAL Move conf->global into getDolGlobal... 2023-10-24 17:00:13 +02:00
Laurent Destailleur
1f38e54e78 Clean code 2023-10-15 15:32:35 +02:00
Laurent Destailleur
c507adeef7 NEW Top menu support picto of modules that are font awesome picto. 2023-10-13 15:00:51 +02:00
Laurent Destailleur
e41f449f95 FIX #yogosha17128 2023-07-19 04:14:49 +02:00
Laurent Destailleur
2eb054a170 Fix try fix function not found of qodana 2023-01-11 17:06:23 +01:00
Laurent Destailleur
32c161e576 Fix warnings 2022-12-30 12:10:23 +01:00
Laurent Destailleur
be10cdee95 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop 2022-10-06 16:03:50 +02:00
Laurent Destailleur
5ccc5c9e1a Fix error message 2022-10-03 17:30:47 +02:00
Alexandre SPANGARO
c674f00cb2 Use isModEnabled 2022-09-25 15:27:42 +02:00
Laurent Destailleur
b23ab2cb71 FIX #yogosha12266 2022-09-09 13:58:54 +02:00
Laurent Destailleur
b000ee7c50 NEW Add API for partnership module
Debug module builder
2022-07-15 13:41:02 +02:00
Laurent Destailleur
fe0bbbb626 Better compatibility 2022-05-19 21:32:43 +02:00
Laurent Destailleur
ef21def5ce NEW Add option MAIN_API_DEBUG to save API logs into a file 2022-03-19 10:42:06 +01:00
Laurent Destailleur
2a18bce2f3 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts:
	htdocs/api/index.php
	htdocs/langs/en_US/productbatch.lang
	htdocs/langs/fr_FR/productbatch.lang
	htdocs/ticket/list.php
2022-02-16 20:31:55 +01:00
Laurent Destailleur
0e664cc969 Fix API call from ajax 2022-02-15 11:12:08 +01:00
Laurent Destailleur
0b63ac638e FIX API caan now be used in a preflight mode by Ajax. 2022-02-09 21:12:06 +01:00
Laurent Destailleur
5a37b2c649 Fix API call 2022-02-09 18:10:21 +01:00
Laurent Destailleur
fe01f75e97 Fix API_ENDPOINT_RULES with api of external modules 2022-02-09 17:50:26 +01:00
Laurent Destailleur
fa1bddc79d Fix API for php8 2021-12-21 14:01:58 +01:00
Laurent Destailleur
626cd24305 Clean code for #19639 2021-12-19 17:05:57 +01:00
Laurent Destailleur
b0fe08e411 Clean code 2021-04-26 19:21:23 +02:00
stickler-ci
296d19ac8b Fixing style errors. 2021-04-25 18:25:32 +00:00
Laurent Destailleur
d6ce4e1086 Allow option to restrict API endpoints 2021-04-25 20:23:41 +02:00
Laurent Destailleur
5d0e93344b Upgrade to swagger 2.2 2021-04-25 17:41:59 +02:00
Laurent Destailleur
e057f44293 Typo 2021-04-25 16:15:15 +02:00
Laurent Destailleur
3a5f130ed5 Add protections 2021-03-26 14:54:12 +01:00
Laurent Destailleur
8dd07fb6d5 NEW The swagger.json file of API can be included into external sources 2021-03-26 14:30:47 +01:00
Laurent Destailleur
94b98403ab Update index.php 2021-03-25 12:52:35 +01:00
Alexis LAURIER
69d57f48fd api compression - add API_DISABLE_COMPRESSION 2021-03-25 09:20:31 +01:00