2
0
forked from Wavyzz/dolibarr
Commit Graph

105 Commits

Author SHA1 Message Date
Thibault Parodi
be72bfa664 FIX #29424 API GET member categories (#31881)
* Fix members categories when user is not found

* Return empty array instead of 0 when member does not have category assigned
2024-11-15 23:57:58 +01:00
Frédéric FRANCE
15490b292f fix phpstan and fix CI (#31739)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-11-10 11:16:23 +01:00
ptibogxiv
d5d7d484a8 NEW get member by thirdparty account (#31296)
* NEW get member by thirdparty account

* Update api_members.class.php

* Update api_members.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-07 14:20:27 +02:00
MDW
76eaf8bd8d Qual: Fix phan notices in classes related to class using getNextValue. (#30925)
* FIX 🛟 phan

* getToolTip() can take null for $coc

* Fix uninitialized vars & arg types

* PHPDoc typing, argument fixes

* PHPDoc typing, argument fixes for AdherentType

* PHPDoc typing, argument fixes for AdherentStats

* Update baseline to enable adherent notices

* Fix PHPDoc typing in api_members

* Minor bug fixes, typing

* PHPDoc api_subscriptions

* PHPDoc Societe

* Ignore empty foreach notice

* Add initialiser

* Categorie is string, old int mode is deprecated

* Fix missing initialisations

* Fix missing initialisations adherents/note

* Fix typing (cast), initialisation of var

* Fix initialisations

* Fix argument types

* Improve array PHPDoc type

* PHPDoc array type

* PHPDoc: Improve typing

* Correct argument type to getNomUrl

* Improve typing for timespent

* Fix typing for getNextValue args

* Improve typing

* Fix typing hints contrat/card

* Update baseline

* Fix typing

* Fix extraparams property typing

* Fix argument typing

* Qual: Correct covariant type

* Impove typing for timespent

* Remove exclusion no longer matched (level 6)

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
2024-09-12 21:16:42 +02:00
ptibogxiv
98b496ada0 Update api_members.class.php with pagination (#30758)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-29 17:42:29 +02:00
Laurent Destailleur
ee0412dd27 Fix phan warning 2024-07-31 18:54:52 +02:00
Jon Bendtsen
eb1c044419 FIX: API GET /members/types/{id} says it deletes member type #29421 (#29423)
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2024-04-20 22:21:47 +01:00
Laurent Destailleur
930c8614b1 Merge branch 'develop' into membertype_update_single_array_option_element 2024-04-02 14:54:13 +02:00
Laurent Destailleur
7715513ac9 Some API HTTP return code were moved from 401 to 403 to better follow
REST specification.
2024-04-02 14:47:49 +02:00
Laurent Destailleur
66f3b438f6 Merge branch 'develop' into membertype_update_single_array_option_element 2024-04-02 13:37:01 +02:00
Laurent Destailleur
51f862ad28 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-04-02 13:21:00 +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
Jon Bendtsen
bc56e8f1e7 double fix: do not remove array_options from json + allowing single option_ update without nullifying the other options_ 2024-04-01 19:11:16 +02:00
Jon Bendtsen
c55c0284b1 will allow updating 1 member single Complementary Attribute without specifying complementary attributes that we don't want to change. Similar to # 29115 but just for a member 2024-04-01 12:37:05 +02:00
MDW
fc3cdf51ba Fix PhanPluginRedundantAssignment 2024-03-13 00:40:32 +01:00
Laurent Destailleur
9a281ed264 Fix undefined property 2024-03-08 21:21:27 +01:00
Laurent Destailleur
afd49868d5 Fix bad route 2024-03-08 16:32:44 +01:00
Laurent Destailleur
a4faa488fd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-08 11:00:50 +01:00
Laurent Destailleur
fb16af02b4 Clean code. Move member type API in good file. 2024-03-08 11:00:19 +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
9d48dcbd3d Fix phpstan 2024-02-22 01:32:55 +01:00
Laurent Destailleur
c9823f2b8d Move 401 to 403 2024-02-01 19:34:13 +01:00
Laurent Destailleur
b514c1afbe Move code 401 to 403 2024-02-01 13:34:55 +01:00
Laurent Destailleur
f39a439895 Clean code 2024-01-26 03:35:00 +01:00
Laurent Destailleur
3ac7706a63 Clean code 2024-01-15 11:28:25 +01:00
Pascal Hubrecht
c03a41e914 Enhance API description (#27485) 2024-01-13 15:32:22 +01:00
Laurent Destailleur
f773fa2dbd Fix phan report 2024-01-12 22:09:51 +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
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
Fabian Heinz
aa43e18d56 API status code fix
apis currently returning 404 if no entry found fixed
2023-12-31 14:05:21 +01:00
Laurent Destailleur
d92c65ad91 FIX infinite loop in API call/trigger by adding a caller 2023-12-15 12:15:33 +01: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
Laurent Destailleur
31474d80f1 Doxygen 2023-06-19 00:52:43 +02:00
VMR Global Solutions
926aa6fec7 API add / fix filter on extrafields in index()
Add / change in api_xxx.class.php files the ability to filter on extrafields when missing in the public functions index()
by changing the SQL query with the pattern 
" FROM ".MAIN_DB_PREFIX"xxxx AS t LEFT JOIN ".MAIN_DB_PREFIX."xxxx_extrafields AS ef ON (ef.fk_object = t.rowid)
2023-04-28 09:31:33 +02:00
Laurent Destailleur
ed5c890769 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-02-25 20:12:48 +01:00
Laurent Destailleur
cbb6ca071a Fix #yogosha15157 2023-02-25 19:51:05 +01:00
Frédéric FRANCE
3680f20465 use user->hasRight 2022-12-21 08:41:19 +01:00
Laurent Destailleur
c22d9f282a Merge pull request #23016 from inovea-conseil/FIX_product_type9
FIX product_type 9
2022-11-30 00:41:35 +01:00
stickler-ci
3fd81293a3 Fixing style errors. 2022-11-25 23:57:35 +00:00
Eric Seigne
616e2b79ef fix #22766: better API response HTTP code 2022-11-26 00:50:45 +01:00
Laurent Destailleur
06d94c9a97 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop 2022-10-19 17:11:32 +02:00
Laurent Destailleur
babf1e0e27 Fix doc 2022-10-17 01:55:57 +02:00
Philippe GRAND
9027e2b96b update code toward php8 compliance 2022-09-09 10:28:00 +02:00
Laurent Destailleur
ed631b2b06 Fix doxygen, missing error message 2022-03-18 16:14:20 +01:00
Laurent Destailleur
0387b9922e FIX error message on sqlfilter in API 2021-12-20 20:49:32 +01:00
Laurent Destailleur
46d993c9a6 Clean code 2021-08-27 22:42:04 +02:00
Laurent Destailleur
fb46ece906 Fix yogosha 6347 2021-06-09 15:36:47 +02:00
Laurent Destailleur
1c95e2b7c7 FIX #17453 2021-05-03 14:58:29 +02:00
daraelmin
d979440ca6 Call exclude() when updating status to -2 2021-03-13 19:21:44 +01:00