Skip to content

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

update for api/bookmarks/get_folders

apfelmaennchen7a159dc745a7
diff --git a/htroot/api/bookmarks/get_folders.java b/htroot/api/bookmarks/get_folders.java
index f9e0e4895..b3e97938a 100644
--- a/htroot/api/bookmarks/get_folders.java
+++ b/htroot/api/bookmarks/get_folders.java
@@ -59,8 +59,9 @@ public class get_folders {
if (foldername.length == n+1) {
prop.put("folders_"+count+"_foldername", foldername[n]);
prop.put("folders_"+count+"_expanded", "false");
- prop.put("folders_"+count+"_classes", "folder");
+ prop.put("folders_"+count+"_type", "folder");
prop.put("folders_"+count+"_hash", folder); //TODO: switch from pathString to folderHash
+ prop.put("folders_"+count+"_url", ""); //TODO: insert folder url
prop.put("folders_"+count+"_hasChildren", "true"); //TODO: determine if folder has children
prop.put("folders_"+count+"_comma", ",");
count++;
@@ -72,6 +73,7 @@ public class get_folders {
bookmarksDB.Bookmark bm;
while (it.hasNext()) {
bm = sb.bookmarksDB.getBookmark(it.next());
+ // TODO: get rid of bmtype
if (post.containsKey("bmtype")) {
if (post.get("bmtype").equals("title")) {
prop.put("folders_"+count+"_foldername", bm.getTitle());
@@ -82,7 +84,8 @@ public class get_folders {
}
}
prop.put("folders_"+count+"_expanded", "false");
- prop.put("folders_"+count+"_classes", "file");
+ prop.put("folders_"+count+"_url", bm.getUrl());
+ prop.put("folders_"+count+"_type", "file");
prop.put("folders_"+count+"_hash", bm.getUrlHash());
prop.put("folders_"+count+"_hasChildren", "false");
prop.put("folders_"+count+"_comma", ",");
diff --git a/htroot/api/bookmarks/get_folders.json b/htroot/api/bookmarks/get_folders.json
index 239901dcf..18db82c99 100644
--- a/htroot/api/bookmarks/get_folders.json
+++ b/htroot/api/bookmarks/get_folders.json
@@ -2,7 +2,7 @@
#{folders}#{
"text": "#[foldername]#",
"expanded": #[expanded]#,
-"classes": "#[classes]#",
+"classes": "#[type]#",
"id": "#[hash]#",
"hasChildren": #[hasChildren]#
}#[comma]##{/folders}#