Author: sevein
Date: Wed Aug 22 08:24:14 2012
New Revision: 12161
Log:
In QubitXMLImport, check if a parent object is defined and, given that case,
use it as the root object of the new set being import. Fixes issue 1993.
Modified:
trunk/lib/QubitXmlImport.class.php
Modified: trunk/lib/QubitXmlImport.class.php
==============================================================================
--- trunk/lib/QubitXmlImport.class.php Wed Aug 22 08:21:59 2012 (r12160)
+++ trunk/lib/QubitXmlImport.class.php Wed Aug 22 08:24:14 2012 (r12161)
@@ -193,7 +193,7 @@
$importDOM->xpath = new DOMXPath($importDOM);
}
- // switch source culture if langusage is set in an EAD document
+ // switch source culture if language is set in an EAD document
if ($importSchema == 'ead')
{
if (is_object($langusage =
$importDOM->xpath->query('//eadheader/profiledesc/langusage/language/@langcode')))
@@ -286,7 +286,11 @@
else
{
// orphaned object, set root if possible
- if (is_callable(array($currentObject, 'setRoot')))
+ if (isset($this->parent))
+ {
+ $currentObject->parentId = $this->parent->id;
+ }
+ else if (is_callable(array($currentObject, 'setRoot')))
{
$currentObject->setRoot();
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.