// Account for replace_other_urls setting
$urls = $this->driver->getOnlineLinks($expand=true); // extend links with PIDs in case links are empty
// print_r($urls);
$displayDownloadButton = false;
if (isset($urls)) {
foreach($urls as $current) {
if (strcmp($current['desc'], "Inhaltsverzeichnis") == 0 || strncmp($current['desc'],"Volltext über anderen Anbieter", strlen("Volltext über anderen Anbieter")) == 0) continue;
$displayDownloadButton = true;
break;
}
}
$title = $this->driver->getMainTitle() ;
$id = $this->driver->getUniqueID();
$data = $this->driver->getRawData();
/* $license = '';
if (isset($data['rightsuri'])) {
if (is_array($data['rightsuri'])) {
$license = $data['rightsuri'][0];
} else {
$license = $data['rightsuri'];
}
} else {
$license = [];
}
*/
$license = isset($data['rightsuri']) ? $data['rightsuri'] : [] ;
$parts = @explode("/", $license[0]);
$rightsImage = $rightsLink = '';
$aLinks = $this->driver->getAdditionalLinks();
$additionalLinks= [];
foreach ($aLinks as $aLink) {
$x = explode("|",$aLink);
$additionalLinks[] = [ "link" => $x[0], "description" => $x[1] ] ;
}
$filetypes = $this->driver->getFileType();
$filetype = isset($filetypes[0]) ? $filetypes[0] : 'PDF';
if (strlen($filetype) == 0) $filetype = "PDF";
if (strcmp(trim(strtoupper($filetype)), "ADOBE PDF") == 0) $filetype = "PDF";
if (isset($parts) && count($parts) > 1) {
$rightsImage = "/vufind/themes/bibb/images/" .$parts[4].".png";
$rightsLink = $license[0];
}
$pdfLogo = "/vufind/themes/bibb/images/pdf.png";
if (strlen($rightsLink == 0)) {
$right = isset($data['license'][0]) ? $data['license'][0] : '' ;
if (strcmp($right,"Urheberrecht") == 0 || strcmp($right,"Deutsches Urheberrecht") == 0) {
$rightsLink = "http://www.gesetze-im-internet.de/urhg";
$rightsImage = "/vufind/themes/bibb/images/urheberrechtDe.png";
}
}
?>
if (!empty($urls) || $openUrlActive): ?>
foreach ($urls as $current): ?>
if (strlen($rightsImage)) : ?>
$rightsImage = ''; ?>
endif; ?>
if ($displayDownloadButton) : ?>
// if ((strcmp($current['desc'], "Inhaltsverzeichnis") != 0) && strcmp(strcmp($current['desc'],"Volltext über anderen Anbieter") !=0)) : ?>