protected static String producerStorageRoot = MirConfig.getProp("Producer.StorageRoot");
protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
- protected static String actionRoot = null;
+
+ /** @todo same as in HTMLTemplateProcessor, this should be dynamically set */
+ protected static String actionRoot = MirConfig.getProp("RootUri") + "/servlet/Mir";
protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + "/" + MirConfig.getProp("Producer.Logfile"));
protected static ModuleTopics topicsModule;
static {
// init
try {
+
contentModule = new ModuleContent(DatabaseContent.getInstance());
topicsModule = new ModuleTopics(DatabaseTopics.getInstance());
linksImcsModule = new ModuleLinksImcs(DatabaseLinksImcs.getInstance());
featureModule = new ModuleFeature(DatabaseFeature.getInstance());
imageModule = new ModuleImages(DatabaseImages.getInstance());
uploadedMediaModule = new ModuleUploadedMedia(DatabaseImages.getInstance());
- /** @todo same as in HTMLTemplateProcessor, this should be dynamically set */
- actionRoot = producerDocRoot + "/servlet/Mir";
+
}
catch(StorageObjectException e)
{
}
// timing and message to browser
long overall = System.currentTimeMillis() - startTime;
- long pagesPerMinute=0, perMinute = overall/60000;
- if (perMinute >0) pagesPerMinute = pageCount / perMinute;
+ long pagesPerMinute=0; float perMinute = overall/60000;
+ if (perMinute >0) pagesPerMinute = (long) (pageCount / perMinute);
logHTML(htmlout, "Producer.Content finished producing: " +
overall + " ms for "+ pageCount+" Pages = " +pagesPerMinute + " pages/min");
} else {
topicsEntityList = topicsModule.getByWhereClause(where,"title", -1);
}
- SimpleList topicsList = HTMLTemplateProcessor.makeSimpleList(topicsEntityList);
for(int i=0; i < topicsEntityList.size(); i++){
whereClause += currentContent.getId();
whereClauseSpecial += currentContent.getId();
- setAdditional("topic",HTMLTemplateProcessor.makeSimpleHash(currentTopic));
+ setAdditional("topic",currentTopic);
first = false;
}
if(entityList != null && entityList.size()==1){
currentContent = (EntityContent)entityList.elementAt(0);
try {
- SimpleHash specialHash = HTMLTemplateProcessor.makeSimpleHash(currentContent);
- setAdditional("special",specialHash);
+ setAdditional("special",currentContent);
} catch (Exception e) {
theLog.printError("ProducerTopics: problem with start special media: "+currentContent.getId()+" "+e.toString()+" <font color=\"red\">skipping</font>");
logHTML(htmlout,"ProducerTopics: problem with start special media: "+currentContent.getId()+" "+e.toString());
}
//set the list of topics
- setAdditional("topicslist",topicsList);
+ setAdditional("topicslist",topicsEntityList);
handleIt(htmlout,user,force);
}