set owner to new bookmarks.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3275 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent ff79c52fc0
commit 769c3f1249

@ -115,16 +115,12 @@ public class Bookmarks {
if(bookmark != null){
bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_TITLE, title);
bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_DESCRIPTION, description);
if(user!=null) bookmark.setOwner(user.getUserName());
if(((String) post.get("public")).equals("public")){
bookmark.setPublic(true);
// create a news message
HashMap map = new HashMap();
map.put("url", url.replace(',', '|'));
map.put("title", title.replace(',', ' '));
map.put("description", description.replace(',', ' '));
map.put("tags", tagsString.replace(',', ' '));
yacyCore.newsPool.publishMyNews(new yacyNewsRecord("bkmrkadd", map));
publishNews(url, title, description, tagsString);
}else{
bookmark.setPublic(false);
}
@ -285,4 +281,14 @@ public class Bookmarks {
return prop;
}
private static void publishNews(String url, String title, String description, String tagsString) {
// create a news message
HashMap map = new HashMap();
map.put("url", url.replace(',', '|'));
map.put("title", title.replace(',', ' '));
map.put("description", description.replace(',', ' '));
map.put("tags", tagsString.replace(',', ' '));
yacyCore.newsPool.publishMyNews(new yacyNewsRecord("bkmrkadd", map));
}
}

Loading…
Cancel
Save