Mercurial > dive4elements > river
changeset 6448:00aa1bc72a65
Set tokm and fromkm to location if we are at a location to apply km-filtering correctly
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 26 Jun 2013 20:50:58 +0200 |
parents | dad4f0424783 |
children | eb4d0950ae87 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }