Fix a bug that added 0, 0 as location on manual CSV import

The existence of location information was tested incorrectly resulting
in erroneously adding these fields if they were not present.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-12-20 21:23:29 +02:00 committed by Dirk Hohndel
parent 028b937034
commit 64c735f2ae

View file

@ -166,9 +166,9 @@
<divecomputerid deviceid="ffffffff" model="csv" />
<xsl:if test="$locationField != '' or $gpsField != ''">
<xsl:if test="$locationField &gt;= 0 or $gpsField &gt;= 0">
<location>
<xsl:if test="$gpsField != ''">
<xsl:if test="$gpsField &gt;= 0">
<xsl:attribute name="gps">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$gpsField"/>
@ -176,7 +176,7 @@
</xsl:call-template>
</xsl:attribute>
</xsl:if>
<xsl:if test="$locationField != ''">
<xsl:if test="$locationField &gt;= 0">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$locationField"/>
<xsl:with-param name="line" select="$line"/>