Skip to content

Commit

Permalink
Merge pull request #38 from whikloj/7.x-1.13-ISLANDORA-2464
Browse files Browse the repository at this point in the history
Check the set  has pdf mimetype - Release PR
  • Loading branch information
bondjimbond authored Aug 16, 2019
2 parents 951fa4b + 92c4e67 commit 4a92efb
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 4a92efb

Please sign in to comment.