From 53af2c7f32dd813ceb2e4743890463274b5492eb Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Mon, 7 Mar 2011 22:39:10 -0400 Subject: [PATCH] ISLANDORA-227 Add title to object label. --- ilives/book.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ilives/book.inc b/ilives/book.inc index 9a44958c..76bbe836 100644 --- a/ilives/book.inc +++ b/ilives/book.inc @@ -123,6 +123,13 @@ class IslandoraBook { $mods_item = $mods_list_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'mods')->item(0); $new_mods_item = $mods_item_doc->importNode($mods_item, TRUE); $mods_item_doc->appendChild($new_mods_item); + + $title_info = $mods_item_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'titleInfo')->item(0); + $title = ''; + foreach(array('nonSort', 'title') as $title_field) { + $title .= $title_info->getElementsByTagNameNS('http://www.loc.gov/mods/v3', $title_field)->item(0)->nodeValue; + } + $mods_text = $mods_item_doc->saveXML(); global $user; $mimetype = new MimeClass();