Use traditional getter name.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / IndexPage.java
index 67d11c6..589e7aa 100644 (file)
@@ -24,7 +24,6 @@ import java.util.List;
 
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.util.collection.Pagination;
 import net.pterodactylus.util.template.Template;
 
 /**
@@ -42,7 +41,7 @@ public class IndexPage extends SoneTemplatePage {
         *            The Sone web interface
         */
        public IndexPage(Template template, WebInterface webInterface) {
-               super("index.html", template, "Page.Index.Title", webInterface);
+               super("index.html", template, "Page.Index.Title", webInterface, true);
        }
 
        //
@@ -69,23 +68,7 @@ public class IndexPage extends SoneTemplatePage {
                        }
 
                });
-               int page = request.getHttpRequest().getIntParam("page", 0);
-               Pagination<Post> postPagination = new Pagination<Post>(allPosts, 25).setPage(page);
-               List<Post> postsOnPage = postPagination.getItems();
-               template.set("posts", postsOnPage);
-               template.set("pagination", postPagination);
-       }
-
-       //
-       // SONETEMPLATEPAGE METHODS
-       //
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       protected boolean requiresLogin() {
-               return true;
+               template.set("posts", allPosts);
        }
 
 }