diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-12-20 21:23:29 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-20 11:29:56 -0800 |
commit | 64c735f2aedb1c18ed311ac986ff39b435fd7c79 (patch) | |
tree | 71bbffad3b7f6c9973472bbbb2cdcff3d4a6bf17 /xslt/manualcsv2xml.xslt | |
parent | 028b93703455894c4755350926d15af2158c3e2b (diff) | |
download | subsurface-64c735f2aedb1c18ed311ac986ff39b435fd7c79.tar.gz |
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>
Diffstat (limited to 'xslt/manualcsv2xml.xslt')
-rw-r--r-- | xslt/manualcsv2xml.xslt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt index 1ad96510f..58f04fc98 100644 --- a/xslt/manualcsv2xml.xslt +++ b/xslt/manualcsv2xml.xslt @@ -166,9 +166,9 @@ <divecomputerid deviceid="ffffffff" model="csv" /> - <xsl:if test="$locationField != '' or $gpsField != ''"> + <xsl:if test="$locationField >= 0 or $gpsField >= 0"> <location> - <xsl:if test="$gpsField != ''"> + <xsl:if test="$gpsField >= 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 >= 0"> <xsl:call-template name="getFieldByIndex"> <xsl:with-param name="index" select="$locationField"/> <xsl:with-param name="line" select="$line"/> |