Skip to content

Commit

Permalink
Check the set has pdf mimetype
Browse files Browse the repository at this point in the history
  • Loading branch information
whikloj committed Aug 13, 2019
1 parent 951fa4b commit 92c4e67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion islandora_pdfjs.module
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function islandora_pdfjs_islandora_viewer_info() {
*/
function islandora_pdfjs_viewer_callback(array $params, $fedora_object = NULL) {
$dsid = NULL;
if (isset($params['dsid']) && !empty($params['dsid']) && isset($fedora_object[$params['dsid']])) {
if (isset($params['dsid']) && !empty($params['dsid']) && isset($fedora_object[$params['dsid']]) &&
$fedora_object[$params['dsid']]->mimetype == 'application/pdf') {
$dsid = $params['dsid'];
}
else {
Expand Down

0 comments on commit 92c4e67

Please sign in to comment.