1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-12-02 06:24:11 +01:00

Bookmark: Prevent exporting empty bookmarks fix #145

This commit is contained in:
Brice Maron 2012-11-05 20:38:48 +00:00
parent eefac414f5
commit 8d51d64257

View File

@ -22,10 +22,12 @@ Do Not Edit! -->
<DL><p> <DL><p>
EOT; EOT;
$l = new OC_l10n('bookmarks');
$unamed_label = $l->t('untitled');
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1); $bookmarks = OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1);
foreach($bookmarks as $bm) { foreach($bookmarks as $bm) {
$file .= '<DT><A HREF="'.$bm['url'].'" TAGS="'.implode(',', $bm['tags']).'">'; $file .= '<DT><A HREF="'.$bm['url'].'" TAGS="'.implode(',', $bm['tags']).'">';
$file .= htmlspecialchars($bm['title'], ENT_QUOTES, 'UTF-8').'</A>'; $file .= htmlspecialchars($unamed_label, ENT_QUOTES, 'UTF-8').'</A>';
if($bm['description']) if($bm['description'])
$file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8'); $file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8');
} }