[Dive4elements-commits] [PATCH 1 of 5] Remove useless km_exists statements

Wald Commits scm-commit at wald.intevation.org
Wed Apr 3 15:34:42 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1364995845 -7200
# Node ID 65fa2b22dc46357f75bde73dfbd05f6bdee4f138
# Parent  55529f586962fc3e15f2304674b077619050d289
Remove useless km_exists statements

diff -r 55529f586962 -r 65fa2b22dc46 flys-artifacts/doc/conf/meta-data.xml
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed Apr 03 15:26:41 2013 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed Apr 03 15:30:45 2013 +0200
@@ -989,13 +989,10 @@
           <dc:macro name="flood-map-km">
             <dc:context>
               <dc:statement>
-                SELECT count(*) AS km_exists
-                FROM river_axes_km WHERE river_id = ${river_id}
+                SELECT id FROM river_axes_km WHERE river_id = ${river_id}
               </dc:statement>
                <dc:for-each>
-                <dc:if test="$km_exists>0">
                   <kilometrage factory="wmskmfactory" ids="{$river_id}"/>
-                </dc:if>
               </dc:for-each>
             </dc:context>
           </dc:macro>
@@ -1561,15 +1558,13 @@
           <dc:macro name="flood-map-fixpoints">
             <dc:context>
               <dc:statement>
-                SELECT count(*) AS km_exists, name AS name
+                SELECT name AS name
                 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name
               </dc:statement>
-               <dc:for-each>
-                <dc:if test="$km_exists>0">
-                  <fixpoint factory="wmsfixpointsfactory"
-                            ids="{$river_id};{$name}"
-                            name="{$name}"/>
-                </dc:if>
+              <dc:for-each>
+                <fixpoint factory="wmsfixpointsfactory"
+                  ids="{$river_id};{$name}"
+                  name="{$name}"/>
               </dc:for-each>
             </dc:context>
           </dc:macro>


More information about the Dive4elements-commits mailing list