mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 13:31:24 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
014fd1ebd8
|
|
@ -385,6 +385,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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,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;
|
||||
|
||||
|
|
@ -210,7 +210,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;
|
||||
|
||||
|
|
@ -245,7 +245,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;
|
||||
|
||||
|
|
@ -287,7 +287,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;
|
||||
|
||||
|
|
@ -331,7 +331,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);
|
||||
|
|
@ -363,7 +363,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);
|
||||
|
|
@ -404,7 +404,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);
|
||||
|
|
@ -434,7 +434,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);
|
||||
|
|
@ -474,7 +474,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);
|
||||
|
|
@ -506,7 +506,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);
|
||||
|
|
@ -531,7 +531,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
|
||||
|
|
@ -565,7 +565,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);
|
||||
|
|
@ -601,7 +601,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);
|
||||
|
|
@ -623,7 +623,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
|
||||
|
|
@ -658,7 +658,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;
|
||||
|
||||
|
|
@ -682,7 +682,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;
|
||||
|
||||
|
|
@ -715,7 +715,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;
|
||||
|
||||
|
|
@ -740,7 +740,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;
|
||||
|
||||
|
|
@ -771,7 +771,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;
|
||||
|
||||
|
|
@ -795,7 +795,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;
|
||||
|
||||
|
|
@ -821,7 +821,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;
|
||||
|
||||
|
|
@ -850,7 +850,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);
|
||||
|
|
@ -881,7 +881,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;
|
||||
|
||||
|
|
@ -909,7 +909,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;
|
||||
|
||||
|
|
@ -937,7 +937,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);
|
||||
|
|
@ -972,7 +972,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);
|
||||
|
|
@ -1007,7 +1007,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);
|
||||
|
|
@ -1035,7 +1035,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);
|
||||
|
|
@ -1066,7 +1066,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);
|
||||
|
|
@ -1100,7 +1100,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;
|
||||
|
||||
|
|
@ -1123,7 +1123,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;
|
||||
|
||||
|
|
@ -1142,7 +1142,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;
|
||||
|
||||
|
|
@ -1160,7 +1160,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;
|
||||
|
||||
|
|
@ -1184,7 +1184,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);
|
||||
|
|
@ -1223,7 +1223,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)
|
||||
|
|
@ -1333,7 +1333,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);
|
||||
|
|
@ -1359,7 +1359,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);
|
||||
|
|
@ -1440,7 +1440,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;
|
||||
|
||||
|
|
@ -1475,7 +1475,7 @@ class SeedDMS_NotificationService {
|
|||
elseif($reviewer->isType('group'))
|
||||
$params['reviewer'] = $reviewer->getName();
|
||||
$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;
|
||||
|
||||
|
|
@ -1585,7 +1585,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);
|
||||
|
|
@ -1615,7 +1615,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);
|
||||
|
|
@ -1640,7 +1640,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);
|
||||
|
|
@ -1661,7 +1661,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);
|
||||
|
|
@ -1691,7 +1691,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);
|
||||
|
|
@ -1733,7 +1733,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();
|
||||
|
|
@ -1776,7 +1776,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) {
|
||||
|
|
|
|||
|
|
@ -393,6 +393,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
|
||||
|
|
@ -627,6 +631,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"]);
|
||||
|
||||
|
|
@ -1078,6 +1086,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -956,6 +956,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -310,7 +310,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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ if ($action == "saveSettings")
|
|||
setBoolValue('convertToPdf');
|
||||
setIntValue('maxItemsPerPage');
|
||||
setIntValue('incItemsPerPage');
|
||||
setIntValue('maxItemsInDropFolderMenu');
|
||||
setIntValue('maxItemsInDropFolderList');
|
||||
setBoolValue('markdownComments');
|
||||
setBoolValue('actiondropdown');
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -343,7 +343,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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $('.folderselect').click(function(ev) {
|
|||
<?php
|
||||
} /* }}} */
|
||||
|
||||
private function getFiles($path, $recursive=false) {
|
||||
private function getFiles($path, $recursive=false, $maxfiles=20) {
|
||||
if($recursive)
|
||||
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
|
||||
else
|
||||
|
|
@ -55,16 +55,19 @@ $('.folderselect').click(function(ev) {
|
|||
|
||||
$files = array();
|
||||
foreach ($rii as $file) {
|
||||
if (!$file->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'] .= "<div class=\"dropfolder-menu-img\" style=\"display: none; overflow:hidden; position: absolute; left:-".($previewwidth+10)."px; border: 1px solid #888;background: white;\"><img filename=\"".htmlspecialchars($entry)."\" width=\"".$previewwidth."\" src=\"".$settings->_httpRoot."op/op.DropFolderPreview.php?filename=".urlencode($path.DIRECTORY_SEPARATOR.$entry)."&width=".$previewwidth."\" title=\"".htmlspecialchars($mimetype)."\"></div>";
|
||||
}
|
||||
}
|
||||
$subitem['label'] .= "<div class=\"dropfolder-menu-text\" style=\"margin-left:10px; margin-right: 10px; display:inline-block;\">".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."<br /><span style=\"font-size: 85%;\">".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))."</span></div>";
|
||||
$subitem['label'] .= "<div class=\"dropfolder-menu-text\" style=\"margin-left:10px; margin-right: 10px; display:inline-block;\">".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."<br /><span style=\"font-size: 85%;\">".SeedDMS_Core_File::format_filesize($file[2]).", ".getLongReadableDate($file[3])."</span></div>";
|
||||
$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 "<table class=\"table table-condensed\">\n";
|
||||
echo "<table class=\"table table-condensed table-sm\">\n";
|
||||
echo "<thead>\n";
|
||||
echo "<tr><th></th><th>".getMLText('name')."</th><th align=\"right\">".getMLText('filesize')."</th><th>".getMLText('date')."</th></tr>\n";
|
||||
echo "<tr>";
|
||||
if($previewwidth) {
|
||||
echo "<th></th>";
|
||||
}
|
||||
echo "<th>".getMLText('name')."</th><th align=\"right\">".getMLText('filesize')."</th><th>".getMLText('date')."</th></tr>\n";
|
||||
echo "</thead>\n";
|
||||
echo "<tbody>\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 "<tr>";
|
||||
echo '<td><img draggable="false" src="/views/bootstrap4/images/folder.svg" width="24" height="24" border="0"></td>';
|
||||
if($previewwidth) {
|
||||
echo '<td><img draggable="false" src="/views/bootstrap4/images/folder.svg" width="24" height="24" border="0"></td>';
|
||||
}
|
||||
echo "<td><span style=\"cursor: pointer;\" class=\"folderselect\" data-foldername=\"".$entry."\" data-form=\"".$form."\">".$entry."</span></td><td align=\"right\"></td><td></td>";
|
||||
echo "</tr>\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 "<tr>";
|
||||
if($previewwidth) {
|
||||
$previewer->createRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR, $mimetype);
|
||||
echo "<tr><td style=\"min-width: ".$previewwidth."px;\">";
|
||||
if($previewer->hasRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR)) {
|
||||
echo "<img style=\"cursor: pointer;\" class=\"fileselect mimeicon\" data-filename=\"".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."\" data-form=\"".$form."\" width=\"".$previewwidth."\" src=\"../op/op.DropFolderPreview.php?filename=".urlencode($path.DIRECTORY_SEPARATOR.$entry)."&width=".$previewwidth."\" title=\"".htmlspecialchars($mimetype)."\">";
|
||||
}
|
||||
echo "</td><td><span style=\"cursor: pointer;\" class=\"fileselect\" data-filename=\"".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."\" data-form=\"".$form."\">".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."</span></td><td align=\"right\">".SeedDMS_Core_File::format_filesize(filesize($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry))."</td><td>".date('Y-m-d H:i:s', filectime($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry))."</td></tr>\n";
|
||||
$previewer->createRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR, $mimetype);
|
||||
echo "<td style=\"min-width: ".$previewwidth."px;\">";
|
||||
if($previewer->hasRawPreview($dir.DIRECTORY_SEPARATOR.$path.DIRECTORY_SEPARATOR.$entry, 'dropfolder'.DIRECTORY_SEPARATOR)) {
|
||||
echo "<img style=\"cursor: pointer;\" class=\"fileselect mimeicon\" data-filename=\"".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."\" data-form=\"".$form."\" width=\"".$previewwidth."\" src=\"../op/op.DropFolderPreview.php?filename=".urlencode($path.DIRECTORY_SEPARATOR.$entry)."&width=".$previewwidth."\" title=\"".htmlspecialchars($mimetype)."\">";
|
||||
echo "</td>";
|
||||
}
|
||||
}
|
||||
echo "<td><span style=\"cursor: pointer;\" class=\"fileselect\" data-filename=\"".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."\" data-form=\"".$form."\">".htmlspecialchars($path.DIRECTORY_SEPARATOR.$entry)."</span></td>";
|
||||
echo "<td align=\"right\">".SeedDMS_Core_File::format_filesize($file[2])."</td>";
|
||||
echo "<td>".getLongReadableDate($file[3])."</td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
echo "</tbody>\n";
|
||||
|
|
|
|||
|
|
@ -654,6 +654,8 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
<?php $this->showConfigCheckbox('settings_convertToPdf', 'convertToPdf'); ?>
|
||||
<?php $this->showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?>
|
||||
<?php $this->showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?>
|
||||
<?php $this->showConfigText('settings_maxItemsInDropFolderMenu', 'maxItemsInDropFolderMenu'); ?>
|
||||
<?php $this->showConfigText('settings_maxItemsInDropFolderList', 'maxItemsInDropFolderList'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_markdownComments', 'markdownComments'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_actiondropdown', 'actiondropdown'); ?>
|
||||
|
||||
|
|
@ -742,7 +744,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
-->
|
||||
<?php $this->showConfigHeadline('settings_Server'); ?>
|
||||
<?php $this->showConfigText('settings_rootDir', 'rootDir'); ?>
|
||||
<?php $this->showConfigText('settings_baseUrl', 'baseUrl', '', getBaseUrl()); ?>
|
||||
<?php $this->showConfigText('settings_baseUrl', 'baseUrl', '', $settings->getBaseUrl()); ?>
|
||||
<?php $this->showConfigText('settings_httpRoot', 'httpRoot'); ?>
|
||||
<?php $this->showConfigText('settings_contentDir', 'contentDir'); ?>
|
||||
<?php $this->showConfigText('settings_backupDir', 'backupDir'); ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user