🔀 Merge “work/next” into “next”
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / SearchPage.kt
index 3c14604..7534bb4 100644 (file)
@@ -58,7 +58,7 @@ class SearchPage(webInterface: WebInterface, loaders: Loaders, templateRenderer:
                val postPagination = cache.get(phrases) {
                        soneRequest.core.sones
                                        .flatMap(Sone::getPosts)
-                                       .filter { Post.FUTURE_POSTS_FILTER.apply(it) }
+                                       .filter(noFuturePost)
                                        .scoreAndPaginate(phrases, soneRequest.core.preferences.postsPerPage) { it.allText(soneNameCache, soneRequest.core::getReplies) }
                }.apply { page = soneRequest.parameters["postPage"].emptyToNull?.toIntOrNull() ?: 0 }
 
@@ -125,7 +125,7 @@ class SearchPage(webInterface: WebInterface, loaders: Loaders, templateRenderer:
                                                }
                                        }
 
-       private fun redirect(target: String): Nothing = throw RedirectException(target)
+       private fun redirect(target: String): Nothing = redirectTo(target)
 
        enum class Optionality {
                OPTIONAL,