mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-18 07:31:36 +00:00
use SeedDMS_Core_Document::isType() to check for documents
This commit is contained in:
parent
c69490daba
commit
48cc8d80e8
|
@ -83,7 +83,7 @@ $(document).ready( function() {
|
||||||
if($extraheader = $this->callHook('extraDownloadHeader'))
|
if($extraheader = $this->callHook('extraDownloadHeader'))
|
||||||
$downmgr->addHeader($extraheader);
|
$downmgr->addHeader($extraheader);
|
||||||
foreach($entries as $entry) {
|
foreach($entries as $entry) {
|
||||||
if(get_class($entry) == $dms->getClassname('document')) {
|
if($entry->isType('document')) {
|
||||||
$extracols = $this->callHook('extraDownloadColumns', $entry);
|
$extracols = $this->callHook('extraDownloadColumns', $entry);
|
||||||
if(isset($_GET['includecontent']) && $_GET['includecontent'] && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) {
|
if(isset($_GET['includecontent']) && $_GET['includecontent'] && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) {
|
||||||
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent);
|
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent);
|
||||||
|
@ -156,10 +156,10 @@ $(document).ready( function() {
|
||||||
|
|
||||||
if($showsinglesearchhit && count($entries) == 1) {
|
if($showsinglesearchhit && count($entries) == 1) {
|
||||||
$entry = $entries[0];
|
$entry = $entries[0];
|
||||||
if(get_class($entry) == $dms->getClassname('document')) {
|
if($entry->isType('document')) {
|
||||||
header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID());
|
header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID());
|
||||||
exit;
|
exit;
|
||||||
} elseif(get_class($entry) == $dms->getClassname('folder')) {
|
} elseif($entry->isType('folder')) {
|
||||||
header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID());
|
header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID());
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user