Author: toad
Date: 2007-04-26 16:25:31 +0000 (Thu, 26 Apr 2007)
New Revision: 12987
Modified:
trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
Log:
Fix bookmark update checking... hopefully
Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
2007-04-26 16:23:34 UTC (rev 12986)
+++ trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
2007-04-26 16:25:31 UTC (rev 12987)
@@ -238,16 +238,23 @@
return null;
}
- public void addBookmark (String parentPath, Bookmark b,
+ public void addBookmark (String parentPath, Bookmark bookmark,
boolean store) throws NullPointerException {
BookmarkCategory parent = getCategoryByPath (parentPath);
if (parent == null)
throw new NullPointerException ();
else {
- parent.addBookmark (b);
- putPaths(parentPath + b.getName () + ((b instanceof BookmarkCategory) ?
"/" : ""), b);
+ parent.addBookmark (bookmark);
+ putPaths(parentPath + bookmark.getName () + ((bookmark instanceof
BookmarkCategory) ? "/" : ""), bookmark);
-
+ if (((BookmarkItem) bookmark).getKeyType ().equals ("USK")) {
+ try {
+ USK u = ((BookmarkItem) bookmark).getUSK ();
+ this.node.uskManager.subscribe (u, this.uskcb, true, this);
+ }
+ catch (MalformedURLException mue) {
+ }
+ }
}
if (store)
node.storeConfig ();