Browse Source

moved default tab form into islandora + removed passing of $user through invoke function

pull/200/head
DannyJoris 12 years ago
parent
commit
5c810ea4c8
  1. 20
      includes/solution_packs.inc
  2. 2
      islandora.module

20
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

2
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);
}

Loading…
Cancel
Save