* 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>
* Qual: fix commonstickergen..don.class
* Fix notifications for pdf_paiement...cronjob.class
* Qual: Fix notifications for emailcollector..price_parser.class
* Ensure that NULL is used in the database when fk's are 0/empty
* Fix notifications for pdf_paiement...cronjob.class
* Cope with updated phpstan, and make fk_origin_stock int in multiple locations
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.
htdocs/datapolicy/class/actions_datapolicy.class.php 118 Property CommonObject::$state_id (int) does not accept string.
htdocs/datapolicy/class/actions_datapolicy.class.php 120 Property CommonObject::$country_id (int) does not accept string.