From: Antonio Ospite <ao2@ao2.it>
Date: Mon, 23 May 2016 12:58:45 +0000 (+0200)
Subject: Don't convert the timestamp to a number when calling php:functionString()
X-Git-Tag: v0.6~6
X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/0b2252b86bf510f3ba9e9ddec20917a6a4359d7c

Don't convert the timestamp to a number when calling php:functionString()

It's not needed to convert the $timestamp variable to a number before
passing it as an argument to php:functionString() as the latter will
convert it to a string anyways.
---

diff --git a/rss_converter_facebook.com.xsl b/rss_converter_facebook.com.xsl
index 89cc67d..418b3d2 100644
--- a/rss_converter_facebook.com.xsl
+++ b/rss_converter_facebook.com.xsl
@@ -85,7 +85,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select=".//abbr[@data-shorten]/@data-utime"/>
-                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', number($timestamp))"/>
+                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', $timestamp)"/>
             </pubDate>
             <description>
 
diff --git a/rss_converter_instagram.com.xsl b/rss_converter_instagram.com.xsl
index 54f660e..84fbd81 100644
--- a/rss_converter_instagram.com.xsl
+++ b/rss_converter_instagram.com.xsl
@@ -75,7 +75,7 @@
             </guid>
             <pubDate>
                 <xsl:variable name="timestamp" select="./date"/>
-                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', number($timestamp))"/>
+                <xsl:value-of select="php:functionString('Tweeper::epochToRssDate', $timestamp)"/>
             </pubDate>
             <description>
                 <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>