Commit Graph

40 Commits

Author SHA1 Message Date
ldestailleur
3403bbe869 NEW Enhance the system for warnings on module activation 2025-10-10 10:16:33 +02:00
ldestailleur
e0df46e5c4 Comment to discourage use of always_enabled to true. 2025-10-03 12:39:33 +02:00
ldestailleur
9dd5307c1b Clean code 2025-09-03 12:06:29 +02:00
ldestailleur
c3fa113305 NEW Module datapolicy moved as stable (for anonimization features) 2025-07-24 18:34:17 +02:00
VIAL-GOUTEYRON Quentin
5cf613a269 NEW : Major overhaul of DataPolicyCron and add Recruitment policy (#34704)
* refactor(datapolicy): redesign setup and logic for GDPR compliance

- Introduced a data-driven configuration structure for setup.php.
- Added support for a new "recruitment" GDPR datapolicy configuration.
- Streamlined code for managing anonymization and deletion delays.
- Enhanced dropdown generation logic to improve maintainability.
- Simplified data anonymization and deletion methods in cron execution.

This change provides more flexibility and modularity while ensuring compliance with GDPR standards.

* refactor(datapolicy): enhance data cleaning logic and add modular handlers

- Refactored `cleanDataForDataPolicy` method for better readability and efficiency.
- Implemented modular handlers for deletion and anonymization (_handleDelete and _handleAnonymize).
- Added dynamic argument building for method calls based on policy configurations.
- Improved SQL query preparation with placeholders for better database compatibility.
- Enhanced error handling and outcome recording in data processing.

This update simplifies extensibility and ensures robust handling of datapolicies.

* fix precommit

* fix

* fix(datapolicy): resolve uninitialized langs object and improve type hints

- Added a check to ensure `$langs` object is properly initialized, preventing runtime errors.
- Improved type hints in `datapolicycron.class.php` for stronger type checking and clarity.
- Replaced `empty` checks with `isset` for better null safety in setup.php dropdown logic.
- Adjusted SQL placeholders to cast values as strings for compatibility.

These changes enhance code robustness, type safety, and error handling.

* fix(datapolicy): improve type hints and streamline dropdown logic

- Added precise type hints (`string`, `array`) to enhance code clarity and type safety.
- Removed redundant condition in dropdown generation for improved maintainability.
- Added type specification for `$paramName` in `array_map` to strengthen type checking.
- Inserted missing class docblock for `CommonObject` in `datapolicycron.class.php`.

These updates lead to cleaner, safer, and more robust code.

* fix(datapolicy): improve type hints and streamline form submission logic

- Added return type hints (`: int`, `: void`, `: array`) in `datapolicycron.class.php` for better type safety and clarity.
- Simplified loop structures in `setup.php` by removing unnecessary variables.
- Revised `buttonsSaveCancel` method usage to eliminate redundant cancel parameter logic.
- Enhanced maintainability through refactoring `_processPolicyAction`, `_handleDelete`, and `_handleAnonymize` methods.

These refinements improve code readability, maintainability, and robustness.

* refactor(datapolicy): replace custom dropdown generation with `Form::selectarray`

- Removed the custom `$generateSelectHtml` function, simplifying code by using the existing `Form::selectarray` method.
- Updated dropdown generation for 'anonymize' and 'delete' actions to align with Dolibarr's standard practices.
- Enhances maintainability by leveraging built-in utilities and reducing custom logic.

* Update datapolicycron.class.php

* Try to fix CI

* Update datapolicycron.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:41:05 +02:00
moreauftheobald
9dee6b56af Tracking conf->module->enabled 3 (#31905)
* Tracking $conf->module->enabled part 2

* Tracking $conf->module->enabled part 3

* Tracking $conf->module->enabled part 3

---------

Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
2024-11-15 23:02:26 +01:00
Laurent Destailleur
c8e2b537c6 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-30 16:44:24 +02:00
Laurent Destailleur
f758ef89f9 Debug v20 2024-08-30 15:42:36 +02:00
Laurent Destailleur
ecc5f90574 Fix init cron when priority is not set. 2024-08-22 04:05:25 +02:00
Laurent Destailleur
97006d6945 Clean code: Remove code not working (was using hard coded values) 2024-02-02 21:41:40 +01:00
MDW
89004f7e03 Qual: Spelling htdocs/core (#27491)
Highlights:
- initialY in pdf_standard.modules.php was unused
  - remove (otherwise -> initially) (+same in other file)
2024-01-13 19:48:20 +01:00
Laurent Destailleur
9e1b90e4a1 Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
Laurent Destailleur
53dab922fd Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
Laurent Destailleur
9fa00c1771 Fix trans in comments 2022-10-12 15:29:30 +02:00
Frédéric France
c7ee2f413c min php version is 7.0 2022-09-27 20:48:47 +02:00
Frédéric France
da8617e3ff Merge remote-tracking branch 'upstream/develop' into loaddolibarrenv 2022-09-08 18:59:23 +02:00
Laurent Destailleur
90d58bde27 Clean module datapolicy 2022-09-08 16:19:59 +02:00
Frédéric France
835441d437 remove blank line 2022-09-07 20:14:49 +02:00
Laurent Destailleur
bd3218b460 Fix remove dead code 2022-02-06 13:06:12 +01:00
Givriz
598156de04 Update modDataPolicy.class.php
There was useless condition
2021-04-14 17:58:46 +02:00
Damien BENOIT
9abc7a5b0d Update modDataPolicy.class.php 2021-04-12 16:16:48 +02:00
Givriz
7a54e5d346 Using empty instead of isset
I used empty instead of isset, and I fixed some problems of my previous pull request
2021-04-12 16:03:56 +02:00
Givriz
5ed01f6733 Fix errors phpv8 2021-04-03 17:09:14 +02:00
Alexandre SPANGARO
3669c374c2 Uniformize information on modules 2021-03-20 13:55:43 +01:00
Frédéric FRANCE
554e449e40 code syntax core directory 2021-02-23 22:03:23 +01:00
Scrutinizer Auto-Fixer
7f52920716 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-10-31 13:32:18 +00:00
Scrutinizer Auto-Fixer
444c293c01 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-04-10 08:59:32 +00:00
Frédéric FRANCE
9e4fb8d4fe doxygen 2019-12-15 10:02:20 +01:00
Laurent Destailleur
de396dc9b3 Clean code for order of modules 2019-10-17 19:21:30 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
f338a5f9ad Debug module datapolicy 2019-09-06 19:56:00 +02:00
Laurent Destailleur
89e1cdff61 Debug module datapolicy 2019-09-06 19:41:15 +02:00
Laurent Destailleur
657bd5c2fe Move module from develop to experimental 2019-05-21 15:50:16 +02:00
Frédéric FRANCE
1c07006015 wip 2019-02-25 21:36:27 +01:00
Laurent Destailleur
52d4426e87 Debug new modules 2018-11-05 16:38:07 +01:00
Laurent Destailleur
90729c03c4 Fix dependencies of new modules 2018-11-05 10:28:44 +01:00
Laurent Destailleur
0229b96178 Fix family of module 2018-11-03 11:38:29 +01:00
Laurent Destailleur
0ca5da055f Debug v9 2018-10-31 15:04:01 +01:00
Laurent Destailleur
ae44c4c7f5 Disable duplicate feature with emailing module and field "unsubscribe
requested"
2018-10-24 02:00:43 +02:00
Laurent Destailleur
6d4d8a0342 Dolibarize data privacy policy module 2018-10-15 14:05:54 +02:00