From a7b845c64fc641a38d495a7424b9c72df63ed860 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Apr 2026 08:08:17 +0200 Subject: [PATCH 1/5] not longer use global function getBaseUrl() --- inc/inc.ClassEmailUtils.php | 2 +- inc/inc.ClassNotificationService.php | 92 ++++++++++++++-------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/inc/inc.ClassEmailUtils.php b/inc/inc.ClassEmailUtils.php index 28d32cc9c..c9498a9f8 100644 --- a/inc/inc.ClassEmailUtils.php +++ b/inc/inc.ClassEmailUtils.php @@ -42,7 +42,7 @@ class SeedDMS_EmailUtils { return(str_replace( array('###SITENAME###', '###HTTP_ROOT###', '###URL_PREFIX###'), - array($settings->_siteName, $settings->_httpRoot, getBaseUrl().$settings->_httpRoot), + array($settings->_siteName, $settings->_httpRoot, $settings->getBaseUrl().$settings->_httpRoot), $text)); } /* }}} */ diff --git a/inc/inc.ClassNotificationService.php b/inc/inc.ClassNotificationService.php index c9454e10a..00d128dbb 100644 --- a/inc/inc.ClassNotificationService.php +++ b/inc/inc.ClassNotificationService.php @@ -186,7 +186,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $document->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -208,7 +208,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $document->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -243,7 +243,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $document->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -285,7 +285,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $document->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -329,7 +329,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['comment'] = $document->getComment(); $params['version_comment'] = $lc->getComment(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -361,7 +361,7 @@ class SeedDMS_NotificationService { $params['comment'] = $document->getComment(); $params['version'] = $lc->getVersion(); $params['version_comment'] = $lc->getComment(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -402,7 +402,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { $this->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -432,7 +432,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { $this->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -472,7 +472,7 @@ class SeedDMS_NotificationService { $params['folder_path'] = $parent->getFolderPathPlain(); $params['username'] = $user->getFullName(); $params['comment'] = $folder->getComment(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -504,7 +504,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$parent->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$parent->getID(); $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { $this->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -529,7 +529,7 @@ class SeedDMS_NotificationService { $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); $params['comment'] = $file->getComment(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; // if user is not owner and owner not already in list of notifiers, then @@ -563,7 +563,7 @@ class SeedDMS_NotificationService { $params['comment'] = $document->getComment(); $params['version'] = $content->getVersion(); $params['version_comment'] = $content->getComment(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -599,7 +599,7 @@ class SeedDMS_NotificationService { $params['document'] = $document->getName(); $params['document_id'] = $document->getId(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -621,7 +621,7 @@ class SeedDMS_NotificationService { $params['document_id'] = $document->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; // if user is not owner and owner not already in list of notifiers, then @@ -656,7 +656,7 @@ class SeedDMS_NotificationService { $params['attribute_new_value'] = isset($newattributes[$attrdefid]) ? $newattributes[$attrdefid]->getValue() : ''; $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -680,7 +680,7 @@ class SeedDMS_NotificationService { $params['attribute_value'] = $attribute->getValueAsString(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -713,7 +713,7 @@ class SeedDMS_NotificationService { $params['attribute_new_value'] = isset($newattributes[$attrdefid]) ? $newattributes[$attrdefid]->getValue() : ''; $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -738,7 +738,7 @@ class SeedDMS_NotificationService { $params['attribute_new_value'] = $attribute->getValue(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -769,7 +769,7 @@ class SeedDMS_NotificationService { $params['attribute_new_value'] = isset($newattributes[$attrdefid]) ? $newattributes[$attrdefid]->getValueAsString() : ''; $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -793,7 +793,7 @@ class SeedDMS_NotificationService { $params['attribute_value'] = $attribute->getValueAsString(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -819,7 +819,7 @@ class SeedDMS_NotificationService { $params['old_comment'] = $oldcomment; $params['new_comment'] = $document->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -848,7 +848,7 @@ class SeedDMS_NotificationService { $params['old_comment'] = $oldcomment; $params['new_comment'] = $folder->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -879,7 +879,7 @@ class SeedDMS_NotificationService { $params['old_comment'] = $oldcomment; $params['new_comment'] = $content->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -907,7 +907,7 @@ class SeedDMS_NotificationService { $params['old_name'] = $oldname; $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -935,7 +935,7 @@ class SeedDMS_NotificationService { $params['old_name'] = $oldname; $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -970,7 +970,7 @@ class SeedDMS_NotificationService { $params['old_folder_path'] = $oldfolder->getFolderPathPlain(); $params['new_folder_path'] = $targetfolder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1005,7 +1005,7 @@ class SeedDMS_NotificationService { $params['old_folder_path'] = $oldfolder->getFolderPathPlain(); $params['new_folder_path'] = $targetfolder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1033,7 +1033,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { $this->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1064,7 +1064,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { $this->toGroup($user, $grp, $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1098,7 +1098,7 @@ class SeedDMS_NotificationService { $params['document_id'] = $document->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1121,7 +1121,7 @@ class SeedDMS_NotificationService { $params['folder_id'] = $folder->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1140,7 +1140,7 @@ class SeedDMS_NotificationService { $params['document_id'] = $document->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1158,7 +1158,7 @@ class SeedDMS_NotificationService { $params['folder_id'] = $folder->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1182,7 +1182,7 @@ class SeedDMS_NotificationService { $params['status'] = getReviewStatusText($reviewlog["status"]); $params['comment'] = $reviewlog['comment']; $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1221,7 +1221,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=revapp"; $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) @@ -1257,7 +1257,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); if($approver->isType('user')) $this->toIndividual($user, $approver, $subject, $message, $params, SeedDMS_NotificationService::RECV_APPROVER); @@ -1279,7 +1279,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); if($reviewer->isType('user')) $this->toIndividual($user, $reviewer, $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER); @@ -1308,7 +1308,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $content->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1339,7 +1339,7 @@ class SeedDMS_NotificationService { $params['version'] = $content->getVersion(); $params['comment'] = $content->getComment(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; @@ -1362,7 +1362,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['old_owner'] = $oldowner->getFullName(); $params['new_owner'] = $document->getOwner()->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1392,7 +1392,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['old_owner'] = $oldowner->getFullName(); $params['new_owner'] = $folder->getOwner()->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1417,7 +1417,7 @@ class SeedDMS_NotificationService { $params['document_id'] = $document->getId(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1438,7 +1438,7 @@ class SeedDMS_NotificationService { else $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewFolder.php?folderid=".$folder->getID(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; $this->toList($user, $notifyList["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1468,7 +1468,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); // Send notification to subscribers. $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); @@ -1510,7 +1510,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $usersinformed = array(); $groupsinformed = array(); @@ -1553,7 +1553,7 @@ class SeedDMS_NotificationService { $params['username'] = $user->getFullName(); $params['sitename'] = $this->settings->_siteName; $params['http_root'] = $this->settings->_httpRoot; - $params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=workflow"; + $params['url'] = $this->settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID()."¤ttab=workflow"; // Send notification to subscribers. $this->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { From 5f281a1e99ce3f9525d2cbef6b836dee007d9ac9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Apr 2026 08:10:16 +0200 Subject: [PATCH 2/5] number of files listed in drop folder can be configured --- inc/inc.ClassSettings.php | 10 ++++ op/op.Settings.php | 2 + out/out.DropFolderChooser.php | 2 + views/bootstrap/class.DropFolderChooser.php | 59 ++++++++++++++------- views/bootstrap/class.Settings.php | 4 +- 5 files changed, 57 insertions(+), 20 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 53de7d8e7..a5b688b31 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -347,6 +347,10 @@ class Settings { /* {{{ */ var $_maxItemsPerPage = 0; // number of documents/folders fetched when scrolling to bottom of ViewFolder page var $_incItemsPerPage = 0; + // maximum number of documents/folders in drop folder menu + var $_maxItemsInDropFolderMenu = 10; + // maximum number of documents/folders in drop folder list + var $_maxItemsInDropFolderList = 30; // parse comments of folders and documents as markdown var $_markdownComments = false; // show dropdown menu for actions on folders/documents @@ -569,6 +573,10 @@ class Settings { /* {{{ */ $this->_maxItemsPerPage = intval($tab["maxItemsPerPage"]); if(isset($tab["incItemsPerPage"])) $this->_incItemsPerPage = intval($tab["incItemsPerPage"]); + if(isset($tab["maxItemsInDropFolderMenu"])) + $this->_maxItemsInDropFolderMenu = intval($tab["maxItemsInDropFolderMenu"]); + if(isset($tab["maxItemsInDropFolderList"])) + $this->_maxItemsInDropFolderList = intval($tab["maxItemsInDropFolderList"]); $this->_markdownComments = Settings::boolVal($tab["markdownComments"]); $this->_actiondropdown = Settings::boolVal($tab["actiondropdown"]); @@ -995,6 +1003,8 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "convertToPdf", $this->_convertToPdf); $this->setXMLAttributValue($node, "maxItemsPerPage", $this->_maxItemsPerPage); $this->setXMLAttributValue($node, "incItemsPerPage", $this->_incItemsPerPage); + $this->setXMLAttributValue($node, "maxItemsInDropFolderMenu", $this->_maxItemsInDropFolderMenu); + $this->setXMLAttributValue($node, "maxItemsInDropFolderList", $this->_maxItemsInDropFolderList); $this->setXMLAttributValue($node, "markdownComments", $this->_markdownComments); $this->setXMLAttributValue($node, "actiondropdown", $this->_actiondropdown); diff --git a/op/op.Settings.php b/op/op.Settings.php index cd68e4e99..4d4e4e5d9 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -109,6 +109,8 @@ if ($action == "saveSettings") setBoolValue('convertToPdf'); setIntValue('maxItemsPerPage'); setIntValue('incItemsPerPage'); + setIntValue('maxItemsInDropFolderMenu'); + setIntValue('maxItemsInDropFolderList'); setBoolValue('markdownComments'); setBoolValue('actiondropdown'); diff --git a/out/out.DropFolderChooser.php b/out/out.DropFolderChooser.php index f153830f1..f564e050f 100644 --- a/out/out.DropFolderChooser.php +++ b/out/out.DropFolderChooser.php @@ -66,6 +66,8 @@ if($view) { $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('previewWidthMenuList', $settings->_previewWidthMenuList); $view->setParam('previewWidthList', $settings->_previewWidthDropFolderList); + $view->setParam('maxItemsInDropFolderMenu', $settings->_maxItemsInDropFolderMenu); + $view->setParam('maxItemsInDropFolderList', $settings->_maxItemsInDropFolderList); $view->setParam('convertToPdf', $settings->_convertToPdf); $view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array()); $view->setParam('timeout', $settings->_cmdTimeout); diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php index 84f279ee7..46fa6bcc2 100644 --- a/views/bootstrap/class.DropFolderChooser.php +++ b/views/bootstrap/class.DropFolderChooser.php @@ -47,7 +47,7 @@ $('.folderselect').click(function(ev) { isDir()) - $files[] = [substr($file->getPath(), strlen($path)+1), $file->getFilename()]; - if(count($files) > 20) + if (!$file->isDir()) { + $filesize = filesize($file->getPath().DIRECTORY_SEPARATOR.$file->getFilename()); + $filedate = filectime($file->getPath().DIRECTORY_SEPARATOR.$file->getFilename()); + $files[] = [substr($file->getPath(), strlen($path)+1), $file->getFilename(), $filesize, $filedate]; + } + if(count($files) > ($maxfiles-1)) return $files; } return $files; } - private function getFolders($path, $recursive=false) { + private function getFolders($path, $recursive=false, $maxfiles=20) { if($recursive) $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); else @@ -76,7 +79,7 @@ $('.folderselect').click(function(ev) { if(($t = substr($file->getPath(), strlen($path)+1)) && ($file->getFilename() == '.')) $files[] = $t; } - if(count($files) > 20) + if(count($files) > ($maxfiles-1)) return $files; } @@ -93,6 +96,7 @@ $('.folderselect').click(function(ev) { $cachedir = $this->params['cachedir']; $conversionmgr = $this->params['conversionmgr']; $previewwidth = $this->params['previewWidthMenuList']; + $maxItemsInDropFolderMenu = $this->params['maxItemsInDropFolderMenu']; $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $xsendfile = $this->params['xsendfile']; @@ -113,8 +117,10 @@ $('.folderselect').click(function(ev) { */ if(dirname($dir) == $dropfolderdir) { if(is_dir($dir)) { - $files = $this->getFiles($dir, $recursive); - + $files = $this->getFiles($dir, $recursive, $maxItemsInDropFolderMenu); + usort($files, function($a, $b) { + return $a[3] < $b[3]; + }); $finfo = finfo_open(FILEINFO_MIME_TYPE); foreach($files as $file) { $entry = $file[1]; @@ -130,7 +136,7 @@ $('.folderselect').click(function(ev) { $subitem['label'] .= "
_httpRoot."op/op.DropFolderPreview.php?filename=".urlencode($path.DIRECTORY_SEPARATOR.$entry)."&width=".$previewwidth."\" title=\"".htmlspecialchars($mimetype)."\">
"; } } - $subitem['label'] .= "
".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."
".SeedDMS_Core_File::format_filesize(filesize($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry)).", ".date('Y-m-d H:i:s', filectime($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry))."
"; + $subitem['label'] .= "
".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."
".SeedDMS_Core_File::format_filesize($file[2]).", ".getLongReadableDate($file[3])."
"; $menuitems['dropfolder']['children'][] = $subitem; } } @@ -150,6 +156,7 @@ $('.folderselect').click(function(ev) { $cachedir = $this->params['cachedir']; $conversionmgr = $this->params['conversionmgr']; $previewwidth = $this->params['previewWidthList']; + $maxItemsInDropFolderList = $this->params['maxItemsInDropFolderList']; $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $xsendfile = $this->params['xsendfile']; @@ -168,9 +175,13 @@ $('.folderselect').click(function(ev) { */ if(dirname($dir) == $dropfolderdir) { if(is_dir($dir)) { - echo "\n"; + echo "
\n"; echo "\n"; - echo "\n"; + echo ""; + if($previewwidth) { + echo ""; + } + echo "\n"; echo "\n"; echo "\n"; $finfo = finfo_open(FILEINFO_MIME_TYPE); @@ -178,24 +189,34 @@ $('.folderselect').click(function(ev) { $folders = $this->getFolders($dir, $recursive); foreach($folders as $entry) { echo ""; - echo ''; + if($previewwidth) { + echo ''; + } echo ""; echo "\n"; } } else { - $files = $this->getFiles($dir, $recursive); + $files = $this->getFiles($dir, $recursive, $maxItemsInDropFolderList); + usort($files, function($a, $b) { + return $a[3] < $b[3]; + }); foreach($files as $file) { $entry = $file[1]; $path = $file[0]; $mimetype = finfo_file($finfo, $dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry); + echo ""; if($previewwidth) { - $previewer->createRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR, $mimetype); - echo "\n"; + $previewer->createRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR, $mimetype); + echo ""; + } } + echo ""; + echo ""; + echo ""; + echo "\n"; } } echo "\n"; diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index b7bd39f7a..a05489e03 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -652,6 +652,8 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); showConfigCheckbox('settings_convertToPdf', 'convertToPdf'); ?> showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?> showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?> +showConfigText('settings_maxItemsInDropFolderMenu', 'maxItemsInDropFolderMenu'); ?> +showConfigText('settings_maxItemsInDropFolderList', 'maxItemsInDropFolderList'); ?> showConfigCheckbox('settings_markdownComments', 'markdownComments'); ?> showConfigCheckbox('settings_actiondropdown', 'actiondropdown'); ?> @@ -737,7 +739,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) --> showConfigHeadline('settings_Server'); ?> showConfigText('settings_rootDir', 'rootDir'); ?> -showConfigText('settings_baseUrl', 'baseUrl', '', getBaseUrl()); ?> +showConfigText('settings_baseUrl', 'baseUrl', '', $settings->getBaseUrl()); ?> showConfigText('settings_httpRoot', 'httpRoot'); ?> showConfigText('settings_contentDir', 'contentDir'); ?> showConfigText('settings_backupDir', 'backupDir'); ?> From 0b3219b0ec750f44f44e818929829c0b70b15ef5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Apr 2026 08:11:07 +0200 Subject: [PATCH 3/5] trigger error if global function getBaseUrl() is called --- inc/inc.Utils.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index ec8c69cb1..3d7134af1 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -944,6 +944,7 @@ function sendFile($filename) { /* {{{ */ function getBaseUrl() { /* {{{ */ global $settings; + trigger_error("getBaseUrl() is deprecated. Use \$settings->getBaseUrl() instead.", E_USER_DEPRECATED); if(!empty($settings->_baseUrl)) return $settings->_baseUrl; From 7500a698d3eb5e32362e771b354963379f063951 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Apr 2026 08:11:41 +0200 Subject: [PATCH 4/5] do not use global function getBaseUrl() anymore --- op/op.AddFile2.php | 2 +- op/op.AddMultiDocument.php | 2 +- op/op.Ajax.php | 2 +- op/op.PasswordForgotten.php | 4 ++-- op/op.RemoveVersion.php | 2 +- op/op.RemoveWorkflowFromDocument.php | 2 +- op/op.ReturnFromSubWorkflow.php | 2 +- op/op.RunSubWorkflow.php | 2 +- op/op.UpdateDocument2.php | 4 ++-- op/op.UsrMgr.php | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/op/op.AddFile2.php b/op/op.AddFile2.php index 237fb9e7e..afac255c7 100644 --- a/op/op.AddFile2.php +++ b/op/op.AddFile2.php @@ -109,7 +109,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) { $params['document'] = $document->getName(); $params['username'] = $user->getFullName(); $params['comment'] = $comment; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $notifyList["users"], $subject, $message, $params); diff --git a/op/op.AddMultiDocument.php b/op/op.AddMultiDocument.php index b493d5b3f..928622ea8 100644 --- a/op/op.AddMultiDocument.php +++ b/op/op.AddMultiDocument.php @@ -243,7 +243,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) { $params['username'] = $user->getFullName(); $params['comment'] = $comment; $params['version_comment'] = $version_comment; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $notifyList["users"], $subject, $message, $params); diff --git a/op/op.Ajax.php b/op/op.Ajax.php index c8fcfa8fd..fc3919885 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -303,7 +303,7 @@ switch($command) { $emailobj = new SeedDMS_EmailNotify($dms, $translator, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword, $settings->_smtpLazySSL, $settings->_smtpForceFrom); $emailobj->setDebug(true); $params = array(); - $params['url'] = getBaseUrl().$settings->_httpRoot; + $params['url'] = $settings->getBaseUrlWithRoot(); $params['sitename'] = $settings->_siteName; $params['version'] = (new SeedDMS_Version())->version(); $params['smtpserver'] = $settings->_smtpServer; diff --git a/op/op.PasswordForgotten.php b/op/op.PasswordForgotten.php index a4c111f76..b4a97581c 100644 --- a/op/op.PasswordForgotten.php +++ b/op/op.PasswordForgotten.php @@ -52,8 +52,8 @@ if($user) { $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $params['hash'] = $hash; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ChangePassword.php?hash=".$hash; - $params['url_prefix'] = getBaseUrl().$settings->_httpRoot; + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ChangePassword.php?hash=".$hash; + $params['url_prefix'] = $settings->getBaseUrlWithRoot(); $emailobj->toIndividual($settings->_smtpSendFrom, $user, $subject, $message, $params); add_log_line("Request for '".$login."' send to '".$email."'", PEAR_LOG_INFO); } diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php index 146b41f2a..ef3932a20 100644 --- a/op/op.RemoveVersion.php +++ b/op/op.RemoveVersion.php @@ -185,7 +185,7 @@ else { $params['username'] = $user->getFullName(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); if($user->getId() != $oldowner->getId()) $notifier->toIndividual($user, $oldowner, $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); $notifier->toList($user, $userrecipientsR, $subject, $message, $params, SeedDMS_NotificationService::RECV_REVIEWER); diff --git a/op/op.RemoveWorkflowFromDocument.php b/op/op.RemoveWorkflowFromDocument.php index 1dd21fb7e..de401ac98 100644 --- a/op/op.RemoveWorkflowFromDocument.php +++ b/op/op.RemoveWorkflowFromDocument.php @@ -85,7 +85,7 @@ if($version->removeWorkflow($user)) { $params['username'] = $user->getFullName(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); // Send notification to subscribers. $notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { diff --git a/op/op.ReturnFromSubWorkflow.php b/op/op.ReturnFromSubWorkflow.php index e76da43bf..a826e81e6 100644 --- a/op/op.ReturnFromSubWorkflow.php +++ b/op/op.ReturnFromSubWorkflow.php @@ -88,7 +88,7 @@ if($version->returnFromSubWorkflow($user, $transition, $_POST["comment"])) { $params['username'] = $user->getFullName(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); // Send notification to subscribers. $notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { diff --git a/op/op.RunSubWorkflow.php b/op/op.RunSubWorkflow.php index 092e03710..3cbced374 100644 --- a/op/op.RunSubWorkflow.php +++ b/op/op.RunSubWorkflow.php @@ -83,7 +83,7 @@ if($version->runSubWorkflow($subworkflow)) { $params['username'] = $user->getFullName(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); // Send notification to subscribers. $notifier->toList($user, $nl["users"], $subject, $message, $params, SeedDMS_NotificationService::RECV_NOTIFICATION); foreach ($nl["groups"] as $grp) { diff --git a/op/op.UpdateDocument2.php b/op/op.UpdateDocument2.php index 64c7fbe5c..78034d542 100644 --- a/op/op.UpdateDocument2.php +++ b/op/op.UpdateDocument2.php @@ -183,7 +183,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) { $params['username'] = $user->getFullName(); $params['comment'] = $document->getComment(); $params['version_comment'] = $contentResult->getContent()->getComment(); - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $notifyList["users"], $subject, $message, $params); @@ -208,7 +208,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) { $params['name'] = $document->getName(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $notifyList["users"], $subject, $message, $params); diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php index 2710b7164..c3f5b4786 100644 --- a/op/op.UsrMgr.php +++ b/op/op.UsrMgr.php @@ -331,7 +331,7 @@ else if ($action == "sendlogindata" && $settings->_enableEmail) { $params['username'] = $newuser->getFullName(); $params['login'] = $newuser->getLogin(); $params['comment'] = $comment; - $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php"; + $params['url'] = $settings->getBaseUrlWithRoot()."out/out.ViewFolder.php"; $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toIndividual($user, $newuser, $subject, $message, $params, SeedDMS_NotificationService::RECV_OWNER); From 03fe383afe3af2c8f0e1e56f4f4c696b9ab1bafc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Apr 2026 08:11:59 +0200 Subject: [PATCH 5/5] add changes for 5.1.47 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a9a6ca483..c75e831c9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ - remove null bytes from login - remove null bytes from password when authenticating by ldap - check for valid referer uri when logging in +- max. number of files in drop folder list can be configured +- files in drop folder list are sorted by date (descending) -------------------------------------------------------------------------------- Changes in version 5.1.46
".getMLText('name')."".getMLText('filesize')."".getMLText('date')."
".getMLText('name')."".getMLText('filesize')."".getMLText('date')."
".$entry."
"; - if($previewer->hasRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR)) { - echo ""; - } - echo "".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."".SeedDMS_Core_File::format_filesize(filesize($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry))."".date('Y-m-d H:i:s', filectime($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry))."
"; + if($previewer->hasRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR)) { + echo ""; + echo "".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."".SeedDMS_Core_File::format_filesize($file[2])."".getLongReadableDate($file[3])."