From 0b7b08a254d2ef37453c85fdafd074ecbb0b8cfb Mon Sep 17 00:00:00 2001 From: nruest Date: Fri, 6 Jun 2014 12:06:03 -0400 Subject: [PATCH] Address ISLANDORA-860 --- includes/utilities.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index fd6c1c3e..050921cc 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -445,8 +445,9 @@ function islandora_get_datastreams_requirements_from_content_model(AbstractObjec /** * Prepare an ingestable object. * - * @param string $namespace - * The namespace in which the PID for the new object will be created. + * @param string $name_source + * Either a pid or namespace in which the PID for the new object will be + * created. * @param string $label * An optional label to apply to the object. * @param array $datastreams @@ -471,10 +472,10 @@ function islandora_get_datastreams_requirements_from_content_model(AbstractObjec * @return NewFedoraObject * An ingestable NewFedoraObject. */ -function islandora_prepare_new_object($namespace = NULL, $label = NULL, $datastreams = array(), $content_models = array(), $relationships = array()) { +function islandora_prepare_new_object($name_source = NULL, $label = NULL, $datastreams = array(), $content_models = array(), $relationships = array()) { global $user; $tuque = islandora_get_tuque_connection(); - $object = isset($namespace) ? $tuque->repository->constructObject($namespace) : new IslandoraNewFedoraObject(NULL, $tuque->repository); + $object = isset($name_source) ? $tuque->repository->constructObject($name_source) : new IslandoraNewFedoraObject(NULL, $tuque->repository); $object->owner = isset($user->name) ? $user->name : $object->owner; $object->label = isset($label) ? $label : $object->label; foreach ($content_models as $content_model) {