Browse Source

Merge branch '7.x' of github.com:Islandora/islandora into 7.x

pull/123/merge
Danny Joris 13 years ago
parent
commit
fddb603d30
  1. 4
      islandora_basic_collection/includes/child_collection.inc
  2. 4
      islandora_basic_collection/includes/manage_policies.inc

4
islandora_basic_collection/includes/child_collection.inc

@ -136,7 +136,7 @@ function islandora_create_child_collection_form_submit($form, &$form_state) {
$new_collection_pid = $form_state['values']['new_collection_pid'];
$this_collection_pid = $form_state['values']['current'];
if(empty($new_collection_pid)) {
$collection_namespace = substr($this_collection_pid, 0, strpos($this_collection_pid, ":"));
$new_collection_pid = substr($this_collection_pid, 0, strpos($this_collection_pid, ":"));
}
$new_collection_label = $form_state['values']['collection_name'];
$namespace = $form_state['values']['collection_namespace'];
@ -185,5 +185,5 @@ function islandora_create_child_collection_form_submit($form, &$form_state) {
$fedora_object->ingestDatastream($policy_datastream);
$new_fedora_object = islandora_ingest_add_object($fedora_object);
drupal_goto('/islandora/object/' . $new_collection_pid);
drupal_goto('/islandora/object/' . $new_fedora_object->id);
}

4
islandora_basic_collection/includes/manage_policies.inc

@ -137,6 +137,7 @@ function islandora_manage_policies_form_validate($form, &$form_state) {
* @param array $form_state
*/
function islandora_manage_policies_form_submit($form, &$form_state) {
module_load_include('module', 'islandora', 'islandora');
$collection_pid = $form_state['values']['parent_collection'];
$collection_object = islandora_object_load($collection_pid);
@ -166,7 +167,8 @@ function islandora_manage_policies_form_submit($form, &$form_state) {
$cp_namespace = $form_state['values']['new_cp_namespace'];
$cp_content_model = $form_state['values']['content_model_to_add'];
$content_model_object = new FedoraObject($cp_content_model, $rest_connection->repository);
// $content_model_object = new FedoraObject($cp_content_model, $rest_connection->repository);
$content_model_object = islandora_object_load($cp_content_model);
$content_model_datastream = $content_model_object->getDatastream(variable_get('Islandora_Content_Model_DSID', 'ISLANDORACM'));
$content_models_element = $collection_policy_xml->getElementsByTagName('content_models');

Loading…
Cancel
Save