Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2015-11-11 06:27:58 +01:00
commit ac09780cad
6 changed files with 127 additions and 24 deletions

View File

@ -6,6 +6,8 @@
will output some document information will output some document information
- new attribute type 'date' - new attribute type 'date'
- all dates are now in format 'yyyy-mm-dd' - all dates are now in format 'yyyy-mm-dd'
- fix fatal error when requesting new password
- send emails to reviewers/approvers if new document or version was uploaded
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.21 Changes in version 4.3.21

View File

@ -231,7 +231,15 @@ full text search engine support, you will also need to unpack
but not accessible through the web. but not accessible through the web.
For security reason the data folder should not be inside the public folders For security reason the data folder should not be inside the public folders
or should be protected by a .htaccess file. or should be protected by a .htaccess file. The folder containing the
configuration (settings.xml) must be protected by an .htaccess file like the
following.
> <Files ~ "^settings\.xml">
> Order allow,deny
> Deny from all
> </Files>
If you install SeedDMS for the first time continue with the database setup. If you install SeedDMS for the first time continue with the database setup.

View File

@ -891,5 +891,23 @@ clean workflow log when a document version was deleted
by a group or user right by a group or user right
</notes> </notes>
</release> </release>
<release>
<date>2015-09-28</date>
<time>07:53:19</time>
<version>
<release>4.3.21</release>
<api>4.3.21</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- add method SeedDMS_Core_Database::getCurrentTimestamp()
- add method SeedDMS_Core_Database::getCurrentDatetime()
- user getCurrentTimestamp() and getCurrentDatetime() whenever possible
</notes>
</release>
</changelog> </changelog>
</package> </package>

View File

@ -337,21 +337,6 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
// Send notification to subscribers of folder. // Send notification to subscribers of folder.
if($notifier) { if($notifier) {
$notifyList = $folder->getNotifyList(); $notifyList = $folder->getNotifyList();
if($settings->_enableNotificationAppRev) {
/* Reviewers and approvers will be informed about the new document */
foreach($reviewers['i'] as $reviewerid) {
$notifyList['users'][] = $dms->getUser($reviewerid);
}
foreach($approvers['i'] as $approverid) {
$notifyList['users'][] = $dms->getUser($approverid);
}
foreach($reviewers['g'] as $reviewergrpid) {
$notifyList['groups'][] = $dms->getGroup($reviewergrpid);
}
foreach($approvers['g'] as $approvergrpid) {
$notifyList['groups'][] = $dms->getGroup($approvergrpid);
}
}
$subject = "new_document_email_subject"; $subject = "new_document_email_subject";
$message = "new_document_email_body"; $message = "new_document_email_body";
@ -393,6 +378,51 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
} }
} }
} }
if($settings->_enableNotificationAppRev) {
/* Reviewers and approvers will be informed about the new document */
if($reviewers['i'] || $reviewers['g']) {
$subject = "review_request_email_subject";
$message = "review_request_email_body";
$params = array();
$params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $reqversion;
$params['comment'] = $comment;
$params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
foreach($reviewers['i'] as $reviewerid) {
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params);
}
foreach($reviewers['g'] as $reviewergrpid) {
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params);
}
}
if($approvers['i'] || $approvers['g']) {
$subject = "approval_request_email_subject";
$message = "approval_request_email_body";
$params = array();
$params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $reqversion;
$params['comment'] = $comment;
$params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
foreach($approvers['i'] as $approverid) {
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params);
}
foreach($approvers['g'] as $approvergrpid) {
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params);
}
}
}
} }
} }

View File

@ -127,7 +127,7 @@ foreach ($pIndRev as $p) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -186,7 +186,7 @@ if (count($reviewIndex["i"]) > 0) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -233,7 +233,7 @@ foreach ($pGrpRev as $p) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -289,7 +289,7 @@ if (count($reviewIndex["g"]) > 0) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -341,7 +341,7 @@ foreach ($pIndApp as $p) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -398,7 +398,7 @@ if (count($approvalIndex["i"]) > 0) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -445,7 +445,7 @@ foreach ($pGrpApp as $p) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
@ -502,7 +502,7 @@ if (count($approvalIndex["g"]) > 0) {
$params = array(); $params = array();
$params['name'] = $document->getName(); $params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain(); $params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $content->_version; $params['version'] = $content->getVersion();
$params['comment'] = $content->getComment(); $params['comment'] = $content->getComment();
$params['username'] = $user->getFullName(); $params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();

View File

@ -272,6 +272,51 @@ if ($_FILES['userfile']['error'] == 0) {
} }
} }
} }
if($settings->_enableNotificationAppRev) {
/* Reviewers and approvers will be informed about the new document */
if($reviewers['i'] || $reviewers['g']) {
$subject = "review_request_email_subject";
$message = "review_request_email_body";
$params = array();
$params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $contentResult->getContent()->getVersion();
$params['comment'] = $contentResult->getContent()->getComment();
$params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
foreach($reviewers['i'] as $reviewerid) {
$notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params);
}
foreach($reviewers['g'] as $reviewergrpid) {
$notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params);
}
}
if($approvers['i'] || $approvers['g']) {
$subject = "approval_request_email_subject";
$message = "approval_request_email_body";
$params = array();
$params['name'] = $document->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['version'] = $contentResult->getContent()->getVersion();
$params['comment'] = $contentResult->getContent()->getComment();
$params['username'] = $user->getFullName();
$params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
$params['sitename'] = $settings->_siteName;
$params['http_root'] = $settings->_httpRoot;
foreach($approvers['i'] as $approverid) {
$notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params);
}
foreach($approvers['g'] as $approvergrpid) {
$notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params);
}
}
}
} }
$expires = false; $expires = false;