Index: src/java/org/apache/wiki/WikiEngine.java
===================================================================
--- src/java/org/apache/wiki/WikiEngine.java	(revision 770483)
+++ src/java/org/apache/wiki/WikiEngine.java	(working copy)
@@ -1077,14 +1077,14 @@
     }
 
     /**
-     *  Returns a collection of all supported InterWiki links.
+     *  Returns an unordered List of all supported InterWiki links.
      *
-     *  @return A Collection of Strings.
+     *  @return An unordered List of InterWiki link Strings.
      */
     @SuppressWarnings("unchecked")
-    public Collection<String> getAllInterWikiLinks()
+    public List<String> getAllInterWikiLinks()
     {
-        Vector<String> v = new Vector<String>();
+        List<String> v = new ArrayList<String>();
 
         for( Enumeration i = m_properties.propertyNames(); i.hasMoreElements(); )
         {
@@ -1100,12 +1100,12 @@
     }
 
     /**
-     *  Returns a collection of all image types that get inlined.
+     *  Returns an unordered List of all image types that get inlined.
      *
-     *  @return A Collection of Strings with a regexp pattern.
+     *  @return An unordered List of Strings with a regexp pattern.
      */
 
-    public Collection<String> getAllInlinedImagePatterns()
+    public List<String> getAllInlinedImagePatterns()
     {
         return JSPWikiMarkupParser.getImagePatterns( this );
     }
@@ -1581,11 +1581,11 @@
 
     /**
      *  Reads a WikiPage full of data from a String and returns all links
-     *  internal to this Wiki in a Collection.
+     *  internal to this Wiki in a List.
      *
      *  @param page The WikiPage to scan
      *  @param pagedata The page contents
-     *  @return a Collection of Strings
+     *  @return a List of WikiPaths
      */
     public List<WikiPath> scanWikiLinks( WikiPage page, String pagedata )
     {
@@ -1852,28 +1852,29 @@
     }
 
     /**
-     *  Returns a Collection of WikiPages, sorted in time
+     *  Returns a SortedSet of recent WikiPages, sorted in time
      *  order of last change (i.e. first object is the most
      *  recently changed).  This method also includes attachments.
      *
      *  @param space The WikiSpace for which you want to have the
      *               Recent Changes for.
-     *  @return Collection of WikiPage objects.  In reality, the returned
-     *          collection is a Set, but due to API compatibility reasons,
-     *          we're not changing the signature soon...
+     *  @param since Only return pages changed since this date.  Use
+     *               <code>null</code> to get all pages.
+     *  @return a SortedSet of WikiPages in descending modified order (newest first)
      */
-
-    // FIXME: Should really get a Date object and do proper comparisons.
-    //        This is terribly wasteful.
-    public Collection<WikiPage> getRecentChanges(String space)
+    public SortedSet<WikiPage> getRecentChanges(String space, Date since)
     {
         try
         {
             Collection<WikiPage>   pages = m_contentManager.getAllPages(space);
 
-            TreeSet<WikiPage> sortedPages = new TreeSet<WikiPage>( new PageTimeComparator() );
-
-            sortedPages.addAll( pages );
+            TreeSet<WikiPage> sortedPages = new TreeSet<WikiPage>( PageTimeComparator.DEFAULT_PAGETIME_COMPARATOR );
+            if( since == null )
+                sortedPages.addAll( pages );
+            else
+                for( WikiPage page : pages )
+                    if( page.getLastModified() != null && page.getLastModified().after( since ) )
+                        sortedPages.add( page );
 
             return sortedPages;
         }
@@ -1885,14 +1886,14 @@
     }
 
     /**
-     *  Parses an incoming search request, then
-     *  does a search.
+     *  Parses an incoming search request, then does a search.  The returned List is
+     *  in descending quality order (i.e. best match first).
      *  <P>
      *  The query is dependent on the actual chosen search provider - each one of them has
      *  a language of its own.
      *
      *  @param query The query string
-     *  @return A Collection of SearchResult objects.
+     *  @return An order List of SearchResult objects in descedning quality order.
      *  @throws ProviderException If the searching failed
      *  @throws IOException       If the searching failed
      */
@@ -1900,10 +1901,10 @@
     //
     // FIXME: Should also have attributes attached.
     //
-    public Collection<SearchResult> findPages( String query )
+    public List<SearchResult> findPages( String query )
         throws ProviderException, IOException
     {
-        Collection<SearchResult> results = m_searchManager.findPages( query );
+        List<SearchResult> results = m_searchManager.findPages( query );
 
         return results;
     }
@@ -1981,7 +1982,7 @@
 
 
     /**
-     *  Returns a Collection of WikiPages containing the
+     *  Returns a List of WikiPages containing the
      *  version history of a page.
      *
      *  @param page Name of the page to look for
Index: src/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
===================================================================
--- src/java/org/apache/wiki/parser/JSPWikiMarkupParser.java	(revision 770483)
+++ src/java/org/apache/wiki/parser/JSPWikiMarkupParser.java	(working copy)
@@ -409,7 +409,7 @@
      */
 
     // FIXME: Does not belong here; should be elsewhere
-    public static Collection<String> getImagePatterns( WikiEngine engine )
+    public static List<String> getImagePatterns( WikiEngine engine )
     {
         Properties props    = engine.getWikiProperties();
         ArrayList<String>  ptrnlist = new ArrayList<String>();
Index: src/java/org/apache/wiki/plugin/RecentChangesPlugin.java
===================================================================
--- src/java/org/apache/wiki/plugin/RecentChangesPlugin.java	(revision 770483)
+++ src/java/org/apache/wiki/plugin/RecentChangesPlugin.java	(working copy)
@@ -107,7 +107,7 @@
 
         // FIXME: Should really have a since date on the getRecentChanges
         // method.
-        Collection<WikiPage>   changes = engine.getRecentChanges(context.getPage().getWiki());
+        Collection<WikiPage>   changes = engine.getRecentChanges( context.getPage().getWiki(), sincedate.getTime() );
         super.initialize( context, params );
         changes = super.filterCollection( changes );
 
@@ -127,11 +127,6 @@
                 {
                     Date lastmod = pageref.getLastModified();
 
-                    if( lastmod.before( sincedate.getTime() ) )
-                    {
-                        break;
-                    }
-                
                     if( !isSameDay( lastmod, olddate ) )
                     {
                         tr row = new tr();
Index: src/java/org/apache/wiki/rss/RSSGenerator.java
===================================================================
--- src/java/org/apache/wiki/rss/RSSGenerator.java	(revision 770483)
+++ src/java/org/apache/wiki/rss/RSSGenerator.java	(working copy)
@@ -445,7 +445,7 @@
         feed.setChannelLanguage( m_channelLanguage );
         feed.setChannelDescription( m_channelDescription );
 
-        Collection<WikiPage> changed = m_engine.getRecentChanges(wikiContext.getPage().getWiki());
+        Collection<WikiPage> changed = m_engine.getRecentChanges(wikiContext.getPage().getWiki(), null );
 
         WikiSession session = WikiSession.guestSession( m_engine );
         int items = 0;
Index: src/java/org/apache/wiki/search/SearchManager.java
===================================================================
--- src/java/org/apache/wiki/search/SearchManager.java	(revision 770483)
+++ src/java/org/apache/wiki/search/SearchManager.java	(working copy)
@@ -309,11 +309,11 @@
      * @throws ProviderException If the provider fails and a search cannot be completed.
      * @throws IOException If something else goes wrong.
      */
-    public Collection<SearchResult> findPages( String query )
+    public List<SearchResult> findPages( String query )
         throws ProviderException, IOException
     {
         if( query == null ) query = "";
-        Collection<SearchResult> c = m_searchProvider.findPages( query );
+        List<SearchResult> c = m_searchProvider.findPages( query );
 
         return c;
     }
Index: src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java
===================================================================
--- src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java	(revision 770483)
+++ src/java/org/apache/wiki/xmlrpc/AbstractRPCHandler.java	(working copy)
@@ -82,8 +82,6 @@
     public Vector<Hashtable<String,Object>> getRecentChanges( Date since ) throws ProviderException
     {
         checkPermission( PagePermission.VIEW );
-        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki());
-        Vector<Hashtable<String,Object>> result    = new Vector<Hashtable<String,Object>>();
 
         // Transform UTC into local time.
         Calendar cal = Calendar.getInstance();
@@ -92,12 +90,11 @@
                  (cal.get( Calendar.ZONE_OFFSET ) + 
                   (cal.getTimeZone().inDaylightTime( since ) ? cal.get( Calendar.DST_OFFSET ) : 0 )) );
 
+        Collection<WikiPage> pages = m_engine.getRecentChanges( m_context.getPage().getWiki(), cal.getTime() );
+        Vector<Hashtable<String,Object>> result    = new Vector<Hashtable<String,Object>>();
         for( WikiPage page : pages )
         {
-            if( page.getLastModified().after( cal.getTime() ) )
-            {
-                result.add( encodeWikiPage( page ) );
-            }
+            result.add( encodeWikiPage( page ) );
         }
 
         return result;
Index: src/java/org/apache/wiki/xmlrpc/RPCHandler.java
===================================================================
--- src/java/org/apache/wiki/xmlrpc/RPCHandler.java	(revision 770483)
+++ src/java/org/apache/wiki/xmlrpc/RPCHandler.java	(working copy)
@@ -104,7 +104,7 @@
     public Vector<String> getAllPages() throws ProviderException
     {
         checkPermission( PagePermission.VIEW );
-        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki());
+        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki(), null );
         Vector<String> result = new Vector<String>();
 
         for( WikiPage p : pages )
@@ -156,8 +156,6 @@
     public Vector<Hashtable<String, Object>> getRecentChanges( Date since ) throws ProviderException
     {
         checkPermission( PagePermission.VIEW );
-        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki());
-        Vector<Hashtable<String, Object>> result = new Vector<Hashtable<String, Object>>();
 
         Calendar cal = Calendar.getInstance();
         cal.setTime( since );
@@ -170,9 +168,11 @@
                   (cal.getTimeZone().inDaylightTime(since) ? cal.get( Calendar.DST_OFFSET ) : 0 ) ) );
         since = cal.getTime();
 
