Browse Source

renamed hook

pull/173/head
William Panting 12 years ago
parent
commit
e61a23acdb
  1. 4
      fedora_repository.api.php
  2. 2
      formClass.inc

4
fedora_repository.api.php

@ -91,15 +91,17 @@ function hook_required_fedora_objects() {
} }
/** /**
* Implements hook_fedora_repository_can_ingest().
* Override ingest permissions. * Override ingest permissions.
* (from islandora_workflow) * (from islandora_workflow)
* *
* @param string $collection_pid * @param string $collection_pid
* The PID of the collection * The PID of the collection
*
* @return boolean * @return boolean
* TRUE if the user can ingest into the specified collection, FALSE otherwise. * TRUE if the user can ingest into the specified collection, FALSE otherwise.
*/ */
function islandora_can_ingest($collection_pid) { function hook_fedora_repository_can_ingest($collection_pid) {
module_load_include('inc', 'islandora_workflow', 'islandora_workflow.permissions'); module_load_include('inc', 'islandora_workflow', 'islandora_workflow.permissions');
return (islandora_workflow_user_collection_permission_check($collection_pid) !== FALSE); return (islandora_workflow_user_collection_permission_check($collection_pid) !== FALSE);

2
formClass.inc

@ -501,7 +501,7 @@ class formClass {
*/ */
function canShowIngestForm($collection_pid) { function canShowIngestForm($collection_pid) {
if (!user_access('ingest new fedora objects')) { if (!user_access('ingest new fedora objects')) {
$ingest_override_array = module_invoke_all('can_ingest', $collection_pid); $ingest_override_array = module_invoke_all('fedora_repository_can_ingest', $collection_pid);
$overrides = array_filter($ingest_override_array); $overrides = array_filter($ingest_override_array);
if (empty($overrides)) { if (empty($overrides)) {
drupal_set_message(t('You do not have permission to ingest.'), 'error'); drupal_set_message(t('You do not have permission to ingest.'), 'error');

Loading…
Cancel
Save