docomentataion
[mir.git] / source / mircoders / producer / ProducerTopics.java
index 6133a17..199ab76 100755 (executable)
@@ -35,6 +35,8 @@ public class ProducerTopics extends ProducerList {
   String              tinyIcon;
   String              iconAlt;
 
+  /** @todo couldn't this be in Producer.java and should be named addAdditional,
+   *  and should be thrown away afterwards? */
   public void setAdditional(String key, TemplateModel value) {
     additional.put(key,value);
   }
@@ -46,11 +48,16 @@ public class ProducerTopics extends ProducerList {
   }
 
   public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync)
-    throws StorageObjectException, ModuleException {
+    throws StorageObjectException, ModuleException
+  {
+    long startTime = System.currentTimeMillis();
+    int pageCount =0;
+    logHTML(htmlout, "Producer.Topics: started");
 
-    orderBy="date desc, webdb_create desc";
+    /** @todo should be done in static */
     listTemplate = MirConfig.getProp("Producer.TopicList.Template");
 
+    orderBy="date desc, webdb_create desc";
     EntityList topicsEntityList;
     if(where==null){
       topicsEntityList = topicsModule.getByWhereClause("","title", -1);
@@ -114,6 +121,7 @@ public class ProducerTopics extends ProducerList {
         setAdditional("topicslist",topicsEntityList);
 
         handleIt(htmlout,user,force);
+        pageCount++;
       }
       } catch (Exception e) {
         theLog.printError("ProducerTopics: problem with start special media: "
@@ -122,6 +130,7 @@ public class ProducerTopics extends ProducerList {
         +currentTopic.getId()+ "<font color=\"red\">skipping</font>");
       }
     }
+    logHTMLFinish(htmlout, "Topics", pageCount, startTime, System.currentTimeMillis());
   }
 
   public static void main(String argv[]){