mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Support buddies with only a first name, no surname.
The previous patch would not fill the first name field if there was no second name. This rectifies that. Signed-Off-By: Martin Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c9f927d547
commit
18aa6f5ed8
1 changed files with 15 additions and 6 deletions
|
@ -72,12 +72,21 @@
|
|||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
<personal>
|
||||
<first_name>
|
||||
<xsl:value-of select="substring-before(., ' ')"/>
|
||||
</first_name>
|
||||
<last_name>
|
||||
<xsl:value-of select="substring-after(., ' ')"/>
|
||||
</last_name>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(., ' ')">
|
||||
<first_name>
|
||||
<xsl:value-of select="substring-before(., ' ')"/>
|
||||
</first_name>
|
||||
<last_name>
|
||||
<xsl:value-of select="substring-after(., ' ')"/>
|
||||
</last_name>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<first_name>
|
||||
<xsl:value-of select="."/>
|
||||
</first_name>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</personal>
|
||||
</buddy>
|
||||
</xsl:for-each>
|
||||
|
|
Loading…
Reference in a new issue