mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
the checkout info is not related to substituted user
This commit is contained in:
parent
15ee5357a5
commit
55aa6fe170
|
@ -414,17 +414,10 @@ $(document).ready( function() {
|
||||||
if(is_string($txt)) {
|
if(is_string($txt)) {
|
||||||
echo $txt;
|
echo $txt;
|
||||||
} elseif($infos = $document->getCheckOutInfo()) {
|
} elseif($infos = $document->getCheckOutInfo()) {
|
||||||
$session = $this->params['session'];
|
foreach($infos as $i=>$info) {
|
||||||
if($session->getSu()) {
|
|
||||||
$origuser = $dms->getUser($session->getUser());
|
|
||||||
$checkoutpath = sprintf($checkoutdir, preg_replace('/[^A-Za-z0-9_-]/', '', $origuser->getLogin()));
|
|
||||||
} else {
|
|
||||||
$origuser = $user;
|
|
||||||
$checkoutpath = sprintf($checkoutdir, preg_replace('/[^A-Za-z0-9_-]/', '', $user->getLogin()));
|
|
||||||
}
|
|
||||||
foreach($infos as $info) {
|
|
||||||
$checkoutuser = $dms->getUser($info['userID']);
|
$checkoutuser = $dms->getUser($info['userID']);
|
||||||
$checkoutstatus = $document->checkOutStatus();
|
$checkoutpath = sprintf($checkoutdir, preg_replace('/[^A-Za-z0-9_-]/', '', $checkoutuser->getLogin()));
|
||||||
|
$checkoutstatus = $document->checkOutStatus($i);
|
||||||
echo "<div class=\"alert alert-info\">";
|
echo "<div class=\"alert alert-info\">";
|
||||||
echo "<a href=\"file://".$info['filename']."\">".getMLText('copied_to_checkout_as', array('date'=>getLongReadableDate(makeTsFromLongDate($info['date'])), 'filename'=>substr($info['filename'], strlen($checkoutpath)+1), 'username'=>($checkoutuser ? $checkoutuser->getFullName() : '')))."</a>";
|
echo "<a href=\"file://".$info['filename']."\">".getMLText('copied_to_checkout_as', array('date'=>getLongReadableDate(makeTsFromLongDate($info['date'])), 'filename'=>substr($info['filename'], strlen($checkoutpath)+1), 'username'=>($checkoutuser ? $checkoutuser->getFullName() : '')))."</a>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user