From: mh Date: Sun, 1 Sep 2002 23:23:37 +0000 (+0000) Subject: don't sort by the "date" field, use webdb_create instead X-Git-Tag: MIR_1_0_0_RC1~28 X-Git-Url: http://erislabs.net/gitweb/?p=mir.git;a=commitdiff_plain;h=ca131e95b3f685828c0441482b76950589e28aea don't sort by the "date" field, use webdb_create instead --- diff --git a/source/mircoders/module/ModuleContent.java b/source/mircoders/module/ModuleContent.java index b8a86e7e..3be4a149 100755 --- a/source/mircoders/module/ModuleContent.java +++ b/source/mircoders/module/ModuleContent.java @@ -72,24 +72,24 @@ public class ModuleContent extends AbstractModule public EntityList getFeatures(int offset, int limit) throws ModuleException { - return getContent("is_published=true AND to_article_type=2", "date desc, webdb_create desc", + return getContent("is_published=true AND to_article_type=2", "webdb_create desc", offset, limit); } public EntityList getNewsWire(int offset, int limit) throws ModuleException { return getContent("is_published=true AND to_article_type = 1", - "date desc, webdb_create desc",offset,limit); + "webdb_create desc",offset,limit); } public EntityList getStartArticle() throws ModuleException { EntityList returnList = getContent("is_published=true AND to_article_type=4", - "date desc, webdb_create desc",0,1); + "webdb_create desc",0,1); //if no startspecial exists if (returnList==null || returnList.size()==0) returnList = getContent("is_published=true AND to_article_type=3", - "date desc, webdb_create desc",0,1); + "webdb_create desc",0,1); return returnList; } @@ -210,7 +210,7 @@ public class ModuleContent extends AbstractModule } if(whereClause.equals("nfrei")) { - whereClause="is_published='0'"; orderBy="date desc"; + whereClause="is_published='0'"; orderBy="webdb_create desc"; } if(whereClause.equals("lastchange")) { diff --git a/source/mircoders/producer/ProducerAll.java b/source/mircoders/producer/ProducerAll.java index 2cc84bda..0a2332b6 100755 --- a/source/mircoders/producer/ProducerAll.java +++ b/source/mircoders/producer/ProducerAll.java @@ -148,7 +148,7 @@ public class ProducerAll extends Producer{ //get all new unproduced content-entities String whereClause="is_produced='0' && to_article_type>0"; - String orderBy="date desc"; + String orderBy="webdb_create desc"; EntityList entityList = contentModule.getContent(whereClause,orderBy,0,-1,null); //get their values diff --git a/source/mircoders/producer/ProducerContent.java b/source/mircoders/producer/ProducerContent.java index 18d81eeb..bca3588c 100755 --- a/source/mircoders/producer/ProducerContent.java +++ b/source/mircoders/producer/ProducerContent.java @@ -103,7 +103,7 @@ public class ProducerContent extends Producer { // production of the content-pages /** @todo this should be moved to ModuleContent */ - orderBy="date desc, webdb_lastchange desc"; + orderBy="webdb_lastchange desc"; if(force==true){ whereClause="is_published='1'"; // if true: produces a single content item diff --git a/source/mircoders/producer/ProducerFeature.java b/source/mircoders/producer/ProducerFeature.java index 79626159..c9248b6c 100755 --- a/source/mircoders/producer/ProducerFeature.java +++ b/source/mircoders/producer/ProducerFeature.java @@ -53,7 +53,7 @@ public class ProducerFeature extends ProducerList { public void handle(PrintWriter htmlout, EntityUsers user, boolean force, boolean sync) throws StorageObjectException, ModuleException { - orderBy="date desc"; + orderBy="webdb_create desc"; listTemplate = MirConfig.getProp("Producer.FeatureList.Template"); EntityList featureEntityList = featureModule.getByWhereClause("","title", -1); boolean first=true; diff --git a/source/mircoders/producer/ProducerMedia.java b/source/mircoders/producer/ProducerMedia.java index 5d24c750..910c95fd 100755 --- a/source/mircoders/producer/ProducerMedia.java +++ b/source/mircoders/producer/ProducerMedia.java @@ -69,7 +69,7 @@ abstract public class ProducerMedia extends Producer { int contentBatchsize = Integer.parseInt(MirConfig.getProp("Producer.Content.Batchsize")); - orderBy = "date desc, webdb_lastchange desc"; + orderBy = "webdb_lastchange desc"; // get batch of non-produced medias, that are to be published whereClause="is_published='1'"; diff --git a/source/mircoders/producer/ProducerOpenPosting.java b/source/mircoders/producer/ProducerOpenPosting.java index 6a7937c2..dd208978 100755 --- a/source/mircoders/producer/ProducerOpenPosting.java +++ b/source/mircoders/producer/ProducerOpenPosting.java @@ -58,7 +58,7 @@ public class ProducerOpenPosting extends ProducerList { { listTemplate = MirConfig.getProp("Producer.OpenPosting.Template"); whereClause="is_published='1'"; - orderBy="date desc, webdb_create desc"; + orderBy="webdb_create desc"; fileDesc="open"; setAdditional("topicslist",topicsModule.getTopicsList()); diff --git a/source/mircoders/producer/ProducerTopics.java b/source/mircoders/producer/ProducerTopics.java index df379573..56cc5036 100755 --- a/source/mircoders/producer/ProducerTopics.java +++ b/source/mircoders/producer/ProducerTopics.java @@ -82,7 +82,7 @@ public class ProducerTopics extends ProducerList { /** @todo should be done in static */ listTemplate = MirConfig.getProp("Producer.TopicList.Template"); - orderBy="date desc, webdb_create desc"; + orderBy="webdb_create desc"; EntityList topicsEntityList; if(where==null){ topicsEntityList = topicsModule.getByWhereClause("","title", -1); @@ -128,7 +128,7 @@ public class ProducerTopics extends ProducerList { fileDesc = currentTopic.getValue("filename"); // get the startarticle - EntityList entityList = contentModule.getContent(whereClauseSpecial,"date desc, webdb_create desc",0,1); + EntityList entityList = contentModule.getContent(whereClauseSpecial,"webdb_create desc",0,1); String currentMediaId = null; SimpleHash imageHash = new SimpleHash(); EntityContent currentContent;