Commit a01303c28a9eb07e27566eb000ec410234a509d9

Authored by michael
1 parent e888627e

(#2819) fixed check in button when document is checked out by someone else


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2454 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
@@ -360,10 +360,9 @@ function displayCheckInOutButton($oDocument, $bEdit) { @@ -360,10 +360,9 @@ function displayCheckInOutButton($oDocument, $bEdit) {
360 $sQueryString = "fDocumentID=" . $oDocument->getID(); 360 $sQueryString = "fDocumentID=" . $oDocument->getID();
361 // display the check in button if the document is checked out and you checked the document out 361 // display the check in button if the document is checked out and you checked the document out
362 if ($oDocument->getIsCheckedOut()) { 362 if ($oDocument->getIsCheckedOut()) {
363 - if ($oDocument->getCheckedOutUserID() == $_SESSION["userID"]) {  
364 - $sAction = "checkInDocument";  
365 - $sImageName = "checkin";  
366 - } else { 363 + $sAction = "checkInDocument";
  364 + $sImageName = "checkin";
  365 + if ($oDocument->getCheckedOutUserID() <> $_SESSION["userID"]) {
367 $oUser = User::get($oDocument->getCheckedOutUserID()); 366 $oUser = User::get($oDocument->getCheckedOutUserID());
368 $sDisabledText = "The document can only be checked back in by " . $oUser->getName(); 367 $sDisabledText = "The document can only be checked back in by " . $oUser->getName();
369 } 368 }