">
:
_enableAdminReceipt) echo "checked" ?> />
diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php
index d365d952d..8112d8e22 100644
--- a/views/bootstrap/class.ViewDocument.php
+++ b/views/bootstrap/class.ViewDocument.php
@@ -425,11 +425,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
/* Retrieve linked documents */
$links = $document->getDocumentLinks();
- $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links);
+ $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links, 'target');
/* Retrieve reverse linked documents */
$reverselinks = $document->getReverseDocumentLinks();
- $reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks);
+ $reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks, 'source');
/* Retrieve latest content */
$latestContent = $document->getLatestContent();
@@ -777,10 +777,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "";
if($accessop->mayReview($document)) {
- if ($is_reviewer && $r["status"]==0) {
- print "".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("add_review"), false, true)." ";
- }else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){
- print "".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)." ";
+ if ($is_reviewer) {
+ if ($r["status"]==0) {
+ print "".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("add_review"), false, true)." ";
+ } elseif ($accessop->mayUpdateReview($document, $updateUser) && (($r["status"]==1)||($r["status"]==-1))){
+ print "".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)." ";
+ }
}
}
@@ -848,10 +850,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "";
if($accessop->mayApprove($document)) {
- if ($is_approver && $a['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) {
- print "".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("add_approval"), false, true)." ";
- }else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){
- print "".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)." ";
+ if ($is_approver) {
+ if ($a['status'] == 0) {
+ print "".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("add_approval"), false, true)." ";
+ } elseif ($accessop->mayUpdateApproval($document, $updateUser) && (($a["status"]==1)||($a["status"]==-1))){
+ print "".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)." ";
+ }
}
}
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 12e31d282..71a5cc184 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -7,7 +7,7 @@ else
require_once('SeedDMS/Core.php');
/* Set apache_request_headers() in case it doesn't exists, like
- * when using fastcgi (patch by christopher täufert)
+ * when using fastcgi (patch by christopher täufert taken from http://php.net/)
*/
if( !function_exists('apache_request_headers') ) {
function apache_request_headers() {