first cut of merge of STABLE-pre1_0 into HEAD. I won't even guarantee that it
[mir.git] / source / mircoders / producer / ProducerOpenPosting.java
index 6204916..1278d63 100755 (executable)
@@ -20,33 +20,28 @@ import mir.storage.*;
 
 public class ProducerOpenPosting extends ProducerList {
 
-  public void setAdditional(String key, TemplateModel value) {
-    additional.put(key,value);
-  }
 
-       public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-               throws StorageObjectException, ModuleException {
 
+  public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
+    throws StorageObjectException, ModuleException
+  {
     listTemplate = MirConfig.getProp("Producer.OpenPosting.Template");
     whereClause="is_published='1'";
     orderBy="date desc, webdb_create desc";
     fileDesc="open";
 
-               EntityList topicsEntityList = topicsModule.getByWhereClause("","title", -1);
-               SimpleList topicsList = HTMLTemplateProcessor.makeSimpleList(topicsEntityList);
-    SimpleScalar title = new SimpleScalar();
-    title.setValue("Open-Posting");
-    setAdditional("topicslist",topicsList);
-    setAdditional("title",title);
-
+    setAdditional("topicslist",topicsModule.getTopicsList());
+    setAdditional("title",new SimpleScalar("Open-Posting"));
     handleIt(htmlout,user,force);
   }
 
-       public static void main(String argv[]){
-               try {
-                       new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
-               } catch(Exception e) {
-                       System.err.println(e.toString());
-               }
-       }
-}
\ No newline at end of file
+
+  public static void main(String argv[]){
+    try {
+      new ProducerOpenPosting().handle(new PrintWriter(System.out), null,false, false);
+    } catch(Exception e) {
+      System.err.println(e.toString());
+    }
+  }
+
+}