[Piwik-svn] r186 - in trunk/modules: API DataTable/Renderer
svnmaster at piwik.org
svnmaster at piwik.org
Fri Jan 18 15:35:24 CET 2008
Author: matt
Date: 2008-01-18 15:35:24 +0100 (Fri, 18 Jan 2008)
New Revision: 186
Modified:
trunk/modules/API/Proxy.php
trunk/modules/DataTable/Renderer/Rss.php
Log:
RSS feed now decoding strings (useful for keywords)
Modified: trunk/modules/API/Proxy.php
===================================================================
--- trunk/modules/API/Proxy.php 2008-01-18 14:10:01 UTC (rev 185)
+++ trunk/modules/API/Proxy.php 2008-01-18 14:35:24 UTC (rev 186)
@@ -250,16 +250,22 @@
$exampleUrl = $this->getExampleUrl($class, $methodName);
if($exampleUrl !== false)
{
- $exampleUrlRss1 = $this->getExampleUrl($class, $methodName, array('date' => 'last10')) . $prefixUrls;
- $exampleUrlRss2 = $this->getExampleUrl($class, $methodName, array('date' => 'last5','period' => 'week',)) . $prefixUrls;
+ $lastNUrls = '';
+ if( ereg('(date)',$exampleUrl))
+ {
+ $exampleUrlRss1 = $this->getExampleUrl($class, $methodName, array('date' => 'last10')) . $prefixUrls;
+ $exampleUrlRss2 = $this->getExampleUrl($class, $methodName, array('date' => 'last5','period' => 'week',)) . $prefixUrls;
+ $lastNUrls = ", RSS of the last <a target=_blank href='$exampleUrlRss1&format=rss'>10 days</a>, <a target=_blank href='$exampleUrlRss2&format=Rss'>5 weeks</a>,
+ XML of the <a target=_blank href='$exampleUrlRss1&format=xml'>last 10 days</a>";
+ }
$exampleUrl = $exampleUrl . $prefixUrls;
$str .= " [ Example in
<a target=_blank href='$exampleUrl&format=xml'>XML</a>,
<a target=_blank href='$exampleUrl&format=PHP&prettyDisplay=true'>PHP</a>,
<a target=_blank href='$exampleUrl&format=JSON'>Json</a>,
<a target=_blank href='$exampleUrl&format=Csv'>Csv</a>,
- <a target=_blank href='$exampleUrl&format=Html'>Basic html</a>,
- RSS of the last <a target=_blank href='$exampleUrlRss1&format=Rss'>10 days</a>, <a target=_blank href='$exampleUrlRss2&format=Rss'>5 weeks</a>
+ <a target=_blank href='$exampleUrl&format=Html'>Basic html</a>
+ $lastNUrls
]";
}
else
Modified: trunk/modules/DataTable/Renderer/Rss.php
===================================================================
--- trunk/modules/DataTable/Renderer/Rss.php 2008-01-18 14:10:01 UTC (rev 185)
+++ trunk/modules/DataTable/Renderer/Rss.php 2008-01-18 14:35:24 UTC (rev 186)
@@ -61,7 +61,7 @@
<author>http://piwik.org</author>
<description>";
- $out .= htmlentities( $this->renderDataTable($subtable) );
+ $out .= htmlspecialchars( $this->renderDataTable($subtable) );
$out .= "</description>\n\t</item>\n";
}
@@ -161,7 +161,7 @@
$value = "-";
if(isset($row[$name]))
{
- $value = $row[$name];
+ $value = urldecode($row[$name]);
}
$html .= "\n\t<td>$value</td>";
More information about the Piwik-svn
mailing list