Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Description Field
allo4c824cacba13
diff --git a/htroot/Bookmarks_p.html b/htroot/Bookmarks_p.htmlindex 87141f4b9..decc680c1 100644--- a/htroot/Bookmarks_p.html+++ b/htroot/Bookmarks_p.html@@ -15,6 +15,7 @@<form action="Bookmarks_p.html" method="GET">Url: <input type="text" name="url" value="#[url]#"><br />Title: <input type="text" name="title" value="#[title]#"><br />+Description: <input type="text" name="description" value="#[description]#"><br />Tags(comma separated): <input type="text" name="tags" value="#[tags]#"><br />Public: <select name="public"><option value="public" #(public)#::selected#(/public)#>yes</option>@@ -31,7 +32,8 @@ Public: <select name="public"><td width="100%">#{bookmarks}#<a href="#[link]#" target="_blank">#[title]#</a><br />-Tagged with #[tags]#. <br />+#[description]#<br />+Tagged with <span class="bookmarkTags">#[tags]#</span>. <br /><a href="Bookmarks_p.html?edit=#[hash]#">Edit</a> /<a href="Bookmarks_p.html?delete=#[hash]#">Delete</a><p />diff --git a/htroot/Bookmarks_p.java b/htroot/Bookmarks_p.javaindex c80a21cfc..d5484b1c5 100644--- a/htroot/Bookmarks_p.java+++ b/htroot/Bookmarks_p.java@@ -65,6 +65,7 @@ public class Bookmarks_p {//defaultvaluesprop.put("edit", 0);prop.put("title", "");+ prop.put("description", "");prop.put("url", "");prop.put("tags", "");prop.put("public", 1); //1=is public@@ -72,6 +73,7 @@ public class Bookmarks_p {if(post.containsKey("add")){ //add an EntryString url=(String) post.get("url");String title=(String) post.get("title");+ String description=(String) post.get("description");String tagsString = (String)post.get("tags");if(tagsString.equals("")){tagsString="unsorted"; //defaulttag@@ -85,6 +87,7 @@ public class Bookmarks_p {bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.createBookmark(url);if(bookmark != null){bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_TITLE, title);+ bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_DESCRIPTION, description);bookmark.setProperty(bookmarksDB.Bookmark.BOOKMARK_PUBLIC, (String) post.get("public"));bookmark.setTags(tags);bookmark.setBookmarksTable();@@ -97,6 +100,7 @@ public class Bookmarks_p {bookmarksDB.Bookmark bookmark = switchboard.bookmarksDB.getBookmark(urlHash);prop.put("edit", 1); //edit modeprop.put("title", bookmark.getTitle());+ prop.put("description", bookmark.getDescription());prop.put("url", bookmark.getUrl());prop.put("tags", bookmark.getTags());if(bookmark.getPublic()){@@ -142,6 +146,7 @@ public class Bookmarks_p {if(bookmark!=null){prop.put("bookmarks_"+count+"_link", bookmark.getUrl());prop.put("bookmarks_"+count+"_title", bookmark.getTitle());+ prop.put("bookmarks_"+count+"_description", bookmark.getDescription());prop.put("bookmarks_"+count+"_tags", bookmark.getTags());prop.put("bookmarks_"+count+"_hash", bookmark.getUrlHash());count++;diff --git a/htroot/env/style.css b/htroot/env/style.cssindex e0a1761e0..0e8d0ef23 100644--- a/htroot/env/style.css+++ b/htroot/env/style.css@@ -168,3 +168,6 @@ background-color: #eeeeee;.MessageBackground {background-color: #eeeeee;}+.bookmarkTags{+color: blue;+}diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.javaindex fa2e51281..207b7121f 100644--- a/source/de/anomic/data/bookmarksDB.java+++ b/source/de/anomic/data/bookmarksDB.java@@ -324,6 +324,7 @@ public class bookmarksDB {public class Bookmark{public static final String BOOKMARK_URL="bookmarkUrl";public static final String BOOKMARK_TITLE="bookmarkTitle";+ public static final String BOOKMARK_DESCRIPTION="bookmarkDesc";public static final String BOOKMARK_TAGS="bookmarkTags";public static final String BOOKMARK_PUBLIC="bookmarkPublic";public static final String BOOKMARK_TIMESTAMP="bookmarkTimestamp";@@ -375,6 +376,12 @@ public class bookmarksDB {}return "";}+ public String getDescription(){+ if(this.mem.containsKey(BOOKMARK_DESCRIPTION)){+ return (String) this.mem.get(BOOKMARK_DESCRIPTION);+ }+ return "";+ }public String getTitle(){if(this.mem.containsKey(BOOKMARK_TITLE)){return (String) this.mem.get(BOOKMARK_TITLE);