Skip to content
Snippets Groups Projects
Commit e2d28035 authored by Patrice ANDREANI's avatar Patrice ANDREANI
Browse files

NEW add link to doc in the readme

parent 21c0dd15
No related branches found
No related tags found
2 merge requests!112024 rc,!102024 rc doc
......@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.4] - 27-02-2024
- Ajout du lien vers la documentation dans le readme
## [14.0.3] - 26-02-2024
- Changement de numérotation
......@@ -19,6 +22,7 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
- Version initial.
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/advancedui/compare/v10.0.1...HEAD
[14.0.3]: http://git.open-dsi.fr/dolibarr-extension/pdfdownloadnotifier/commits/v14.0.4
[14.0.3]: http://git.open-dsi.fr/dolibarr-extension/pdfdownloadnotifier/commits/v14.0.3
[10.0.3]: http://git.open-dsi.fr/dolibarr-extension/pdfdownloadnotifier/commits/v10.0.3
[10.0.2]: http://git.open-dsi.fr/dolibarr-extension/pdfdownloadnotifier/commits/v10.0.2
......
......@@ -3,55 +3,7 @@ Pdf Download Notifier
Module permettant la notification par un email ou un événement d'un PDF téléchargé via le lien de partage.
Si vous utiliser une version de Dolibarr antérieur à la v12, il faudra modifier le fichier document.php se trouvant à la racine d'une façon similaire.
## Documentation
```
// Output file on browser
dol_syslog("document.php download $fullpath_original_file filename=$filename content-type=$type");
$fullpath_original_file_osencoded=dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset
// This test if file exists should be useless. We keep it to find bug more easily
if (! file_exists($fullpath_original_file_osencoded))
{
dol_syslog("ErrorFileDoesNotExists: ".$fullpath_original_file);
print "ErrorFileDoesNotExists: ".$original_file;
exit;
}
//-----------------------------------------------------------------
// Modification à rajouter dans le fichier - Begin
// Hooks
if (!is_object($hookmanager)) {
include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('document'));
$parameters = array('ecmfile' => $ecmfile, 'modulepart' => $modulepart, 'original_file' => $original_file,
'entity' => $entity, 'refname' => $refname, 'fullpath_original_file' => $fullpath_original_file,
'filename' => $filename, 'fullpath_original_file_osencoded' => $fullpath_original_file_osencoded);
$reshook = $hookmanager->executeHooks('downloadDocument', $parameters); // Note that $action and $object may have been
if ($reshook < 0) {
$errors = $hookmanager->error . (is_array($hookmanager->errors) ? (!empty($hookmanager->error) ? ', ' : '') . join($separator, $hookmanager->errors) : '');
dol_syslog("document.php - Errors when executing the hook 'downloadDocument' : " . $errors);
print "ErrorDownloadDocumentHooks: " . $errors;
exit;
}
// Modification à rajouter dans le fichier - End
//-----------------------------------------------------------------
// Permissions are ok and file found, so we return it
top_httphead($type);
header('Content-Description: File Transfer');
if ($encoding) header('Content-Encoding: '.$encoding);
// Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open)
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
else header('Content-Disposition: inline; filename="'.$filename.'"');
header('Content-Length: ' . dol_filesize($fullpath_original_file));
// Ajout directives pour resoudre bug IE
header('Cache-Control: Public, must-revalidate');
header('Pragma: public');
readfile($fullpath_original_file_osencoded);
if (is_object($db)) $db->close();
```
Lien vers notre [documentation](https://link.easya.solutions/pdf_dnl_doc)
\ No newline at end of file
14.0.3
14.0.4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment