|
|
|
@ -593,18 +593,20 @@ public class yacysearch {
|
|
|
|
|
//final String bookmarkHash = post.get("bookmarkref", ""); // urlhash
|
|
|
|
|
final String urlstr = crypt.simpleDecode(post.get("bookmarkurl"));
|
|
|
|
|
if (urlstr != null) {
|
|
|
|
|
try {
|
|
|
|
|
final Bookmark bmk = sb.bookmarksDB.createorgetBookmark(urlstr, YMarkTables.USER_ADMIN);
|
|
|
|
|
if (bmk != null) {
|
|
|
|
|
bmk.setProperty(Bookmark.BOOKMARK_QUERY, querystring);
|
|
|
|
|
bmk.addTag("/search"); // add to bookmark folder
|
|
|
|
|
bmk.addTag("searchresult"); // add tag
|
|
|
|
|
String urlhash = post.get("bookmarkref");
|
|
|
|
|
final URIMetadataNode urlentry = indexSegment.fulltext().getMetadata(UTF8.getBytes(urlhash));
|
|
|
|
|
if (urlentry != null && !urlentry.dc_title().isEmpty())
|
|
|
|
|
if (urlentry != null && !urlentry.dc_title().isEmpty()) {
|
|
|
|
|
bmk.setProperty(Bookmark.BOOKMARK_TITLE, urlentry.dc_title());
|
|
|
|
|
}
|
|
|
|
|
sb.bookmarksDB.saveBookmark(bmk);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// do the same for YMarks ?
|
|
|
|
|
try {
|
|
|
|
|
sb.tables.bookmarks.createBookmark(
|
|
|
|
|
sb.loader,
|
|
|
|
|
urlstr,
|
|
|
|
|