roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r375292 - /incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
Date Mon, 06 Feb 2006 14:50:57 GMT
Author: snoopdave
Date: Mon Feb  6 06:50:56 2006
New Revision: 375292

URL: http://svn.apache.org/viewcvs?rev=375292&view=rev
Log:
Made entry queries sortable by updateTime or pubTime (ROL-1009)

Modified:
    incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java

Modified: incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java?rev=375292&r1=375291&r2=375292&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java Mon
Feb  6 06:50:56 2006
@@ -383,25 +383,23 @@
             Roller roller = RollerFactory.getRoller();
             WeblogManager weblogMgr = roller.getWeblogManager();
             if (website != null) {
-                Map entries = weblogMgr.getWeblogEntryObjectMap(
-                        website,                // userName
-                        null,                   // startDate
-                        new Date(),             // endDate
-                        null,                   // catName
-                        null,      // status
-                        new Integer(numposts)); // maxEntries
+                List entries = weblogMgr.getWeblogEntries(
+                    website,           // website
+                    null,              // startDate
+                    null,              // endDate
+                    null,              // catName
+                    null,              // status
+                    "updateTime",      // sortby
+                    new Integer(numposts));  // maxEntries
                 
-                Iterator iter = entries.values().iterator();
+                Iterator iter = entries.iterator();
                 while (iter.hasNext()) {
-                    ArrayList list = (ArrayList) iter.next();
-                    Iterator entryIter = list.iterator();
-                    while (entryIter.hasNext()) {
-                        WeblogEntryData entry = (WeblogEntryData)entryIter.next();
-                        results.addElement(createPostStruct(entry, userid));
-                    }
+                     WeblogEntryData entry = (WeblogEntryData)iter.next();
+                     results.addElement(createPostStruct(entry, userid));
                 }
             }
             return results;
+            
         } catch (Exception e) {
             String msg = "ERROR in BlooggerAPIHander.getRecentPosts";
             mLogger.error(msg,e);



Mime
View raw message