diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index c016dae33..045dc900d 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -83,7 +83,7 @@ $(document).ready( function() { if($extraheader = $this->callHook('extraDownloadHeader')) $downmgr->addHeader($extraheader); foreach($entries as $entry) { - if(get_class($entry) == $dms->getClassname('document')) { + if($entry->isType('document')) { $extracols = $this->callHook('extraDownloadColumns', $entry); if(isset($_GET['includecontent']) && $_GET['includecontent'] && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) { $downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent); @@ -156,10 +156,10 @@ $(document).ready( function() { if($showsinglesearchhit && count($entries) == 1) { $entry = $entries[0]; - if(get_class($entry) == $dms->getClassname('document')) { + if($entry->isType('document')) { header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID()); exit; - } elseif(get_class($entry) == $dms->getClassname('folder')) { + } elseif($entry->isType('folder')) { header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID()); exit; }