[PATCH] (issue965) Handle the case that diffids are not available
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 23 12:43:42 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1382525006 -7200
# Node ID 2ee825c87f577f1542374753ac728e064a190541
# Parent f4623fe18868f5388b342d0bdaf3e011639cb4bc
(issue965) Handle the case that diffids are not available
diff -r f4623fe18868 -r 2ee825c87f57 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Wed Oct 23 12:09:36 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml Wed Oct 23 12:43:26 2013 +0200
@@ -1688,20 +1688,29 @@
On this list of numbers we use the dc:min/max-number functions to
get the extreme values and interpret the result as a number.
</dc:comment>
- <dc:variable name="year_from" expr="
- dc:min-number(
- dc:find-all(
- '\d{4}',
- dc:replace-all(
- $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
- type="number"/>
- <dc:variable name="year_to" expr="
- dc:max-number(
- dc:find-all(
- '\d{4}',
- dc:replace-all(
- $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
- type="number"/>
+ <dc:choose>
+ <dc:when test="dc:contains($parameters, 'diffids')">
+ <dc:variable name="year_from" expr="
+ dc:min-number(
+ dc:find-all(
+ '\d{4}',
+ dc:replace-all(
+ $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
+ type="number"/>
+ <dc:variable name="year_to" expr="
+ dc:max-number(
+ dc:find-all(
+ '\d{4}',
+ dc:replace-all(
+ $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
+ type="number"/>
+ </dc:when>
+ <dc:otherwise>
+ <dc:comment>Just show everything</dc:comment>
+ <dc:variable name="year_to" expr="9999" type="number"/>
+ <dc:variable name="year_from" expr="0" type="number"/>
+ </dc:otherwise>
+ </dc:choose>
<bedheights>
<dc:call-macro name="bed-heights-single"/>
<dc:call-macro name="bed-heights-epoch"/>
More information about the Dive4elements-commits
mailing list