|
|
|
@ -49,6 +49,8 @@ import net.yacy.kelondro.util.DateFormatter;
|
|
|
|
|
import de.anomic.crawler.CrawlProfile;
|
|
|
|
|
import de.anomic.data.BookmarkHelper;
|
|
|
|
|
import de.anomic.data.BookmarksDB;
|
|
|
|
|
import de.anomic.data.BookmarksDB.Bookmark;
|
|
|
|
|
import de.anomic.data.BookmarksDB.Tag;
|
|
|
|
|
import de.anomic.data.ListManager;
|
|
|
|
|
import de.anomic.data.UserDB;
|
|
|
|
|
import de.anomic.search.Segments;
|
|
|
|
@ -56,6 +58,7 @@ import de.anomic.search.Switchboard;
|
|
|
|
|
import de.anomic.server.serverObjects;
|
|
|
|
|
import de.anomic.server.serverSwitch;
|
|
|
|
|
import de.anomic.yacy.yacyNewsPool;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Bookmarks {
|
|
|
|
@ -82,11 +85,14 @@ public class Bookmarks {
|
|
|
|
|
prop.clear();
|
|
|
|
|
sb = (Switchboard) env;
|
|
|
|
|
user = sb.userDB.getUser(header);
|
|
|
|
|
isAdmin=(sb.verifyAuthentication(header, true) || user!= null && user.hasRight(UserDB.Entry.BOOKMARK_RIGHT));
|
|
|
|
|
isAdmin = (sb.verifyAuthentication(header, true) || user!= null && user.hasRight(UserDB.Entry.BOOKMARK_RIGHT));
|
|
|
|
|
|
|
|
|
|
// set user name
|
|
|
|
|
if(user != null) username=user.getUserName();
|
|
|
|
|
else if(isAdmin) username="admin";
|
|
|
|
|
if (user != null) {
|
|
|
|
|
username=user.getUserName();
|
|
|
|
|
} else if(isAdmin) {
|
|
|
|
|
username="admin";
|
|
|
|
|
}
|
|
|
|
|
prop.putHTML("user", username);
|
|
|
|
|
|
|
|
|
|
//redirect to userpage
|
|
|
|
@ -96,15 +102,13 @@ public class Bookmarks {
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// set peer address
|
|
|
|
|
final String address = sb.peers.mySeed().getPublicAddress();
|
|
|
|
|
prop.put("address", address);
|
|
|
|
|
prop.put("address", sb.peers.mySeed().getPublicAddress());
|
|
|
|
|
|
|
|
|
|
//defaultvalues
|
|
|
|
|
if(isAdmin) {
|
|
|
|
|
prop.put("mode", "1");
|
|
|
|
|
prop.put("admin", "1");
|
|
|
|
|
prop.put("display", "0");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("mode", "0");
|
|
|
|
|
prop.put("admin", "0");
|
|
|
|
@ -119,58 +123,62 @@ public class Bookmarks {
|
|
|
|
|
prop.put("mode_public", "1"); //1=is public
|
|
|
|
|
prop.put("mode_feed", "0"); //no newsfeed
|
|
|
|
|
|
|
|
|
|
if(post != null){
|
|
|
|
|
if(!isAdmin){
|
|
|
|
|
if (post != null) {
|
|
|
|
|
if (!isAdmin) {
|
|
|
|
|
if(post.containsKey("login")){
|
|
|
|
|
prop.put("AUTHENTICATE","admin log-in");
|
|
|
|
|
}
|
|
|
|
|
}else if(post.containsKey("mode")){
|
|
|
|
|
} else if (post.containsKey("mode")) {
|
|
|
|
|
final String mode=post.get("mode");
|
|
|
|
|
if(mode.equals("add")){
|
|
|
|
|
if ("add".equals(mode)) {
|
|
|
|
|
prop.put("mode", "2");
|
|
|
|
|
prop.put("display", "1");
|
|
|
|
|
display = 1;
|
|
|
|
|
}else if(mode.equals("importxml")){
|
|
|
|
|
} else if ("importxml".equals(mode)){
|
|
|
|
|
prop.put("mode", "3");
|
|
|
|
|
prop.put("display", "1");
|
|
|
|
|
display = 1;
|
|
|
|
|
}
|
|
|
|
|
}else if(post.containsKey("add")){ //add an Entry
|
|
|
|
|
} else if(post.containsKey("add")) { //add an Entry
|
|
|
|
|
final String url=post.get("url");
|
|
|
|
|
final String title=post.get("title");
|
|
|
|
|
final String description=post.get("description");
|
|
|
|
|
String tagsString = post.get("tags");
|
|
|
|
|
String pathString = post.get("path");
|
|
|
|
|
if(pathString.equals("")){
|
|
|
|
|
if(pathString == null || "".equals(pathString)){
|
|
|
|
|
pathString="/unsorted"; //default folder
|
|
|
|
|
}
|
|
|
|
|
tagsString=tagsString+","+pathString;
|
|
|
|
|
tagsString = tagsString + "," + pathString;
|
|
|
|
|
final Set<String> tags=ListManager.string2set(BookmarkHelper.cleanTagsString(tagsString));
|
|
|
|
|
final BookmarksDB.Bookmark bookmark = sb.bookmarksDB.createBookmark(url, username);
|
|
|
|
|
if(bookmark != null){
|
|
|
|
|
|
|
|
|
|
if (bookmark != null) {
|
|
|
|
|
bookmark.setProperty(BookmarksDB.Bookmark.BOOKMARK_TITLE, title);
|
|
|
|
|
bookmark.setProperty(BookmarksDB.Bookmark.BOOKMARK_DESCRIPTION, description);
|
|
|
|
|
if(user!=null){
|
|
|
|
|
|
|
|
|
|
if (user!=null) {
|
|
|
|
|
bookmark.setOwner(user.getUserName());
|
|
|
|
|
}
|
|
|
|
|
if((post.get("public")).equals("public")){
|
|
|
|
|
|
|
|
|
|
if ((post.get("public")).equals("public")) {
|
|
|
|
|
bookmark.setPublic(true);
|
|
|
|
|
publishNews(url, title, description, tagsString);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
bookmark.setPublic(false);
|
|
|
|
|
}
|
|
|
|
|
if(post.containsKey("feed") && (post.get("feed")).equals("feed")){
|
|
|
|
|
|
|
|
|
|
if(post.containsKey("feed") && ("feed".equals(post.get("feed")))){
|
|
|
|
|
bookmark.setFeed(true);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
bookmark.setFeed(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bookmark.setTags(tags, true);
|
|
|
|
|
sb.bookmarksDB.saveBookmark(bookmark);
|
|
|
|
|
//}else{
|
|
|
|
|
//ERROR
|
|
|
|
|
}
|
|
|
|
|
}else if(post.containsKey("edit")){
|
|
|
|
|
final String urlHash=post.get("edit");
|
|
|
|
|
|
|
|
|
|
} else if (post.containsKey("edit")) {
|
|
|
|
|
final String urlHash = post.get("edit");
|
|
|
|
|
prop.put("mode", "2");
|
|
|
|
|
prop.put("display", "1");
|
|
|
|
|
display = 1;
|
|
|
|
@ -188,11 +196,9 @@ public class Bookmarks {
|
|
|
|
|
if (bookmark == null) {
|
|
|
|
|
// try to get the bookmark from the LURL database
|
|
|
|
|
final URIMetadataRow urlentry = sb.indexSegments.urlMetadata(Segments.Process.PUBLIC).load(urlHash.getBytes(), null, 0);
|
|
|
|
|
Document[] documents = null;
|
|
|
|
|
if (urlentry != null) try {
|
|
|
|
|
final URIMetadataRow.Components metadata = urlentry.metadata();
|
|
|
|
|
documents = sb.loader.loadDocuments(sb.loader.request(metadata.url(), true, false), CrawlProfile.CacheStrategy.IFEXIST, 5000, Long.MAX_VALUE);
|
|
|
|
|
Document document = Document.mergeDocuments(metadata.url(), null, documents);
|
|
|
|
|
final Document document = Document.mergeDocuments(metadata.url(), null, sb.loader.loadDocuments(sb.loader.request(metadata.url(), true, false), CrawlProfile.CacheStrategy.IFEXIST, 5000, Long.MAX_VALUE));
|
|
|
|
|
prop.put("mode_edit", "0"); // create mode
|
|
|
|
|
prop.put("mode_url", metadata.url().toNormalform(false, true));
|
|
|
|
|
prop.putHTML("mode_title", metadata.dc_title());
|
|
|
|
@ -211,11 +217,13 @@ public class Bookmarks {
|
|
|
|
|
prop.put("mode_url", bookmark.getUrl()); //TODO: XSS protection - how is this stored?
|
|
|
|
|
prop.putHTML("mode_tags", bookmark.getTagsString());
|
|
|
|
|
prop.putHTML("mode_path",bookmark.getFoldersString());
|
|
|
|
|
|
|
|
|
|
if (bookmark.getPublic()) {
|
|
|
|
|
prop.put("mode_public", "1");
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("mode_public", "0");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bookmark.getFeed()) {
|
|
|
|
|
prop.put("mode_feed", "1");
|
|
|
|
|
} else {
|
|
|
|
@ -224,38 +232,44 @@ public class Bookmarks {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if(post.containsKey("htmlfile")){
|
|
|
|
|
boolean isPublic=false;
|
|
|
|
|
if((post.get("public")).equals("public")){
|
|
|
|
|
isPublic=true;
|
|
|
|
|
}
|
|
|
|
|
String tags=post.get("tags");
|
|
|
|
|
if(tags.equals("")){
|
|
|
|
|
final boolean isPublic = "public".equals(post.get("public"));
|
|
|
|
|
|
|
|
|
|
String tags = post.get("tags");
|
|
|
|
|
if("".equals(tags)){
|
|
|
|
|
tags="unsorted";
|
|
|
|
|
}
|
|
|
|
|
Log.logInfo("BOOKMARKS", "I try to import bookmarks from HTML-file");
|
|
|
|
|
|
|
|
|
|
Log.logInfo("BOOKMARKS", "Trying to import bookmarks from HTML-file");
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
final File file=new File(post.get("htmlfile"));
|
|
|
|
|
BookmarkHelper.importFromBookmarks(sb.bookmarksDB, new DigestURI(file), post.get("htmlfile$file"), tags, isPublic);
|
|
|
|
|
} catch (final MalformedURLException e) {}
|
|
|
|
|
|
|
|
|
|
Log.logInfo("BOOKMARKS", "success!!");
|
|
|
|
|
}else if(post.containsKey("xmlfile")){
|
|
|
|
|
boolean isPublic=false;
|
|
|
|
|
if((post.get("public")).equals("public")){
|
|
|
|
|
isPublic=true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (post.containsKey("xmlfile")) {
|
|
|
|
|
|
|
|
|
|
final boolean isPublic = "public".equals(post.get("public"));
|
|
|
|
|
BookmarkHelper.importFromXML(sb.bookmarksDB, post.get("xmlfile$file"), isPublic);
|
|
|
|
|
}else if(post.containsKey("delete")){
|
|
|
|
|
|
|
|
|
|
} else if (post.containsKey("delete")) {
|
|
|
|
|
|
|
|
|
|
final String urlHash=post.get("delete");
|
|
|
|
|
sb.bookmarksDB.removeBookmark(urlHash);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(post.containsKey("tag")){
|
|
|
|
|
tagName=post.get("tag");
|
|
|
|
|
|
|
|
|
|
if (post.containsKey("tag")) {
|
|
|
|
|
tagName = post.get("tag");
|
|
|
|
|
}
|
|
|
|
|
if(post.containsKey("start")){
|
|
|
|
|
start=Integer.parseInt(post.get("start"));
|
|
|
|
|
|
|
|
|
|
if (post.containsKey("start")) {
|
|
|
|
|
start = Integer.parseInt(post.get("start"));
|
|
|
|
|
}
|
|
|
|
|
if(post.containsKey("num")){
|
|
|
|
|
max_count=Integer.parseInt(post.get("num"));
|
|
|
|
|
|
|
|
|
|
if (post.containsKey("num")) {
|
|
|
|
|
max_count = Integer.parseInt(post.get("num"));
|
|
|
|
|
}
|
|
|
|
|
} // END if(post != null)
|
|
|
|
|
|
|
|
|
@ -270,39 +284,36 @@ public class Bookmarks {
|
|
|
|
|
//-----------------------
|
|
|
|
|
// create bookmark list
|
|
|
|
|
//-----------------------
|
|
|
|
|
int count=0;
|
|
|
|
|
int count = 0;
|
|
|
|
|
Iterator<String> it = null;
|
|
|
|
|
BookmarksDB.Bookmark bookmark;
|
|
|
|
|
Set<String> tags;
|
|
|
|
|
Iterator<String> tagsIt;
|
|
|
|
|
int tagCount;
|
|
|
|
|
|
|
|
|
|
prop.put("display_num-bookmarks", sb.bookmarksDB.bookmarksSize());
|
|
|
|
|
|
|
|
|
|
count=0;
|
|
|
|
|
if(!tagName.equals("")){
|
|
|
|
|
if(!"".equals(tagName)){
|
|
|
|
|
prop.put("display_selected", "");
|
|
|
|
|
it=sb.bookmarksDB.getBookmarksIterator(tagName, isAdmin);
|
|
|
|
|
}else{
|
|
|
|
|
it = sb.bookmarksDB.getBookmarksIterator(tagName, isAdmin);
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("display_selected", " selected=\"selected\"");
|
|
|
|
|
it=sb.bookmarksDB.getBookmarksIterator(isAdmin);
|
|
|
|
|
it = sb.bookmarksDB.getBookmarksIterator(isAdmin);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//skip the first entries (display next page)
|
|
|
|
|
count=0;
|
|
|
|
|
count = 0;
|
|
|
|
|
while(count < start && it.hasNext()){
|
|
|
|
|
it.next();
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
count=0;
|
|
|
|
|
while(count<max_count && it.hasNext()){
|
|
|
|
|
bookmark=sb.bookmarksDB.getBookmark(it.next());
|
|
|
|
|
if(bookmark!=null){
|
|
|
|
|
if(bookmark.getFeed() && isAdmin)
|
|
|
|
|
count = 0;
|
|
|
|
|
while(count < max_count && it.hasNext()) {
|
|
|
|
|
final Bookmark bookmark = sb.bookmarksDB.getBookmark(it.next());
|
|
|
|
|
|
|
|
|
|
if (bookmark != null){
|
|
|
|
|
if (bookmark.getFeed() && isAdmin) {
|
|
|
|
|
prop.put("display_bookmarks_"+count+"_link", "/FeedReader_p.html?url="+bookmark.getUrl());
|
|
|
|
|
else
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("display_bookmarks_"+count+"_link",bookmark.getUrl());
|
|
|
|
|
}
|
|
|
|
|
prop.putHTML("display_bookmarks_"+count+"_title", bookmark.getTitle());
|
|
|
|
|
prop.putHTML("display_bookmarks_"+count+"_description", bookmark.getDescription());
|
|
|
|
|
prop.put("display_bookmarks_"+count+"_date", DateFormatter.formatISO8601(new Date(bookmark.getTimeStamp())));
|
|
|
|
@ -310,13 +321,11 @@ public class Bookmarks {
|
|
|
|
|
prop.put("display_bookmarks_"+count+"_public", (bookmark.getPublic() ? "1" : "0"));
|
|
|
|
|
|
|
|
|
|
//List Tags.
|
|
|
|
|
tags=bookmark.getTags();
|
|
|
|
|
tagsIt=tags.iterator();
|
|
|
|
|
tagCount=0;
|
|
|
|
|
while (tagsIt.hasNext()) {
|
|
|
|
|
final String tname = tagsIt.next();
|
|
|
|
|
if (tname.length() > 0 && tname.charAt(0) != '/') {
|
|
|
|
|
prop.putHTML("display_bookmarks_"+count+"_tags_"+tagCount+"_tag", tname);
|
|
|
|
|
final Set<String> tags = bookmark.getTags();
|
|
|
|
|
int tagCount=0;
|
|
|
|
|
for (final String tag : tags) {
|
|
|
|
|
if (tag.length() > 0 && tag.charAt(0) != '/') {
|
|
|
|
|
prop.putHTML("display_bookmarks_" + count + "_tags_" + tagCount + "_tag", tag);
|
|
|
|
|
tagCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -325,18 +334,20 @@ public class Bookmarks {
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
prop.putHTML("display_tag", tagName);
|
|
|
|
|
prop.put("display_start", start);
|
|
|
|
|
if(it.hasNext()){
|
|
|
|
|
|
|
|
|
|
if (it.hasNext()) {
|
|
|
|
|
prop.put("display_next-page", "1");
|
|
|
|
|
prop.put("display_next-page_start", start+max_count);
|
|
|
|
|
prop.putHTML("display_next-page_tag", tagName);
|
|
|
|
|
prop.put("display_next-page_num", max_count);
|
|
|
|
|
}
|
|
|
|
|
if(start >= max_count){
|
|
|
|
|
start=start-max_count;
|
|
|
|
|
if(start <0){
|
|
|
|
|
start=0;
|
|
|
|
|
if (start >= max_count) {
|
|
|
|
|
start = start-max_count;
|
|
|
|
|
if (start <0){
|
|
|
|
|
start = 0;
|
|
|
|
|
}
|
|
|
|
|
prop.put("display_prev-page", "1");
|
|
|
|
|
prop.put("display_prev-page_start", start);
|
|
|
|
@ -359,22 +370,23 @@ public class Bookmarks {
|
|
|
|
|
|
|
|
|
|
private static void printTagList(final String id, final String tagName, final int comp, final int max, final boolean opt){
|
|
|
|
|
int count=0;
|
|
|
|
|
BookmarksDB.Tag tag;
|
|
|
|
|
Iterator<BookmarksDB.Tag> it = null;
|
|
|
|
|
|
|
|
|
|
if (tagName.equals("")) {
|
|
|
|
|
final Iterator<BookmarksDB.Tag> it;
|
|
|
|
|
|
|
|
|
|
if ("".equals(tagName)) {
|
|
|
|
|
it = sb.bookmarksDB.getTagIterator(isAdmin, comp, max);
|
|
|
|
|
} else {
|
|
|
|
|
it = sb.bookmarksDB.getTagIterator(tagName, isAdmin, comp, max);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while(it.hasNext()){
|
|
|
|
|
tag=it.next();
|
|
|
|
|
if ((!tag.getTagName().startsWith("/")) && (!tag.getTagName().equals(""))) {
|
|
|
|
|
final Tag tag = it.next();
|
|
|
|
|
if (!tag.getTagName().startsWith("/") && !"".equals(tag.getTagName())) {
|
|
|
|
|
prop.putHTML("display_"+id+"_"+count+"_name", tag.getFriendlyName());
|
|
|
|
|
prop.putHTML("display_"+id+"_"+count+"_tag", tag.getTagName());
|
|
|
|
|
prop.put("display_"+id+"_"+count+"_num", tag.size());
|
|
|
|
|
if (opt){
|
|
|
|
|
if(tagName.equals(tag.getFriendlyName())){
|
|
|
|
|
if (opt) {
|
|
|
|
|
if (tag.getFriendlyName().equals(tagName)){
|
|
|
|
|
prop.put("display_"+id+"_"+count+"_selected", " selected=\"selected\"");
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("display_"+id+"_"+count+"_selected", "");
|
|
|
|
@ -389,16 +401,13 @@ public class Bookmarks {
|
|
|
|
|
prop.put("display_"+id, count);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static int recurseFolders(final Iterator<String> it, String root, int count, final boolean next, final String prev){
|
|
|
|
|
String fn="";
|
|
|
|
|
BookmarksDB.Bookmark bookmark;
|
|
|
|
|
private static int recurseFolders(final Iterator<String> it, String root, int count, final boolean next, final String prev) {
|
|
|
|
|
|
|
|
|
|
if (next) fn = it.next();
|
|
|
|
|
else fn = prev;
|
|
|
|
|
final String fn = (next) ? it.next() : prev;
|
|
|
|
|
|
|
|
|
|
if(fn.equals("\uffff")) {
|
|
|
|
|
if("\uffff".equals(fn)) {
|
|
|
|
|
int i = prev.replaceAll("[^/]","").length();
|
|
|
|
|
while(i>0){
|
|
|
|
|
while( i>0 ){
|
|
|
|
|
prop.put("display_folderlist_"+count+"_folder", "</ul></li>");
|
|
|
|
|
count++;
|
|
|
|
|
i--;
|
|
|
|
@ -406,24 +415,31 @@ public class Bookmarks {
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(fn.startsWith((root.equals("/") ? root : root+"/"))){
|
|
|
|
|
if (fn.startsWith((root.equals("/") ? root : root+"/"))) {
|
|
|
|
|
prop.put("display_folderlist_"+count+"_folder", "<li>"+fn.replaceFirst(root+"/*","")+"<ul class=\"folder\">");
|
|
|
|
|
count++;
|
|
|
|
|
final Iterator<String> bit=sb.bookmarksDB.getBookmarksIterator(fn, isAdmin);
|
|
|
|
|
while(bit.hasNext()){
|
|
|
|
|
bookmark=sb.bookmarksDB.getBookmark(bit.next());
|
|
|
|
|
if(bookmark == null) break;
|
|
|
|
|
prop.put("display_folderlist_"+count+"_folder", "<li><a href=\""+bookmark.getUrl()+"\" title=\""+bookmark.getDescription()+"\">"+ bookmark.getTitle()+"</a></li>");
|
|
|
|
|
final Iterator<String> bit = sb.bookmarksDB.getBookmarksIterator(fn, isAdmin);
|
|
|
|
|
|
|
|
|
|
while (bit.hasNext()) {
|
|
|
|
|
Bookmark bookmark=sb.bookmarksDB.getBookmark(bit.next());
|
|
|
|
|
if(bookmark == null) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
prop.put("display_folderlist_" + count + "_folder", "<li><a href=\"" + bookmark.getUrl() + "\" title=\"" + bookmark.getDescription() + "\">" + bookmark.getTitle() + "</a></li>");
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
if(it.hasNext()){
|
|
|
|
|
|
|
|
|
|
if (it.hasNext()) {
|
|
|
|
|
count = recurseFolders(it, fn, count, true, fn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
prop.put("display_folderlist_"+count+"_folder", "</ul></li>");
|
|
|
|
|
count++;
|
|
|
|
|
root = root.replaceAll("(/.[^/]*$)", "");
|
|
|
|
|
if(root.equals("")) root = "/";
|
|
|
|
|
if ("".equals(root)) {
|
|
|
|
|
root = "/";
|
|
|
|
|
}
|
|
|
|
|
count = recurseFolders(it, root, count, false, fn);
|
|
|
|
|
}
|
|
|
|
|
return count;
|
|
|
|
@ -431,7 +447,7 @@ public class Bookmarks {
|
|
|
|
|
|
|
|
|
|
private static void publishNews(final String url, final String title, final String description, final String tagsString) {
|
|
|
|
|
// create a news message
|
|
|
|
|
final HashMap<String, String> map = new HashMap<String, String>();
|
|
|
|
|
final Map<String, String> map = new HashMap<String, String>();
|
|
|
|
|
map.put("url", url.replace(',', '|'));
|
|
|
|
|
map.put("title", title.replace(',', ' '));
|
|
|
|
|
map.put("description", description.replace(',', ' '));
|
|
|
|
|