Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr_module_pdfdownloadnotifier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dolibarr extension
dolibarr_module_pdfdownloadnotifier
Commits
e2d28035
Commit
e2d28035
authored
1 year ago
by
Patrice ANDREANI
Browse files
Options
Downloads
Patches
Plain Diff
NEW add link to doc in the readme
parent
21c0dd15
No related branches found
No related tags found
2 merge requests
!11
2024 rc
,
!10
2024 rc doc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog.md
+4
-0
4 additions, 0 deletions
ChangeLog.md
README.md
+2
-50
2 additions, 50 deletions
README.md
VERSION
+1
-1
1 addition, 1 deletion
VERSION
with
7 additions
and
51 deletions
ChangeLog.md
+
4
−
0
View file @
e2d28035
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
50
View file @
e2d28035
...
...
@@ -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
This diff is collapsed.
Click to expand it.
VERSION
+
1
−
1
View file @
e2d28035
14.0.
3
14.0.
4
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment