[Dive4elements-commits] [PATCH] Set tokm and fromkm to location if we are at a location to apply km-filtering correctly
Wald Commits
scm-commit at wald.intevation.org
Wed Jun 26 20:51:09 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1372272658 -7200
# Node ID 00aa1bc72a65f4ddfedb48e01be7210d52a78e9e
# Parent dad4f0424783d314c1b4123fee67f1d375854219
Set tokm and fromkm to location if we are at a location to apply km-filtering correctly
diff -r dad4f0424783 -r 00aa1bc72a65 artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Wed Jun 26 16:46:43 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Wed Jun 26 20:50:58 2013 +0200
@@ -234,7 +234,8 @@
Object locations = args.get(1);
Object from = args.get(2);
- if (mode instanceof String && mode.equals("location")) {
+ if ((mode instanceof String && mode.equals("location")) ||
+ (locations instanceof String && !((String)locations).isEmpty())) {
if (!(locations instanceof String)) {
return -FAR_AWAY;
}
@@ -279,7 +280,8 @@
Object locations = args.get(1);
Object to = args.get(2);
- if (mode instanceof String && mode.equals("location")) {
+ if ((mode instanceof String && mode.equals("location")) ||
+ (locations instanceof String && !((String)locations).isEmpty())) {
if (!(locations instanceof String)) {
return FAR_AWAY;
}
More information about the Dive4elements-commits
mailing list