fix link to document in html mail of expired documents

This commit is contained in:
Uwe Steinmann 2024-03-28 20:11:09 +01:00
parent eded3365b1
commit 66114a653c

View File

@ -45,7 +45,7 @@ class SeedDMS_ExpiredDocumentsTask extends SeedDMS_SchedulerTaskBase { /* {{{ */
$body .= "---------------------------------------------------------------------------------\n";
foreach($docs as $doc) {
$body .= sprintf($tableformat."\n", getReadableDate($doc->getExpires()), $doc->getId(), $doc->getName());
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getExpires()), $doc->getId(), '<a href="'.getBaseUrl().'/out/out.ViewDocument.php? documentid='.$doc->getId().'">'.htmlspecialchars($doc->getName()).'</a>');
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getExpires()), $doc->getId(), '<a href="'.getBaseUrl().'/out/out.ViewDocument.php?documentid='.$doc->getId().'">'.htmlspecialchars($doc->getName()).'</a>');
}
$bodyhtml .= "</table>".PHP_EOL;
if(empty($taskparams['dryrun'])) {
@ -71,7 +71,7 @@ class SeedDMS_ExpiredDocumentsTask extends SeedDMS_SchedulerTaskBase { /* {{{ */
$body .= "---------------------------------------------------------------------------------\n";
foreach($docs as $doc) {
$body .= sprintf($tableformat."\n", getReadableDate($doc->getExpires()), $doc->getId(), $doc->getName());
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getExpires()), $doc->getId(), $doc->getName());
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getExpires()), $doc->getId(), '<a href="'.getBaseUrl().'/out/out.ViewDocument.php?documentid='.$doc->getId().'">'.htmlspecialchars($doc->getName()).'</a>');
}
$bodyhtml .= "</table>".PHP_EOL;
if(empty($taskparams['dryrun'])) {
@ -804,7 +804,7 @@ class SeedDMS_RecentChangesTask extends SeedDMS_SchedulerTaskBase { /* {{{ */
$body .= "---------------------------------------------------------------------------------\n";
foreach($ds as $doc) {
$body .= sprintf($tableformat."\n", getReadableDate($doc->getDate()), $doc->getId(), $doc->getName());
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getDate()), $doc->getId(), '<a href="'.getBaseUrl().'/out/out.ViewDocument.php? documentid='.$doc->getId().'">'.htmlspecialchars($doc->getName()).'</a>');
$bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($doc->getDate()), $doc->getId(), '<a href="'.getBaseUrl().'/out/out.ViewDocument.php?documentid='.$doc->getId().'">'.htmlspecialchars($doc->getName()).'</a>');
}
$bodyhtml .= "</table>".PHP_EOL;
$body .= PHP_EOL;