- Changed from checkToken() to simple token existence check
- checkToken() does not exist in this Dolibarr version
- Now uses same pattern as other files in the module: if (!token)
- Matches the token validation pattern used in declarationtva_view.php
- Should resolve the PHP Fatal error
- Changed from dol_verifyToken() to checkToken()
- dol_verifyToken() doesn't exist in this Dolibarr version
- checkToken() is the correct function for token validation
- Should resolve the PHP Fatal error
- Created download_pdf.php as secure download handler
- Handles PDF downloads through Dolibarr's security system
- Validates user permissions and declaration status
- Uses proper token validation for security
- Updated declaration list to use download handler instead of direct file links
- Bypasses Dolibarr's file access restrictions
- Provides secure, controlled access to PDF files