diff --git a/htroot/xml/bookmarks/posts/all.java b/htroot/xml/bookmarks/posts/all.java index d6c6a7cc4..0a913880b 100644 --- a/htroot/xml/bookmarks/posts/all.java +++ b/htroot/xml/bookmarks/posts/all.java @@ -62,12 +62,17 @@ public class all { plasmaSwitchboard switchboard = (plasmaSwitchboard) env; boolean isAdmin=switchboard.verifyAuthentication(header, true); serverObjects prop = new serverObjects(); + Iterator it; if(post != null && post.containsKey("tag")){ it=switchboard.bookmarksDB.getBookmarksIterator((String) post.get("tag"), isAdmin); }else{ it=switchboard.bookmarksDB.getBookmarksIterator(isAdmin); } + + // if an extended xml should be used + boolean extendedXML = (post != null && post.containsKey("extendedXML")); + int count=0; bookmarksDB.Bookmark bookmark; Date date; @@ -80,6 +85,12 @@ public class all { date=new Date(bookmark.getTimeStamp()); prop.putSafeXML("posts_"+count+"_time", serverDate.dateToiso8601(date)); prop.putSafeXML("posts_"+count+"_tags", bookmark.getTagsString().replaceAll(","," ")); + + // additional XML tags + prop.put("posts_"+count+"_isExtended",extendedXML ? 1:0); + if (extendedXML) { + prop.putSafeXML("posts_"+count+"_isExtended_private", Boolean.toString(!bookmark.getPublic())); + } count++; } prop.put("posts", count); diff --git a/htroot/xml/bookmarks/posts/all.xml b/htroot/xml/bookmarks/posts/all.xml index d8ee63347..2ba48d82c 100644 --- a/htroot/xml/bookmarks/posts/all.xml +++ b/htroot/xml/bookmarks/posts/all.xml @@ -1,5 +1,5 @@ -#{posts}# +#{posts}# #{/posts}# diff --git a/htroot/xml/bookmarks/posts/get.java b/htroot/xml/bookmarks/posts/get.java index bb3a0b8ae..3d9d4eb80 100644 --- a/htroot/xml/bookmarks/posts/get.java +++ b/htroot/xml/bookmarks/posts/get.java @@ -50,6 +50,10 @@ public class get { }else{ date=serverDate.dateToiso8601(new Date(System.currentTimeMillis())); } + + // if an extended xml should be used + boolean extendedXML = (post != null && post.containsKey("extendedXML")); + int count=0; Date parsedDate = null; @@ -73,6 +77,12 @@ public class get { prop.putSafeXML("posts_"+count+"_md5", serverCodings.encodeMD5Hex(bookmark.getUrl())); prop.putSafeXML("posts_"+count+"_time", date); prop.putSafeXML("posts_"+count+"_tags", bookmark.getTagsString().replaceAll(","," ")); + + // additional XML tags + prop.put("posts_"+count+"_isExtended",extendedXML ? 1:0); + if (extendedXML) { + prop.putSafeXML("posts_"+count+"_isExtended_private", Boolean.toString(!bookmark.getPublic())); + } count++; } } diff --git a/htroot/xml/bookmarks/posts/get.xml b/htroot/xml/bookmarks/posts/get.xml index 35c36b32a..2760c4ca5 100644 --- a/htroot/xml/bookmarks/posts/get.xml +++ b/htroot/xml/bookmarks/posts/get.xml @@ -1,5 +1,5 @@ -#{posts}# +#{posts}# #{/posts}# \ No newline at end of file diff --git a/source/de/anomic/soap/services/BookmarkService.java b/source/de/anomic/soap/services/BookmarkService.java index dfed25a43..afbe92421 100644 --- a/source/de/anomic/soap/services/BookmarkService.java +++ b/source/de/anomic/soap/services/BookmarkService.java @@ -415,6 +415,7 @@ public class BookmarkService extends AbstractService { // generating the template containing the network status information serverObjects args = new serverObjects(); + args.put("extendedXML", ""); if (tag != null) args.put("tag",tag); if (date != null) args.put("date",date);