From abb065f7e3512131ddc08330bb3b421d4c8eb7b4 Mon Sep 17 00:00:00 2001 From: Ben Woodhead Date: Wed, 15 Feb 2012 16:37:16 -0400 Subject: [PATCH] Fixed collection renaming --- formClass.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/formClass.inc b/formClass.inc index b3972087..86a5128f 100644 --- a/formClass.inc +++ b/formClass.inc @@ -379,7 +379,13 @@ class formClass { // DC elements $previousElement = NULL; // Used in case we have to nest elements for qualified dublin core. + + $label = null; foreach ($form_values as $key => $value) { + //echo ($key); + if ($key == 'dc:title-0') { + $label = $value; + } $index = strrpos($key, '-'); $key = substr($key, 0, $index); $test = substr($key, 0, 2); @@ -400,6 +406,13 @@ class formClass { } } + // Save the title + if ( $label != null ) + { + $object = new Fedora_Item($form_values['pid']); + $object->modify_object($label); + } + $dom->appendChild($oai); if (!$client) {