//if true produces a single contentitem
if(id !=null){
whereClause += " AND id="+id;
- // I think this avoids a select count(*)...
+ // this avoids a select count(*)...
contentBatchsize=-1;
}
batchEntityList = contentModule.getContent(whereClause, orderBy, 0,
}//for
// if next batch get it...
if (batchEntityList.hasNextBatch()){
- batchEntityList = contentModule.getByWhereClause(whereClause,
- null, batchEntityList.getNextBatch(),
- contentBatchsize);
+ //batchEntityList = contentModule.getByWhereClause(whereClause,
+ // null, batchEntityList.getNextBatch(),
+ // contentBatchsize);
+ batchEntityList = contentModule.getContent(whereClause, orderBy,
+ batchEntityList.getNextBatch(),
+ contentBatchsize, userEntity);
} else {
batchEntityList=null;
}
String productionPath;
EntityImages currentImage;
EntityList batchEntityList;
+ String orderBy = "date desc, webdb_lastchange desc";
int contentBatchsize = Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize"));
String imageHost = MirConfig.getProp("Producer.Image.Host");
whereClause += " and id="+id;
if (force==false) whereClause += " and icon_is_produced='0'";
- batchEntityList = imageModule.getByWhereClause(whereClause, null, 0, contentBatchsize);
+ batchEntityList = imageModule.getByWhereClause(whereClause, orderBy, 0, contentBatchsize);
theLog.printDebugInfo("whereclause: " + whereClause);
// if next batch get it...
if (batchEntityList.hasNextBatch()){
batchEntityList = imageModule.getByWhereClause(whereClause,
- null, batchEntityList.getNextBatch(),
+ orderBy, batchEntityList.getNextBatch(),
contentBatchsize);
} else {
batchEntityList=null;