Commit Graph

142 Commits

Author SHA1 Message Date
MDW
1632befc92 Qual: Fix phan notices (user) 2025-02-22 16:28:13 +01:00
Laurent Destailleur (aka Eldy)
fa9fe2efa7 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-20 15:02:37 +01:00
Laurent Destailleur (aka Eldy)
c9ab22782e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-01-20 14:57:45 +01:00
Laurent Destailleur (aka Eldy)
1f360ca498 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-20 12:28:49 +01:00
Laurent Destailleur (aka Eldy)
1b42078d1e Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-01-20 10:24:30 +01:00
atm-florian
ba4e97f07b FIX 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237
+ security for Tickets API: disable updating rowid
2025-01-16 10:37:29 +01:00
MDW
0c26110636 Qual: Fix notices related to user classes (#31291)
# Qual: Fix notices related to user classes

This fixes several notices related to user classes (and reveals
some actual bugs or inconsistent typing).
2024-10-06 13:52:05 +02:00
Laurent Destailleur
fdb209ca41 Add a check to allow setPassword from apis 2024-08-17 16:41:30 +02:00
Laurent Destailleur
52c8b669c9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-17 16:20:17 +02:00
Laurent Destailleur
c481be58f7 Clean code 2024-08-17 16:20:06 +02:00
Jon Bendtsen
5c6594b4ce NEW API call to re-generate a users password. (#30590)
* NEW API call to re-generate a users password.

* fixing job:pre-commit that gave an error saying it was missing here

* adding the  variable

* trying to load global user variable based on this comment https://github.com/Dolibarr/dolibarr/pull/30589#issuecomment-2276631147

* first attempt didnt work, but I found that global $conf at the top of the function

* adjust http error code to 500

* removing some comments and pre commit fix

* making send password a bool + using ->useraccount as pr. @eldy request

* lower case false

* Update api_users.class.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-17 16:19:55 +02:00
MDW
e3d3bad080 Fix: 🛟Fix getrights usage & Update the documentation to suggest to use loadRights (#30543)
* Qual: Update the documentation to suggest to use loadRights

# Qual: Update the documentation to suggest to use loadRights

Given the pending issues, update the documention regarding getrights to
point to loadRights.

* Fix: call loadRights on User (not getRights)
2024-08-04 18:47:22 +02:00
Frédéric FRANCE
acd8fdc24e fix phpstan level 4 (#29954)
* fix phpstan level 4

* fix phpstan level 4
2024-06-09 13:26:45 +02:00
Laurent Destailleur
b5de782c6b Fix use the good HTTP code 2024-04-07 14:59:25 +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
990216b13f NEW Api parameters are sanitized by the WAF, same code than GET/POST 2024-04-02 13:07:13 +02:00
Laurent Destailleur
5d073ac208 Fix hasRights into hasRight 2024-03-19 22:02:42 +01:00
MDW
8c08c6d483 Fix PhanPluginRedundantAssignment 2024-03-13 01:05:00 +01:00
Laurent Destailleur
9d48dcbd3d Fix phpstan 2024-02-22 01:32:55 +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
b514c1afbe Move code 401 to 403 2024-02-01 13:34:55 +01:00
MDW
342ab85195 Qual: Spelling htdocs/[q-z]* (#27447)
# Qual: Fix spelling htdocs/[q-z]*

Probably fixes a bug:

- htdocs/webservices/server_thirdparty.php
  No other occurence of adress found.
  -'adress'=>->adress,- +'address'=>->address,+
2024-01-12 17:18:52 +01:00
Frédéric FRANCE
aef8318b2e fix phpstan (#27319) 2024-01-10 17:01:40 +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
Laurent Destailleur
d92c65ad91 FIX infinite loop in API call/trigger by adding a caller 2023-12-15 12:15:33 +01:00
Laurent Destailleur
619155f65e Fix with php-cs-fixer 2023-12-04 13:53:48 +01:00
Laurent Destailleur
075ee02901 Fix php8.2 warnings 2023-11-27 12:08:48 +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
Frédéric France
81fbdacf8e use isModEnabled 2023-06-27 21:31:36 +02:00
Laurent Destailleur
76d12cdce1 Fix phpcs 2023-06-20 00:59:44 +02:00
Frédéric France
68855ce672 use user hasRight 2023-06-19 20:08:27 +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
hystepik
cca08ee18d Fix : user group date midif to match database 2023-04-03 12:22:05 +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
FLIO
cd289ca8ac fix(qodana) fix function comment wrong return 2023-02-08 19:09:05 +01:00
Laurent Destailleur
2a0a0fc470 Clean old deprecated code on social networks fields 2023-01-30 14:13:02 +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
Philippe GRAND
0aba1f6753 FIX php8 compatibility 2022-08-28 14:39:50 +02:00
Laurent Destailleur
8603d493ad Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/contrat/list.php
	htdocs/install/mysql/tables/llx_partnership.key.sql
2022-03-19 17:34:26 +01:00
Laurent Destailleur
ed631b2b06 Fix doxygen, missing error message 2022-03-18 16:14:20 +01:00
Regis Houssin
ed9346dfb9 Works on replace MAIN_DB_PREFIX by $db->prefix() 2022-01-27 10:00:26 +01:00
Laurent Destailleur
0387b9922e FIX error message on sqlfilter in API 2021-12-20 20:49:32 +01:00
Laurent Destailleur
97d97af932 Clean: Remove fields for social networks (merged into "socialnetworks") 2021-10-27 16:39:34 +02:00
Laurent Destailleur
b1c23b9a93 Update api_users.class.php 2021-09-10 13:31:17 +02:00
Laurent Destailleur
d4bfbc69a4 Update api_users.class.php 2021-09-10 13:30:28 +02:00
Laurent Destailleur
999ad7629f Update api_users.class.php 2021-09-10 13:29:19 +02:00