language fix
[mir.git] / source / mircoders / producer / ProducerContent.java
index a69f438..a4e14a5 100755 (executable)
@@ -32,20 +32,6 @@ public class ProducerContent extends Producer {
        private String templateDir = MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");
        
        public static void main(String argv[]){
-               /**
-                * Why are we reloading the config here?
-                * Can someone please explain this?
-                * Hope I didn't break anything
-                * -mh. <heckmann@hbe.ca>
-                *
-                * This is the entry point for standalone production. The code
-                * is then running in a new virtual machine, e.g. when called
-                * from cron-script. In that case the config has to be initliased.
-                * Don't know if is ok that way //rk
-                *
-                * ok, i figured that out a few months ago.. -mh
-                *
-                */
                //Configuration.initConfig("config");
                System.out.println(MirConfig.getProp("Producer.DocRoot"));
 
@@ -57,8 +43,6 @@ public class ProducerContent extends Producer {
                }
        }
 
-
-
        public void handle(PrintWriter htmlout, EntityUsers user, boolean force,
                                                                                boolean sync)
                throws StorageObjectException, ModuleException {
@@ -124,7 +108,7 @@ public class ProducerContent extends Producer {
                                        String date = currentContent.getValue("date");
                                        String year = date.substring(0,4);
                                        String month = date.substring(4,6);
-                                       htmlFileName =  producerDocRoot + "/" + year + "/" + month + "/" +
+                                       htmlFileName =  "/" + year + "/" + month + "/" +
                                                                                                        currentContent.getValue("id") + ".shtml";
                                        
                                        //produce html
@@ -133,13 +117,13 @@ public class ProducerContent extends Producer {
                                        
                                        //produce xsl:fo and pdf version(if desired)
                                        if (generateFO.toLowerCase().equals("yes")){
-            foFileName =  producerDocRoot + "/" + year + "/" + month + "/"
+            foFileName =  "/" + year + "/" + month + "/"
                           + currentContent.getValue("id") + ".fo";
             boolean foRetVal = produce(contentPrintableTemplate, foFileName,
-                                        mergeData, htmlout);
+                                        mergeData, htmlout, "UTF8");
                                        
             if (generatePDF.toLowerCase().equals("yes")){
-              pdfFileName =  producerStorageRoot + producerDocRoot +"/" + year
+              pdfFileName =  producerStorageRoot + "/" + year
                               + "/" + month + "/"
                               + currentContent.getValue("id") + ".pdf";
               Driver driver = new Driver();