Skip to content

Commit e70898c

Browse files
committed
Fix template query
1 parent a280e7a commit e70898c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccessBody.xml.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php $defTemplate = sfConfig::get('app_default_template_informationobject'); ?>
2+
<?php $template = strtolower(substr($ead->getMetadataParameter('relatedencoding'), 0, 3)); ?>
3+
<?php 'isa' == $template ? $template = 'isad' : $template = 'rad'; ?>
24
<ead>
35
<eadheader langencoding="iso639-2b" countryencoding="iso3166-1" dateencoding="iso8601" repositoryencoding="iso15511" scriptencoding="iso15924" relatedencoding="DC">
46
<?php echo $ead->renderEadId(); ?>
@@ -85,7 +87,6 @@
8587
</profiledesc>
8688
</eadheader>
8789

88-
<?php $template = $ead->getMetadataParameter('relatedencoding'); ?>
8990
<archdesc <?php echo $ead->renderLOD($resource, $eadLevels); ?> relatedencoding="<?php echo $template; ?>">
9091
<?php
9192
$resourceVar = 'resource';
@@ -245,7 +246,7 @@
245246
<?php } ?>
246247
</controlaccess>
247248
<?php } ?>
248-
<?php 'isad' == $template ? $physCond = 'app_element_visibility_isad_physical_condition' : $physCond = 'app_element_visibility_dacs_physical_access'; ?>
249+
<?php 'isad' == $template ? $physCond = 'app_element_visibility_isad_physical_condition' : $physCond = 'app_element_visibility_rad_physical_access'; ?>
249250
<?php if (0 < strlen($value = $resource->getPhysicalCharacteristics(['cultureFallback' => true])) && ($sf_user->isAuthenticated() || 1 == sfConfig::get($physCond))) { ?>
250251
<phystech encodinganalog="<?php echo $ead->getMetadataParameter('phystech'); ?>"><p><?php echo escape_dc(esc_specialchars($value)); ?></p></phystech>
251252
<?php } ?>

plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccessBodyBioghistElement.xml.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php $defTemplate = sfConfig::get('app_default_template_informationobject'); ?>
2+
<?php $template = strtolower(substr($ead->getMetadataParameter('relatedencoding'), 0, 3)); ?>
3+
<?php 'isa' == $template ? $template = 'isad' : $template = 'rad'; ?>
24

35
<?php if (('mods' != $defTemplate && 'dc' != $defTemplate) && 0 < count($creators)) { ?>
46
<?php foreach ($events as $date) { ?>

plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccessBodyDidElement.xml.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
<?php include 'indexSuccessBodyPhysloc.xml.php'; ?>
44

5+
<?php $defTemplate = sfConfig::get('app_default_template_informationobject'); ?>
6+
<?php $template = strtolower(substr($ead->getMetadataParameter('relatedencoding'), 0, 3)); ?>
7+
<?php 'isa' == $template ? $template = 'isad' : $template = 'rad'; ?>
8+
59
<?php if (
610
0 < strlen(${$resourceVar}->getPropertyByName('titleProperOfPublishersSeries')->__toString())
711
|| 0 < strlen(${$resourceVar}->getPropertyByName('parallelTitleOfPublishersSeries')->__toString())
@@ -137,7 +141,6 @@
137141
</langmaterial>
138142
<?php } ?>
139143

140-
<?php $template = $ead->getMetadataParameter('relatedencoding'); ?>
141144
<?php $controlSources = 'app_element_visibility_'.$template.'_control_sources'; ?>
142145
<?php if (${$resourceVar}->sources && ($sf_user->isAuthenticated() || 1 == sfConfig::get($controlSources))) { ?>
143146
<note type="sourcesDescription"><p><?php echo escape_dc(esc_specialchars(${$resourceVar}->sources)); ?></p></note>

0 commit comments

Comments
 (0)