Author: xor
Date: 2008-01-17 13:11:12 +0000 (Thu, 17 Jan 2008)
New Revision: 17091

Modified:
   trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
Log:
When creating "Add this to your bookmarks" links, allow Freesite creators to 
tell the node that the site has an activelink by passing 
"hasAnActivelink=true", for example:

http://127.0.0.1:8888/?newbookmark=freenet:USK at 
usk_here/title_here/-1/&desc=description_here&hasAnActivelink=true

Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2008-01-17 
12:40:29 UTC (rev 17090)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2008-01-17 
13:11:12 UTC (rev 17091)
@@ -469,6 +469,9 @@
                     key = key.substring(8);
                 }
                 addForm.addChild("input", new String[]{"type", "name", 
"value"}, new String[]{"hidden", "key", key});
+                if(request.isParameterSet("hasAnActivelink")) {
+                       addForm.addChild("input", new String[]{"type", "name", 
"value"}, new 
String[]{"hidden","hasAnActivelink",request.getParam("hasAnActivelink")});
+                }
                 addForm.addChild("input", new String[]{"type", "name", 
"value"}, new String[]{"text", "name", request.getParam("desc")});
                 addForm.addChild("input", new String[]{"type", "name", 
"value"}, new String[]{"hidden", "bookmark", "/"});
                 addForm.addChild("input", new String[]{"type", "name", 
"value"}, new String[]{"hidden", "action", "addItem"});


Reply via email to