Author: peter
Date: Sat Sep 19 17:07:46 2009
New Revision: 3431
Log:
fix bug that crashed ead export if no level of description value was present
Modified:
trunk/apps/qubit/modules/informationobject/templates/showEadSuccess.xml.php
Modified:
trunk/apps/qubit/modules/informationobject/templates/showEadSuccess.xml.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showEadSuccess.xml.php
Sat Sep 19 16:33:58 2009 (r3430)
+++ trunk/apps/qubit/modules/informationobject/templates/showEadSuccess.xml.php
Sat Sep 19 17:07:46 2009 (r3431)
@@ -63,7 +63,7 @@
<frontmatter></frontmatter>
-<archdesc <?php if (0 < strlen($levelOfDescription =
$informationObject->getLevelOfDescription()->getName(array('culture' =>
'en')))): ?>level="<?php if (in_array(strtolower($levelOfDescription),
$eadLevels)): ?><?php echo strtolower($levelOfDescription).'"' ?><?php else:
?><?php echo 'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif;
?><?php endif; ?> relatedencoding="ISAD(G)v2">
+<archdesc <?php if ($informationObject->levelOfDescriptionId):?>level="<?php
if (in_array(strtolower($levelOfDescription =
$informationObject->getLevelOfDescription()->getName(array('culture' =>
'en'))), $eadLevels)): ?><?php echo strtolower($levelOfDescription).'"' ?><?php
else: ?><?php echo 'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php
endif; ?><?php endif; ?> relatedencoding="ISAD(G)v2">
<did>
<?php if (0 < strlen($value =
$informationObject->getTitle(array('cultureFallback' => true)))): ?>
<unittitle encodinganalog="3.1.2"><?php echo htmlspecialchars($value)
?></unittitle><?php endif; ?>
@@ -177,7 +177,7 @@
<?php if (0 < count($publicationNotes =
$informationObject->getNotesByType(array('noteTypeId' =>
QubitTerm::PUBLICATION_NOTE_ID)))): ?><?php foreach ($publicationNotes as
$note): ?><bibliography encodinganalog="3.5.4"><?php echo
htmlspecialchars(nl2br($note)) ?></bibliography><?php endforeach; ?><?php
endif; ?>
<dsc type="combined"><?php $nestedRgt = array() ?><?php foreach
($informationObject->getDescendants()->orderBy('lft') as $descendant): ?>
- <c <?php if (0 < strlen($levelOfDescription =
$descendant->getLevelOfDescription()->getName(array('culture' => 'en')))):
?>level="<?php if (in_array(strtolower($levelOfDescription), $eadLevels)):
?><?php echo strtolower($levelOfDescription).'"' ?><?php else: ?><?php echo
'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif; ?><?php
endif; ?>>
+ <c <?php if ($descendant->levelOfDescriptionId):?>level="<?php if
(in_array(strtolower($levelOfDescription =
$descendant->getLevelOfDescription()->getName(array('culture' => 'en'))),
$eadLevels)): ?><?php echo strtolower($levelOfDescription).'"' ?><?php else:
?><?php echo 'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif;
?><?php endif; ?>>
<did>
<?php foreach ($descendant->getPhysicalObjects() as $physicalObject):
?><?php if ($physicalObject->getLocation(array('cultureFallback' => true))): ?>
<physloc><?php echo
htmlspecialchars($physicalObject->getLocation(array('cultureFallback' =>
true))) ?></physloc><?php endif; ?>
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---