Browse Source

Merge pull request #138 from adam-vessey/6.x

6.x
pull/139/head
Jonathan Green 13 years ago
parent
commit
1fa2f2a3ae
  1. 6
      CollectionClass.inc
  2. 5
      fedora_repository.module

6
CollectionClass.inc

@ -533,16 +533,12 @@ class CollectionClass {
function showFieldSets($page_number) { function showFieldSets($page_number) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
//module_load_include('inc', 'fedora_repository', 'BatchIngest'); //Legacy code?
global $base_url; global $base_url;
global $user; global $user;
$tabset = array(); $tabset = array();
$query = NULL; $query = self::getCollectionQuery($this->pid);
$item = new Fedora_Item($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); $results = $this->getRelatedItems($this->pid, $query);
$collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number); $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);

5
fedora_repository.module

@ -917,7 +917,7 @@ function makeObject($pid, $dsID) {
drupal_set_message(t("No pid or dsid given to create an object with.")); drupal_set_message(t("No pid or dsid given to create an object with."));
return ' '; return ' ';
} }
global $user; global $user, $conf;
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_access_denied(); drupal_access_denied();
return; return;
@ -925,6 +925,9 @@ function makeObject($pid, $dsID) {
return ' '; 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'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
$objectHelper->makeObject($pid, $dsID); $objectHelper->makeObject($pid, $dsID);

Loading…
Cancel
Save