From e36d4c00947b22316d26dd6c03c970fd48ebfff3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 May 2013 09:27:15 +0200 Subject: [PATCH] fix approving of documents The variable $status was overridden in the the status log if logged in as admin. This causse problems whenever was allow to review/approve documents. All other users where not affected because the don't see the status log --- views/bootstrap/class.ViewDocument.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 31b1e8614..a6f39a375 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -401,11 +401,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($user->isAdmin()) { $this->contentHeading(getMLText("status")); $this->contentContainerStart(); - $status = $latestContent->getStatusLog(); + $statuslog = $latestContent->getStatusLog(); echo ""; echo "\n"; echo ""; - foreach($status as $entry) { + foreach($statuslog as $entry) { if($suser = $dms->getUser($entry['userID'])) $fullname = $suser->getFullName(); else @@ -452,7 +452,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; - + print "\n"; print "\n"; print "\n"; @@ -505,7 +505,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."
  • "; } } - + print "\n"; print "\n\n"; } @@ -561,7 +561,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "\n"; print "\n"; print "\n"; print "\n\n"; @@ -781,10 +781,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $vstat = $version->getStatus(); $workflow = $version->getWorkflow(); $workflowstate = $version->getWorkflowState(); - + // verify if file exists $file_exists=file_exists($dms->contentDir . $version->getPath()); - + print "\n"; print ""; @@ -890,7 +890,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • getID()."\">" . getMLText("view_online") . "
  • "; } else print "
  • getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">"; print ""; - + print "
  • "; - + print ""; - + print ""; } print "\n
    ".getMLText('date')."".getMLText('status')."".getMLText('user')."".getMLText('comment')."
    \n"; $this->contentSubHeading(getMLText("reviewers")); print "
    ".getMLText("name")."".getMLText("last_update")."
    ".htmlspecialchars($a["comment"])."".getApprovalStatusText($a["status"]).""; print "
    "; /* @@ -794,7 +794,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes)) print "
  • getVersion()."\">" . getMLText("view_online") . ""; }else print "
  • getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; - + print ""; */ if ($viewonlinefiletypes && in_array(strtolower($version->getFileType()), $viewonlinefiletypes)) @@ -879,7 +879,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { foreach($files as $file) { $file_exists=file_exists($dms->contentDir . $file->getPath()); - + $responsibleUser = $file->getUser(); print "
    • \n"; print "
    • ".htmlspecialchars($file->getName())."
    • \n"; print "
    • ".htmlspecialchars($file->getOriginalFileName())."
    • \n"; @@ -902,12 +902,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
    • ".getLongReadableDate($file->getDate())."
    • "; print "
    ".htmlspecialchars($file->getComment()).""; if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) print "
    getID()."\" />
    "; print "
    \n";