import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import mir.entity.Entity;
ArrayList brokenUpContent = new ArrayList();
+
+ List extraTables = new ArrayList();
+ extraTables.add("content_x_media cxm");
Iterator images = new EntityBrowser(
- DatabaseImages.getInstance(),
- "exists (select * from content_x_media where content_id=" + entity.getId() + " and media_id=id)",
- "id desc", 30, -1, 0);
+ DatabaseImages.getInstance(), "i", extraTables,
+ "cxm.content_id="+entity.getId()+"and cxm.media_id=i.id",
+ "i.id desc", 30, -1, 0);
- String theContent = ((EntityContent) entity).getValue("content_data");
+ String theContent = ((EntityContent) entity).getFieldValue("content_data");
//remove pesky characters
theContent = HTMLRoutines.encodeXML(theContent);
//put in the <BR> tags so we can turn them to empty blocks
Map row1 = new HashMap();
Map row2 = new HashMap();
EntityImages currentImage=(EntityImages) images.next();
- float img_width=(new Float(currentImage.getValue("img_width"))).floatValue();
- float img_height=(new Float(currentImage.getValue("img_height"))).floatValue();
+ float img_width=(new Float(currentImage.getFieldValue("img_width"))).floatValue();
+ float img_height=(new Float(currentImage.getFieldValue("img_height"))).floatValue();
//oversize images must be shrunk
if (img_width>250){
row1.put("text_widthCM",Float.toString(text_widthCM));
- row1.put("img_title",currentImage.getValue("title"));
+ row1.put("img_title",currentImage.getFieldValue("title"));
row1.put("img_width",Float.toString(img_width));
row1.put("img_height",Float.toString(img_height));
aLogger.debug("img_width " +Float.toString(img_width));
aLogger.debug("img_height "+Float.toString(img_height));
- row1.put("img_src",currentImage.getValue("publish_path"));
+ row1.put("img_src",currentImage.getFieldValue("publish_path"));
row1.put("hasImage","1");
if (! outOfText){
try {