get rid of deprecated methods and new popup stuff
authormh <mh>
Fri, 29 Mar 2002 19:43:48 +0000 (19:43 +0000)
committermh <mh>
Fri, 29 Mar 2002 19:43:48 +0000 (19:43 +0000)
source/mircoders/servlet/ServletModuleContent.java

index 461f0ce..ddc4d7e 100755 (executable)
@@ -368,48 +368,31 @@ public class ServletModuleContent extends ServletModule
   private void _showObject(String id, HttpServletRequest req, HttpServletResponse res)
     throws ServletModuleException {
 
+    SimpleHash extraInfo = new SimpleHash();
     try {
       EntityContent entContent=(EntityContent)mainModule.getById(id);
-      SimpleHash mergeData =  HTMLTemplateProcessor.makeSimpleHash(entContent);
-      EntityList topicToContent = DatabaseContentToTopics.getInstance().getTopics(entContent);
-      if (topicToContent!=null && topicToContent.size()>0){
-        theLog.printDebugInfo("topicanzahl: "+topicToContent.size());
-        Entity topics = null;
-        SimpleList topicList = new SimpleList();
-        for(int i=0;i<topicToContent.size();i++){
-          topics = (EntityTopics)topicToContent.elementAt(i);
-          topicList.add(topics.getId());
-        }
-        mergeData.put("to_topic",topicList);
-      }
-      //obsolete, because of psqgl 7.1.x
-      //mergeData.put("content_data", entContent.getContentData());
-      mergeData.put("themenPopupData", themenModule.getTopicsAsSimpleList());
+
+      extraInfo.put("themenPopupData", themenModule.getTopicsAsSimpleList());
       try {
-        mergeData.put("articletypePopupData", DatabaseArticleType.getInstance().getPopupData());
+        extraInfo.put("articletypePopupData",
+                        DatabaseArticleType.getInstance().getPopupData());
       } catch (Exception e) {
         theLog.printError("articletype could not be fetched.");
       }
       try {
-        mergeData.put("languagePopupData", DatabaseLanguage.getInstance().getPopupData());
+        extraInfo.put("languagePopupData", DatabaseLanguage.getInstance().getPopupData());
       } catch (Exception e) {
         theLog.printError("language-popup could not be fetched.");
       }
-      // get the images
-      EntityList currentMedia = DatabaseContentToMedia.getInstance().getMedia(entContent);
-      if (currentMedia!=null && currentMedia.getCount()>=1) {
-                               mergeData.put("to_media", currentMedia);
-      }
-
 
-      mergeData.put("schwerpunktPopupData", schwerpunktModule.getSchwerpunktAsSimpleList());
+      extraInfo.put("schwerpunktPopupData", schwerpunktModule.getSchwerpunktAsSimpleList());
       // hier code um zur liste zurueckzukommen
       String offsetParam, whereParam, orderParam;
-      if ((offsetParam = req.getParameter("offset"))!=null) mergeData.put("offset", offsetParam);
-      if ((whereParam = req.getParameter("where"))!=null) mergeData.put("where", whereParam);
-      if ((orderParam = req.getParameter("order"))!=null) mergeData.put("order", orderParam);
-      mergeData.put("login_user", _getUser(req));
-      deliver(req, res, mergeData, templateObjektString);
+      if ((offsetParam = req.getParameter("offset"))!=null) extraInfo.put("offset", offsetParam);
+      if ((whereParam = req.getParameter("where"))!=null) extraInfo.put("where", whereParam);
+      if ((orderParam = req.getParameter("order"))!=null) extraInfo.put("order", orderParam);
+      extraInfo.put("login_user", _getUser(req));
+      deliver(req, res, entContent, extraInfo, templateObjektString);
     } catch (Exception e) {
       throw new ServletModuleException(e.toString());
     }