Browse Source

Some minor updates

pull/110/head
jonathangreen 13 years ago
parent
commit
9089ddc9e1
  1. 6
      RestConnection.inc
  2. 2
      includes/islandora.ingest.inc
  3. 2
      islandora_basic_collection/islandora_basic_collection.module

6
RestConnection.inc

@ -41,7 +41,11 @@ class RestConnection {
*/
public $repository = NULL;
function RestConnection($user) {
function RestConnection($user = NULL) {
if(!isset($user)) {
global $user;
}
if(!isset($user) || $user->uid == 0){
$user_string = 'anonymous';
$pass_string = 'anonymous';

2
includes/islandora.ingest.inc

@ -12,7 +12,7 @@ function islandora_ingest_get_object($content_models, $collection_pid, $relation
global $user;
$connection = new RestConnection($user);
$object = $connection->repository->constructObject($namespace);
foreach($content_models as $contentmodel) {
foreach($content_models as $content_model) {
$object->relationships->add(FEDORA_MODEL_URI, 'hasModel', $content_model);
}
$object->relationships->add($relationship['uri'], $relationship['value'], $collection_pid);

2
islandora_basic_collection/islandora_basic_collection.module

@ -150,4 +150,4 @@ function islandora_basic_collection_islandora_ingest_get_information($models, $o
drupal_set_message(t('Islandora Error getting collection info for %s', array('%s' => $object->id)), 'error');
}
}
}
}
Loading…
Cancel
Save