Author: xor
Date: 2008-11-08 01:51:12 +0000 (Sat, 08 Nov 2008)
New Revision: 23405

Modified:
   trunk/plugins/WoT/WoT.java
Log:
Make it fit the needs of FT.

Modified: trunk/plugins/WoT/WoT.java
===================================================================
--- trunk/plugins/WoT/WoT.java  2008-11-08 01:50:54 UTC (rev 23404)
+++ trunk/plugins/WoT/WoT.java  2008-11-08 01:51:12 UTC (rev 23405)
@@ -583,11 +583,18 @@
                String context = params.get("Context");
                boolean getAll = context.equals("all");

-               for(int i = 1 ; result.hasNext() ; i++) {
+               for(int idx = 1 ; result.hasNext() ; idx++) {
                        Score score = result.next();
                        // TODO: Maybe there is a way to do this through SODA
-                       if(getAll || score.getTarget().hasContext(context))
-                               sfs.putAppend("Identity"+i, 
score.getTarget().getRequestURI().toString());
+                       if(getAll || score.getTarget().hasContext(context)) {
+                               Identity id = score.getTarget();
+                               /* FIXME: Isn't append slower than replace? 
Figure this out */
+                               sfs.putAppend("Identity"+idx, id.getId());
+                               sfs.putAppend("RequestURI"+idx, 
id.getRequestURI().toString());
+                               sfs.putAppend("Nickname"+idx, id.getNickName());
+                               
+                               /* FIXME: Allow the client to select what data 
he wants */
+                       }
                }
                return sfs;
        }


Reply via email to