Skip to content

Commit

Permalink
Merge pull request #138 from adam-vessey/6.x
Browse files Browse the repository at this point in the history
6.x
  • Loading branch information
Jonathan Green committed Jun 20, 2012
2 parents 72630f1 + ac0cfab commit 1fa2f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions CollectionClass.inc
Expand Up @@ -533,16 +533,12 @@ class CollectionClass {
function showFieldSets($page_number) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
//module_load_include('inc', 'fedora_repository', 'BatchIngest'); //Legacy code?
global $base_url;
global $user;

$tabset = array();
$query = NULL;
$query = self::getCollectionQuery($this->pid);
$item = new Fedora_Item($this->pid);
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
$query = $item->get_datastream_dissemination('QUERY');
}
$results = $this->getRelatedItems($this->pid, $query);

$collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);
Expand Down
5 changes: 4 additions & 1 deletion fedora_repository.module
Expand Up @@ -917,14 +917,17 @@ function makeObject($pid, $dsID) {
drupal_set_message(t("No pid or dsid given to create an object with."));
return ' ';
}
global $user;
global $user, $conf;
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_access_denied();
return;
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace."), 'error');
return ' ';
}

//Disable the page cache, so entire datastreams do not get thrown into the page cache.
$conf['cache'] = CACHE_DISABLED;

module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $dsID);
Expand Down

0 comments on commit 1fa2f2a

Please sign in to comment.