templateContext["identitiesWithoutSone"] = webInterface.core.identityManager.allOwnIdentities.filterNot { "Sone" in it.contexts }.sortedBy { "${it.nickname}@${it.id}" }
}
- override public fun getRedirectTarget(freenetRequest: FreenetRequest) =
+ override fun getRedirectTarget(freenetRequest: FreenetRequest) =
getCurrentSone(freenetRequest.toadletContext)?.let { "index.html" }
override fun isEnabled(toadletContext: ToadletContext) = when {
override fun isLinkExcepted(link: URI?) = true
- public override fun getPageTitle(freenetRequest: FreenetRequest) =
+ override fun getPageTitle(freenetRequest: FreenetRequest) =
(freenetRequest.parameters["post"]?.let(webInterface.core::getPost)?.let {
if (it.text.length > 20) {
it.text.substring(0..19) + "…"
override fun isLinkExcepted(link: URI?) = true
- public override fun getPageTitle(freenetRequest: FreenetRequest): String =
+ override fun getPageTitle(freenetRequest: FreenetRequest): String =
freenetRequest.parameters["sone"]!!.let(webInterface.core::getSone)?.let { sone ->
"${SoneAccessor.getNiceName(sone)} - ${webInterface.l10n.getString("Page.ViewSone.Title")}"
} ?: webInterface.l10n.getString("Page.ViewSone.Page.TitleWithoutSone")