diff --git a/includes/solution_packs.inc b/includes/solution_packs.inc index 9a05111b..222c6b90 100644 --- a/includes/solution_packs.inc +++ b/includes/solution_packs.inc @@ -491,11 +491,29 @@ function islandora_check_object_status($object_model = array()) { * Helper functions to include viewers for solution packs. */ +/** + * A form construct to create a select box for the use of the default tab. + * + * @param string $variable_id + * The ID of the Drupal variable to save the checkbox setting in + */ +function islandora_use_for_default_tab_form($variable_id = NULL) { + $form = array(); + $form[$variable_id] = array( + '#type' => 'checkbox', + '#title' => t('Provide the view for the default tab'), + '#default_value' => variable_get($variable_id, 1), + '#description' => t('Should this module provide the view for the default view tab. If you are seeing unexpected content + on a view tab you may have multiple modules configured to provide content for the default tab.'), + ); + return $form; +} + /** * A form construct to create a viewer selection table. * * @param string $variable_id - * The id of the Drupal variable to save the viewer settings in + * The ID of the Drupal variable to save the viewer settings in * @param string $mimetype * The table will be populated with viewers supporting this mimetype * @return diff --git a/islandora.module b/islandora.module index 84659bce..c12b034b 100644 --- a/islandora.module +++ b/islandora.module @@ -436,7 +436,7 @@ function islandora_view_object($fedora_object = NULL) { // Call cmodel oriented variants first. foreach (islandora_build_hook_list(ISLANDORA_VIEW_HOOK, $fedora_object->models) as $hook) { - $temp = module_invoke_all($hook, $fedora_object, $user, $page_number, $page_size); + $temp = module_invoke_all($hook, $fedora_object, $page_number, $page_size); if (!empty($temp)) { $output = array_merge_recursive($output, $temp); }