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

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

Loading…
Cancel
Save