Part of bug #3463481: add guid to items

This commit is contained in:
Christian Weiske 2012-01-20 14:58:16 +01:00
parent cf80b6c5b8
commit 87f495d31b
2 changed files with 4 additions and 1 deletions

View file

@ -17,6 +17,7 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
<item> <item>
<title><?php echo htmlspecialchars($bookmark['title']); ?></title> <title><?php echo htmlspecialchars($bookmark['title']); ?></title>
<link><?php echo htmlspecialchars($bookmark['link']); ?></link> <link><?php echo htmlspecialchars($bookmark['link']); ?></link>
<guid><?php echo $bookmark['guid']; ?></guid>
<description><?php echo htmlspecialchars($bookmark['description']); ?></description> <description><?php echo htmlspecialchars($bookmark['description']); ?></description>
<dc:creator><?php echo htmlspecialchars($bookmark['creator']); ?></dc:creator> <dc:creator><?php echo htmlspecialchars($bookmark['creator']); ?></dc:creator>
<pubDate><?php echo $bookmark['pubdate']; ?></pubDate> <pubDate><?php echo $bookmark['pubdate']; ?></pubDate>

View file

@ -137,6 +137,7 @@ $bookmarks_tmp = filter($bookmarks['bookmarks']);
$bookmarks_tpl = array(); $bookmarks_tpl = array();
$latestdate = null; $latestdate = null;
$guidBaseUrl = addProtocolToUrl(ROOT) . '#';
foreach ($bookmarks_tmp as $key => $row) { foreach ($bookmarks_tmp as $key => $row) {
$_link = $row['bAddress']; $_link = $row['bAddress'];
// Redirection option // Redirection option
@ -154,7 +155,8 @@ foreach ($bookmarks_tmp as $key => $row) {
'description' => $row['bDescription'], 'description' => $row['bDescription'],
'creator' => SemanticScuttle_Model_UserArray::getName($row), 'creator' => SemanticScuttle_Model_UserArray::getName($row),
'pubdate' => $_pubdate, 'pubdate' => $_pubdate,
'tags' => $row['tags'] 'tags' => $row['tags'],
'guid' => $guidBaseUrl . $row['bId'],
); );
} }
unset($bookmarks_tmp); unset($bookmarks_tmp);