add lastBuildDate and check for negative pubDate

This commit is contained in:
vv01f 2021-04-26 13:57:35 +02:00
parent dd0426c650
commit d2ee45b1c2
Signed by untrusted user who does not match committer: vv01f
GPG Key ID: 02625A16AC1D1FF6
1 changed files with 9 additions and 6 deletions

View File

@ -126,6 +126,7 @@
<description><xsl:value-of select="$poddesc"/></description> <description><xsl:value-of select="$poddesc"/></description>
<language>de-DE</language> <language>de-DE</language>
<copyright>https://creativecommons.org/licenses/by-sa/2.0/de/</copyright> <copyright>https://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
<lastBuildDate><xsl:call-template name="date-to-rfc822"><xsl:with-param name="date" select="date:date-time()"/><!--xsl:with-param name="tz">+0200</xsl:with-param--></xsl:call-template></lastBuildDate>
<image> <image>
<title><xsl:value-of select="$imgtitle"/></title> <title><xsl:value-of select="$imgtitle"/></title>
<url><xsl:value-of select="$imgurl"/></url> <url><xsl:value-of select="$imgurl"/></url>
@ -148,11 +149,6 @@
<itunes:explicit>no</itunes:explicit> <itunes:explicit>no</itunes:explicit>
<!--generator>C3D2 custom XSLT</generator--> <!--generator>C3D2 custom XSLT</generator-->
<!--lastBuildDate>
<xsl:call-template name="date-to-rfc822">
<xsl:with-param name="date" select="$builddate"/>
</xsl:call-template>
</lastBuildDate-->
<podcast:locked owner="{$mailto}">no</podcast:locked> <podcast:locked owner="{$mailto}">no</podcast:locked>
<podcast:funding url="https://c3d2.de/unterstuetzen.html">C3D2 Unterstützen!</podcast:funding> <podcast:funding url="https://c3d2.de/unterstuetzen.html">C3D2 Unterstützen!</podcast:funding>
<podcast:funding url="https://c3d2.de/membership.html">Mitglied werden!</podcast:funding> <podcast:funding url="https://c3d2.de/membership.html">Mitglied werden!</podcast:funding>
@ -201,7 +197,14 @@
<xsl:for-each select="newsfile"> <xsl:for-each select="newsfile">
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" /> <xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
<xsl:if test="position() &lt;= $maxitems"> <xsl:if test="position() &lt;= $maxitems and
starts-with(
date:difference(
date:date-time(),
concat(document(.)/item/@date, '+01:00')
),
'-'
)">
<xsl:choose> <xsl:choose>
<xsl:when test="($selection = 'pentaradio' or $selection = 'pentamedia') and <xsl:when test="($selection = 'pentaradio' or $selection = 'pentamedia') and
starts-with(., 'content/news/pentaradio') and starts-with(., 'content/news/pentaradio') and