dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit d49863fb2cc95c9eebad278e8219002e30ab9c03
parent ab1382d4f85171662dd2520fa7e5a143f03ffc2e
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed,  7 Jun 2023 02:47:36 -0700

add php

Diffstat:
Mpkg/web/handlers/api/v1/topBarHandler.go | 2+-
Mpkg/web/handlers/handlers.go | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go @@ -272,7 +272,7 @@ func ChatTopBarHandler(c echo.Context) error { if authUser.CanUseMultiline && c.Request().PostFormValue("sender") == "codeModal" { database.MsgPubSub.Pub("code_hide_"+authUser.ID.String()+"_"+room.ID.String(), database.ChatMessageType{}) lang := c.Request().PostFormValue("lang") - if !utils.InArr(lang, []string{"go", "c", "cpp", "py", "js"}) { + if !utils.InArr(lang, []string{"go", "c", "cpp", "py", "js", "php"}) { lang = "" } newOrigMessage := "\n```" + lang + "\n" + origMessage + "\n```\n" diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5269,6 +5269,7 @@ Loop: <option value="c">C</option> <option value="py">Python</option> <option value="js">Javascript</option> + <option value="php">PHP</option> </select> <button type="submit">send</button> </div>