+        Collection<WikiPage> pages = m_engine.getRecentChanges( m_context.getPage().getWiki(), since );
+        Vector<Hashtable<String, Object>> result = new Vector<Hashtable<String, Object>>();
         for( WikiPage page : pages )
         {
-            if( page.getLastModified().after( since ) && !( page.isAttachment() ) )
+            if( !( page.isAttachment() ) )
             {
                 result.add( encodeWikiPage( page ) );
             }
Index: src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java
===================================================================
--- src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java	(revision 770483)
+++ src/java/org/apache/wiki/xmlrpc/RPCHandlerUTF8.java	(working copy)
@@ -55,7 +55,7 @@
     {
         checkPermission( PagePermission.VIEW );
         
-        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki());
+        Collection<WikiPage> pages = m_engine.getRecentChanges( m_context.getPage().getWiki(), null );
         Vector<String> result = new Vector<String>();
 
         for( WikiPage p : pages)
@@ -107,9 +107,6 @@
     public Vector<Hashtable<String,Object>> getRecentChanges( Date since ) throws ProviderException
     {
         checkPermission( PagePermission.VIEW );
-        
-        Collection<WikiPage> pages = m_engine.getRecentChanges(m_context.getPage().getWiki());
-        Vector<Hashtable<String, Object>> result = new Vector<Hashtable<String, Object>>();
 
         Calendar cal = Calendar.getInstance();
         cal.setTime( since );
@@ -121,10 +118,12 @@
                  (cal.get( Calendar.ZONE_OFFSET ) +
                   (cal.getTimeZone().inDaylightTime(since) ? cal.get( Calendar.DST_OFFSET ) : 0 ) ) );
         since = cal.getTime();
-
+        
+        Collection<WikiPage> pages = m_engine.getRecentChanges( m_context.getPage().getWiki(), since );
+        Vector<Hashtable<String, Object>> result = new Vector<Hashtable<String, Object>>();
         for( WikiPage page : pages )
         {
-            if( page.getLastModified().after( since ) && !(page.isAttachment() ) )
+            if( !(page.isAttachment() ) )
             {
                 result.add( encodeWikiPage( page ) );
             }
