Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

tagView

allod0d1855520eb
diff --git a/htroot/Bookmarks_p.java b/htroot/Bookmarks_p.java
index 1a96120d3..d44f50890 100644
--- a/htroot/Bookmarks_p.java
+++ b/htroot/Bookmarks_p.java
@@ -62,6 +62,7 @@ public class Bookmarks_p {
int MAX_COUNT=10; //TODO: Changeable per Interface
String tag="";
int start=0;
+ Vector tagUrlHashes=null;
if(post != null){
if(post.containsKey("add")){ //add an Entry
@@ -98,8 +99,11 @@ public class Bookmarks_p {
}
prop.put("tags", count);
count=0;
+ boolean viewTag=false;
if(!tag.equals("")){
- it=switchboard.bookmarksDB.getTag(tag).iterator();
+ tagUrlHashes=switchboard.bookmarksDB.getTag(tag).getUrlHashes();
+ it=tagUrlHashes.iterator();
+ viewTag=true;
}else{
it=switchboard.bookmarksDB.bookmarkIterator(true);
}
@@ -112,7 +116,11 @@ public class Bookmarks_p {
}
count=0;
while(count<MAX_COUNT && it.hasNext()){
- bookmark=(Bookmark) it.next();
+ if(viewTag){
+ bookmark=switchboard.bookmarksDB.getBookmark((String)it.next());
+ }else{
+ bookmark=(Bookmark) it.next();
+ }
if(bookmark!=null){
prop.put("bookmarks_"+count+"_link", bookmark.getUrl());
prop.put("bookmarks_"+count+"_title", bookmark.getTitle());
diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java
index 9cf8458e1..e86e7e985 100644
--- a/source/de/anomic/data/bookmarksDB.java
+++ b/source/de/anomic/data/bookmarksDB.java
@@ -126,6 +126,7 @@ public class bookmarksDB {
ret.copyInto(string.split(","));
}else{
ret = new Vector();
+ ret.add(string);
}
return ret;
}
@@ -239,9 +240,6 @@ public class bookmarksDB {
bookmarksDB.this.tagsTable.set(getTagName(), mem);
} catch (IOException e) {}
}
- public Iterator iterator(){
- return string2vector((String) this.mem.get(URL_HASHES)).iterator();
- }
}
/**
* Subclass, which stores the bookmark