Skip to content

Commit

Permalink
Enabled permalinks for the ATOM feed and fixed the isPermaLink attrib…
Browse files Browse the repository at this point in the history
…ute for the <guid> tag
  • Loading branch information
Florian Eula committed Nov 24, 2014
1 parent 2f58043 commit 558d778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ function showRSS()
$absurl = htmlspecialchars($link['url']);
if (startsWith($absurl,'?')) $absurl=$pageaddr.$absurl; // make permalink URL absolute
if ($usepermalinks===true)
echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$guid.'</link>';
echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid isPermaLink="true">'.$guid.'</guid><link>'.$guid.'</link>';
else
echo '<item><title>'.htmlspecialchars($link['title']).'</title><guid isPermaLink="false">'.$guid.'</guid><link>'.$absurl.'</link>';
if (!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()) echo '<pubDate>'.htmlspecialchars($rfc822date)."</pubDate>\n";
Expand Down Expand Up @@ -965,7 +965,7 @@ function showATOM()

// $usepermalink : If true, use permalink instead of final link.
// User just has to add 'permalink' in URL parameters. e.g. http://mysite.com/shaarli/?do=atom&permalinks
$usepermalinks = isset($_GET['permalinks']);
$usepermalinks = isset($_GET['permalinks']) || !$GLOBALS['enablersspermalink'];

// Cache system
$query = $_SERVER["QUERY_STRING"];
Expand Down

0 comments on commit 558d778

Please sign in to comment.