Browse Source

Merge pull request #513 from ruebot/7.x-ISLANDORA-860

Address ISLANDORA-860
pull/515/head
William Panting 11 years ago
parent
commit
608b437de6
  1. 9
      includes/utilities.inc

9
includes/utilities.inc

@ -445,8 +445,9 @@ function islandora_get_datastreams_requirements_from_content_model(AbstractObjec
/** /**
* Prepare an ingestable object. * Prepare an ingestable object.
* *
* @param string $namespace * @param string $name_source
* The namespace in which the PID for the new object will be created. * Either a pid or namespace in which the PID for the new object will be
* created.
* @param string $label * @param string $label
* An optional label to apply to the object. * An optional label to apply to the object.
* @param array $datastreams * @param array $datastreams
@ -471,10 +472,10 @@ function islandora_get_datastreams_requirements_from_content_model(AbstractObjec
* @return NewFedoraObject * @return NewFedoraObject
* An ingestable 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; global $user;
$tuque = islandora_get_tuque_connection(); $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->owner = isset($user->name) ? $user->name : $object->owner;
$object->label = isset($label) ? $label : $object->label; $object->label = isset($label) ? $label : $object->label;
foreach ($content_models as $content_model) { foreach ($content_models as $content_model) {

Loading…
Cancel
Save