Author: dieppe
Date: 2008-03-12 06:04:40 +0000 (Wed, 12 Mar 2008)
New Revision: 18482

Modified:
   trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java
Log:
Visualisation is *now* functionnal : we now increment the edition number 
just before the publish process, not after (that's make sense...).



Modified: 
trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java
===================================================================
--- trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java 
2008-03-12 05:37:32 UTC (rev 18481)
+++ trunk/apps/thingamablog/src/net/sf/thingamablog/transport/FCPTransport.java 
2008-03-12 06:04:40 UTC (rev 18482)
@@ -119,6 +119,7 @@
             return false;
         }
         System.out.println("Beginning of the publish process...");
+        edition++;
         String dirURI = "freenet:USK@" + insertURI + "/" + 
ASCIIconv.convertNonAscii(title) + "/" + edition + "/";
         System.out.println("Insert URI : " + dirURI);
         ClientPutComplexDir putDir = new ClientPutComplexDir("Thingamablog 
insert", dirURI);
@@ -182,9 +183,9 @@
                 finished = success || "PutFailed".equals(messageName) || 
messageName.endsWith("Error");
             }            
         }
-        // If the publish has been made, we update the edition number to the 
current edition +1
+        // If the publish has been made, we update the edition number to the 
current edition
         if(finalURI != null){
-            edition = 
Integer.parseInt(finalURI.substring(finalURI.length()-1)) + 1;
+            edition = 
Integer.parseInt(finalURI.substring(finalURI.length()-1));
         }
         return success;
     }


Reply via email to