jlint debugging...
[mir.git] / source / mircoders / producer / ProducerTopics.java
index 0c5aa37..7fb06c0 100755 (executable)
@@ -101,7 +101,7 @@ public class ProducerTopics extends ProducerList {
         EntityContent currentContent;
         if(entityList != null && entityList.size()==1){
           currentContent = (EntityContent)entityList.elementAt(0);
-          try { 
+          try {
               SimpleHash specialHash = HTMLTemplateProcessor.makeSimpleHash(currentContent);
 
               currentMediaList = DatabaseContentToMedia.getInstance().getUploadedMedia(currentContent);
@@ -126,7 +126,7 @@ public class ProducerTopics extends ProducerList {
                     //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()) {
@@ -144,12 +144,18 @@ public class ProducerTopics extends ProducerList {
                 specialHash.put("to_media_video", mediaListVideo);
                 specialHash.put("to_media_other", mediaListOther);
               } //end if currentMediaList != null
+                                                       //convert to html
+                                                       if ( ((SimpleScalar)specialHash.get("is_html")).getAsString().equals("0") ) {
+                                                               SimpleScalar temp = (SimpleScalar)specialHash.get("description");
+                                                               specialHash.put("description",StringUtil.createHTML(temp.getAsString()));
+                                                       }
               setAdditional("special",specialHash);
           } catch (Exception e) {
             theLog.printError("ProducerTopics: problem with start special: "+currentContent.getId()+" "+e.toString());
+            logHTML(htmlout,"ProducerTopics: problem with start special: "+currentContent.getId()+" "+e.toString());
           }
         }
-        
+
         //set the list of topics
         setAdditional("topicslist",topicsList);