Skip to content

Commit

Permalink
use islandora_document_viewers, not islandora_pdf_viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
JojoVes committed Jun 7, 2018
1 parent 995d06a commit 7124073
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions islandora_document.install
Expand Up @@ -22,3 +22,14 @@ function islandora_document_uninstall() {
module_load_include('inc', 'islandora', 'includes/solution_packs');
islandora_install_solution_pack('islandora_document', 'uninstall');
}

/**
* Update islandora document viewers selection.
*/
function islandora_document_update_7001(&$sandbox) {
$islandora_pdf_viewers = variable_get('islandora_pdf_viewers', array());
$islandora_document_viewers = variable_get('islandora_document_viewers', array());
$islandora_document_viewers['default'] = $islandora_pdf_viewers['default'];
variable_set('islandora_document_viewers', $islandora_document_viewers);
return get_t('Islandora Document viewers updated.');
}
2 changes: 1 addition & 1 deletion theme/theme.inc
Expand Up @@ -44,7 +44,7 @@ function template_preprocess_islandora_document(&$variables) {
$variables['description'] = islandora_retrieve_description_markup($islandora_object);

module_load_include('inc', 'islandora', 'includes/solution_packs');
$viewer = islandora_get_viewer(array(), 'islandora_pdf_viewers', $islandora_object);
$viewer = islandora_get_viewer(array(), 'islandora_document_viewers', $islandora_object);

if ($viewer) {
$variables['islandora_content'] = $viewer;
Expand Down

0 comments on commit 7124073

Please sign in to comment.