mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
first check if document is accessible before calling hook documentListRow()
This commit is contained in:
parent
24624f6136
commit
600cd490a4
|
@ -87,15 +87,14 @@ $(document).ready( function() {
|
|||
$document = $dms->getDocument($res["id"]);
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
|
||||
if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) {
|
||||
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else
|
||||
echo $this->documentListRow($document, $previewer, false, $res['version']);
|
||||
} else {
|
||||
$noaccess++;
|
||||
}
|
||||
} else {
|
||||
$noaccess++;
|
||||
}
|
||||
}
|
||||
$this->printListFooter();
|
||||
|
|
Loading…
Reference in New Issue
Block a user