jlint debugging...
[mir.git] / source / mircoders / producer / ProducerStartPage.java
index c8d7ca1..3ea6e41 100755 (executable)
@@ -82,12 +82,6 @@ public class ProducerStartPage extends Producer {
     SimpleList mediaList;
     SimpleHash contentHash;
 
-    // get the topiclist
-    /** @todo should be fetched via ModuleTopics in one rush / no sql!
-     *  something like topicsModule.getTopicsList returning the SimpleList */
-    entityList = topicsModule.getByWhereClause("","title",-1);
-    SimpleList topicList = HTMLTemplateProcessor.makeSimpleList(entityList);
-
     // get the imclinks
     /** @todo don't we want to preproduce and include the imcs? */
     entityList = linksImcsModule.getByWhereClause("", "sortpriority, title", -1);
@@ -198,7 +192,7 @@ public class ProducerStartPage extends Producer {
                 //we most likely need further info
                 upMedia = mediaStorage.selectById(upMedia.getId());
                 upMediaSimpleHash.put("url", mediaHandler.getListView(upMedia, mediaType));
-                if (upMedia.getValue("is_published") == "1") {
+                if (upMedia.getValue("is_published").equals("1")) {
                   if (mediaHandler.isImage()) {
                     mediaListImages.add(upMediaSimpleHash);
                   } else if (mediaHandler.isAudio()) {
@@ -275,8 +269,8 @@ public class ProducerStartPage extends Producer {
                 //we most likely need further info
                 upMedia = mediaStorage.selectById(upMedia.getId());
                 upMediaSimpleHash.put("url", mediaHandler.getListView(upMedia, mediaType));
-                /** @todo String comparison here should never work .equals()  !!!! */
-                if (upMedia.getValue("is_published") == "1") {
+
+                if (upMedia.getValue("is_published").equals("1")) {
                   if (mediaHandler.isImage()) {
                     mediaListImages.add(upMediaSimpleHash);
                   } else if (mediaHandler.isAudio()) {
@@ -316,7 +310,7 @@ public class ProducerStartPage extends Producer {
     // Additional Information
     startPageModel = new SimpleHash();
     startPageModel.put("breakingnews", breakingList);
-    startPageModel.put("topics", topicList);
+    startPageModel.put("topics", topicsModule.getTopicsList());
     startPageModel.put("imclist", imcList);
     startPageModel.put("parentlist", parentList);
     startPageModel.put("newswire", newsWireList);