Commit Graph

304 Commits

Author SHA1 Message Date
Jon Bendtsen
a9b468bbcd New: Adding linked project to mass mailing card (#35723)
* New: Adding linked project to mass mailing card

* modify project on mailing card

* mailing card load fk_project pre commit fix

* only fetch projects with id>0

* fix PHPstan errors regarding mesg

* projects related to mass mailings does not have a soc or socid

* remove last trace of soc and socid

* checking if mesg is set before using it

* just loading all projects, because maybe you have a mailing list with workers for a thirdparty? think company party

* showing the project during edit

* given that action is already something else, it will never not be classify

* making PHPstan happy

* Adding project column to list of mass mailings. Search, order and click able

* pasted the wrong place

* no need to check for filtermail

* x now also clears project search

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 03:19:45 +02:00
Jon Bendtsen
e8a347f89e NEW API for handling mass mailing targets (#35603)
* NEW API for handling mailing targets

* fix PHP Codesniffer

* adding return values to make phpstan happy

* Update function actually updates

* defining mailing_target public function create

* using a different language translation

* mailing_target - phpstan fixes

* mailing target - no check properties body

* mailing target int typecast fk_mailing

* mailing target - just 1 parameter

* mailing_target phpstan fixes

* mailing_target setting labelStatus

* mailing target class public function delete

* reveal the list of status name for the Mass mailing object in the API

* set tms to now when it is set to draft

* functions to set the mailing target status

* hurl testing api mailings

* hurl test - exit run script at first error

* hurl test mailings - should cover all endpoints

* using self:: in front of the CONST

* Trying to find out which line evaluates to noting

* API mailings can now get the targets of a mailing

* Protected method name "Mailings::_cleanTargetDatas" must not be prefixed with an underscore

* give me fk_project

* API endpoints for: Get all targets of a mass mailing + Get information about a specific target id

* API endpoint to update a mailing target

* telling pre-commit check to ignore, just like done in the function I copied

* be more explicit about for GUI tests we need username and password

* Prevent updating fk_mailing value

* API endpoint deleteTarget

* post to create a mailing target does work, but need slight more testing after work

* correct indent

* fixing some build errors

* More comprehensive hurl test of creation of a target

* adding status_dest to mailing targets json

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-09 18:38:13 +02:00
Jon Bendtsen
76916ad1cf Add fk_project to Mass Emailings (#35635)
* Add fk_project to Mass Emailings

* Mass Mailing fk_project SQL definition dispre

* mailing typecasting fk_project

* mailing using correct variable name

* more type casting to fix phpstan errors related to fk_project in mass mailing

* mailing fk_project NULL better default in DB

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-10-04 20:08:27 +02:00
Frédéric FRANCE
6afec608a3 fix CI (#35631)
* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-04 13:29:57 +02:00
Jon Bendtsen
8f52485172 NEW Api mass emailing (#35531)
* adding function to set it to draft mode

* New API endpoint for controlling mass mailings

* report which id we could not find + unset some fields not on this object + write that source was com/propal/class/api_propal.class.php

* extending the fetch function for the mailing object so the API can show all columns in the database

* filling more data into the object and don't unset it later

* adding notrigger to clone creation

* still some cleaning up from when cloning api_proposals.class.php

* do not unset the ID, because we want the ID so we can use it

* adding endpoint to clone a mass mailing

* extending count function with 'all' that just returns all rows, no matter the status

* API endpoints to delete all targets of a mass mailing

* setting which http method to use

* pretty print clone endpoint in API explorer

* endpoint resetTargetsStatus of mass mailing

* Typo receipients fixed

* Update api_mailings.class.php

* Update api_mailings.class.php

* Update api_mailings.class.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-01 17:37:43 +02:00
ldestailleur
e3bf8bcb47 FIX Edit of email in emailing. Property messtype not set. 2025-09-11 16:40:20 +02:00
ldestailleur
4e89f046d1 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-01 16:47:39 +02:00
ldestailleur
bb0974add9 FIX Security when using feature Advanced Target of emailing (hidden in
v21, default in v22+). Possible SQL injection by users with permissions
to make mass emailing. Reported by Simon Perdrisat.
2025-09-01 16:38:01 +02:00
ldestailleur
924204ac29 LEFT JOIN syntax 2025-08-20 17:09:43 +02:00
HENRY Florian
45cc9cb39b fix: advanced target emailling missing case (#34715)
* fix: advanced target emailling missing case

* fix: travis for simple quote SQL

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-27 13:54:02 +02:00
ldestailleur
a145b3b44d Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-07-17 19:30:58 +02:00
HENRY Florian
5d88aea4b9 fix: advanced target emailling missing case (#34715)
* fix: advanced target emailling missing case

* fix: travis for simple quote SQL

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-17 19:30:58 +02:00
ldestailleur
2736a4b382 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-05-05 00:07:09 +02:00
ldestailleur
a74979bc04 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-05-05 00:04:17 +02:00
Eduardo Pulpillo
35fd24e506 Fix #31047 #23763 mailing.class.php do not retrieve the public and private notes (#33994)
* Fix bug #31047  mailing.class.php do not retrieve the public and private notes

Fix bug #31047 The public and private notes are stored but not retrieved in /comm/mailing/class/mailing.class.php because the fields note_public & note_private are not detailed in the /comm/mailing/class/mailing.class.php class. After this commit it works like a charm.

* Update mailing.class.php

* Update mailing.class.php

* Update mailing.class.php

* Update mailing.class.php

* Update mailing.class.php

* Update mailing.class.php

* Update mailing.class.php
2025-04-29 06:39:07 +02:00
ldestailleur
facf32c5a9 Clean code 2025-03-25 13:40:42 +01:00
MDW
d64298f6c1 Qual: Fix phan notices (htdocs/compta) (#33427) 2025-03-12 20:41:50 +01:00
Laurent Destailleur (aka Eldy)
b024b95948 Fix typo 2025-01-09 19:35:01 +01:00
Laurent Destailleur (aka Eldy)
56710ce9b7 FIX CVE-2024-55227 and CVE-2024-55228 CSRF when
MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY is
on (hidden option not on by default)
2025-01-09 19:35:01 +01:00
Laurent Destailleur (aka Eldy)
de321e8f01 Fix typo 2025-01-09 02:01:49 +01:00
Laurent Destailleur (aka Eldy)
79ae59ee2a Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-08 17:54:13 +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
86e1625793 fix phpstan 2025-01-06 18:27:30 +01:00
Laurent Destailleur (aka Eldy)
352d156dd7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-12-08 17:07:14 +01:00
Laurent Destailleur (aka Eldy)
774a48fa29 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-12-08 16:53:21 +01:00
Florian HENRY
8c85933da9 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:41:17 +01:00
Florian HENRY
b10483ddc8 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:41:07 +01:00
Florian HENRY
6c34431336 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:36:07 +01:00
Florian HENRY
e61da22458 fix: various fix on broken extrafields managnement on advtargetemailing 2024-12-03 15:27:45 +01:00
Frédéric FRANCE
6dd6ab7906 fix phpstan (#31614)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-10-29 17:40:56 +01:00
Laurent Destailleur
e6f1d4835f Clean sql code 2024-10-29 02:58:20 +01:00
MDW
0ac595364b Qual: Fix phan/phpstan notices in class files (part 1) (#31501)
* Ignore phpstan configuration for spelling

* Qual: Fix phan notices in class files
2024-10-25 21:00:02 +02:00
Laurent Destailleur
ff4344d5c8 Clean code 2024-10-24 01:12:58 +02:00
Frédéric FRANCE
60860aa781 add phpdoc (#31196) 2024-09-30 10:08:03 +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
Laurent Destailleur
e09fa82deb Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-17 02:51:19 +02:00
Laurent Destailleur
65edbd5f9f FIX better compatibility with some old extrafield syntax filter 2024-09-16 15:50:47 +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
Lucas Marcouiller
52c40c9031 New massaction reset for mailing target (#30710)
* New massaction reset for mailing target

* Update mails.lang

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-21 15:28:23 +02:00
Frédéric FRANCE
4b275dc148 add phpdoc (#30208)
* add phpdoc

* add phpdoc

* add phpdoc

* add phpdoc

* clean phpdoc
2024-06-30 19:39:01 +02:00
Laurent Destailleur
eb537088ba Exclude phan error type that is for the moment too annoying to manage 2024-06-18 19:15:29 +02:00
Laurent Destailleur
340aa2e568 Debug v20 2024-06-18 12:47:02 +02:00
Frédéric FRANCE
d0830b3159 fix phpstan (#29602)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix travis

* fix phpstan

* fix phpstan

* fix phan

* 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 travis

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-05 00:34:19 +02:00
Laurent Destailleur
68c81e5311 Debug v20 2024-04-24 11:26:08 +02:00
MDW
daf2d36bcd PHPdoc typing 2024-03-24 11:03:05 +01:00
MDW
04b3ed0c7e Fix extrafeild typo 2024-03-24 11:03:03 +01:00
Laurent Destailleur
5541560e1c Fix phan warnings 2024-03-24 05:44:55 +01:00
brad
5d02743f21 Merge branch 'fix-add-state-province-filter-field' of github.com:bradley-jarvis/dolibarr into fix-add-state-province-filter-field 2024-03-22 15:37:57 +11:00
brad
d351005cb1 FIX Add state/province filter to email adv select 2024-03-22 15:19:18 +11:00
Laurent Destailleur
16b2cf2880 Fix creation of emailing 2024-02-25 20:41:58 +01:00