X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FSearchPage.kt;h=d9800720d49239e7c77cb39226b684a0d6a9ad56;hp=11c85dd0a1790140b1b694d35f7cac6eeab807e5;hb=6a3f1fede0cda5cd6ed56204aa1dd37a19813cb9;hpb=6b0fc27624fc311424452decc28da50a81f4ae2a diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt index 11c85dd..d980072 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/SearchPage.kt @@ -7,6 +7,7 @@ import freenet.support.Logger import net.pterodactylus.sone.data.Post import net.pterodactylus.sone.data.PostReply import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.main.* import net.pterodactylus.sone.utils.Pagination import net.pterodactylus.sone.utils.emptyToNull import net.pterodactylus.sone.utils.memoize @@ -28,11 +29,11 @@ import javax.inject.Inject * This page lets the user search for posts and replies that contain certain * words. */ -class SearchPage(template: Template, webInterface: WebInterface, ticker: Ticker = Ticker.systemTicker()) : - SoneTemplatePage("search.html", webInterface, template, "Page.Search.Title") { +class SearchPage(template: Template, webInterface: WebInterface, loaders: Loaders, ticker: Ticker = Ticker.systemTicker()) : + SoneTemplatePage("search.html", webInterface, loaders, template = template, pageTitleKey = "Page.Search.Title") { - @Inject constructor(template: Template, webInterface: WebInterface) : - this(template, webInterface, Ticker.systemTicker()) + @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders) : + this(template, webInterface, loaders, Ticker.systemTicker()) private val cache: Cache, Pagination> = CacheBuilder.newBuilder().ticker(ticker).expireAfterAccess(5, MINUTES).build()