Author: bombe
Date: 2006-08-11 08:24:23 +0000 (Fri, 11 Aug 2006)
New Revision: 10039

Modified:
   trunk/freenet/src/freenet/clients/http/QueueToadlet.java
Log:
change compression option on the queue page

Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-08-11 
00:29:00 UTC (rev 10038)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-08-11 
08:24:23 UTC (rev 10039)
@@ -160,13 +160,13 @@
                                        writeError("No file selected", "You did 
not select a file to upload.", ctx);
                                        return;
                                }
-                               boolean dontCompress = 
request.getPartAsString("dontCompress", 128).length() > 0;
+                               boolean compress = 
request.getPartAsString("compress", 128).length() > 0;
                                String identifier = file.getFilename() + 
"-fred-" + System.currentTimeMillis();
                                /* copy bucket data */
                                Bucket copiedBucket = 
node.persistentEncryptedTempBucketFactory.makeBucket(file.getData().size());
                                BucketTools.copy(file.getData(), copiedBucket);
                                try {
-                                       ClientPut clientPut = new 
ClientPut(fcp.getGlobalClient(), insertURI, identifier, Integer.MAX_VALUE, 
RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, ClientRequest.PERSIST_FOREVER, 
null, false, dontCompress, -1, ClientPutMessage.UPLOAD_FROM_DIRECT, new 
File(file.getFilename()), file.getContentType(), copiedBucket, null);
+                                       ClientPut clientPut = new 
ClientPut(fcp.getGlobalClient(), insertURI, identifier, Integer.MAX_VALUE, 
RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, ClientRequest.PERSIST_FOREVER, 
null, false, !compress, -1, ClientPutMessage.UPLOAD_FROM_DIRECT, new 
File(file.getFilename()), file.getContentType(), copiedBucket, null);
                                        clientPut.start();
                                        fcp.forceStorePersistentRequests();
                                } catch (IdentifierCollisionException e) {
@@ -663,8 +663,8 @@
                insertForm.addChild("#", " \u00a0 File: ");
                insertForm.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "file", "filename", "" });
                insertForm.addChild("#", " \u00a0 ");
-               insertForm.addChild("input", new String[] { "type", "name", 
"checked" }, new String[] { "checkbox", "dontCompress", "checked" });
-               insertForm.addChild("#", " Don\u2019t compress \u00a0 ");
+               insertForm.addChild("input", new String[] { "type", "name" }, 
new String[] { "checkbox", "compress" });
+               insertForm.addChild("#", " Compress \u00a0 ");
                insertForm.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "submit", "insert", "Insert file" });
                insertForm.addChild("#", " \u00a0 ");
                insertForm.addChild("input", new String[] { "type", "name" }, 
new String[] { "reset", "Reset form" });


Reply via email to