Index: src/java/org/apache/wiki/PageManager.java
===================================================================
--- src/java/org/apache/wiki/PageManager.java	(revision 771034)
+++ src/java/org/apache/wiki/PageManager.java	(working copy)
@@ -129,7 +129,7 @@
      *  @return A Collection of WikiPage objects.
      *  @throws ProviderException If the backend has problems.
      */
-    public Collection<WikiPage> getAllPages()
+    public List<WikiPage> getAllPages()
         throws ProviderException
     {
         return m_engine.getContentManager().getAllPages(null);
Index: src/java/org/apache/wiki/content/ContentManager.java
===================================================================
--- src/java/org/apache/wiki/content/ContentManager.java	(revision 771034)
+++ src/java/org/apache/wiki/content/ContentManager.java	(working copy)
@@ -439,15 +439,49 @@
      *  please see {@link ReferenceManager#findCreated()}, which is probably a lot
      *  faster.  This method may cause repository access.
      *  
+     *  Up to version 3.0, this comment was a lie and the pages were actually in name order.
+     *  
+     *  @param space Name of the Wiki space.  May be null, in which case gets all spaces
+     *  @return A List of WikiPage objects.
+     *  @throws ProviderException If the backend has problems.
+     */
+    public List<WikiPage> getAllPages( String space )
+        throws ProviderException
+    {
+        return (List<WikiPage>)getAllPages( new ArrayList<WikiPage>(), space );
+    }
+    
+    /**
+     *  Returns all pages in page name order.  If you need just the page names, 
+     *  please see {@link ReferenceManager#findCreated()}, which is probably a lot
+     *  faster.  This method may cause repository access.
+     *  
      *  @param space Name of the Wiki space.  May be null, in which case gets all spaces
-     *  @return A Collection of WikiPage objects.
+     *  @return A SortedSet of WikiPage objects in name order.
+     *  @throws ProviderException If the backend has problems.
+     */
+    public SortedSet<WikiPage> getAllPagesSorted( String space )
+        throws ProviderException
+    {
+        return (SortedSet<WikiPage>)getAllPages( new TreeSet<WikiPage>(), space );
+    }
+    
+    /**
+     *  Returns all pages in the order determined by the result collection.  If you need just the page names, 
+     *  please see {@link ReferenceManager#findCreated()}, which is probably a lot
+     *  faster.  This method may cause repository access.
+     *  
+     *  @param result A collection which is used to hold the result.  You can get different behaviour
+     *                by different result collections.  Note - the result collection is NOT cleared by
+     *                this method.
+     *  @param space Name of the Wiki space.  May be null, in which case gets all spaces
+     *  @return The result collection filled with WikiPage objects.
      *  @throws ProviderException If the backend has problems.
      */
    
-    public Collection<WikiPage> getAllPages( String space )
+    public Collection<WikiPage> getAllPages( Collection<WikiPage> result, String space )
         throws ProviderException
     {
-        Set<WikiPage> result = new TreeSet<WikiPage>();
         try
         {
             Session session = m_sessionManager.getSession();
