From fc6556a81988a6b5376b6aeda7c99920c9c25936 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sun, 25 Jul 2021 18:08:59 +0500 Subject: [PATCH] Finally rename binary part to attachment How could we have missed it --- hyphae/hyphae.go | 2 +- shroom/upload.go | 2 +- views/readers.qtpl | 2 +- views/readers.qtpl.go | 2 +- web/mutators.go | 2 +- web/readers.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hyphae/hyphae.go b/hyphae/hyphae.go index d69fcb6..a8f5bb5 100644 --- a/hyphae/hyphae.go +++ b/hyphae/hyphae.go @@ -101,7 +101,7 @@ func (h *Hypha) MergeIn(oh *Hypha) { } if oh.BinaryPath != "" { if h.BinaryPath != "" { - log.Println("There is a file collision for binary part of a hypha:", h.BinaryPath, "and", oh.BinaryPath, "-- going on with the latter") + log.Println("There is a file collision for attachment of a hypha:", h.BinaryPath, "and", oh.BinaryPath, "-- going on with the latter") } h.BinaryPath = oh.BinaryPath } diff --git a/shroom/upload.go b/shroom/upload.go index e84e93e..d8ca6d2 100644 --- a/shroom/upload.go +++ b/shroom/upload.go @@ -44,7 +44,7 @@ func UploadText(h *hyphae.Hypha, data []byte, message string, u *user.User) (hop func UploadBinary(h *hyphae.Hypha, mime string, file multipart.File, u *user.User) (*history.HistoryOp, string) { var ( - hop = history.Operation(history.TypeEditBinary).WithMsg(fmt.Sprintf("Upload binary part for ‘%s’ with type ‘%s’", h.Name, mime)) + hop = history.Operation(history.TypeEditBinary).WithMsg(fmt.Sprintf("Upload attachment for ‘%s’ with type ‘%s’", h.Name, mime)) data, err = io.ReadAll(file) ) diff --git a/views/readers.qtpl b/views/readers.qtpl index 93e23e1..70d617e 100644 --- a/views/readers.qtpl +++ b/views/readers.qtpl @@ -114,7 +114,7 @@ If `contents` == "", a helpful message is shown instead.
-

Please note that viewing binary parts of hyphae is not supported in history for now.

+

Please note that viewing attachments of hyphae is not supported in history for now.

{%s= NaviTitleHTML(h) %} {%s= contents %}
diff --git a/views/readers.qtpl.go b/views/readers.qtpl.go index f030c2b..3e5fb98 100644 --- a/views/readers.qtpl.go +++ b/views/readers.qtpl.go @@ -383,7 +383,7 @@ func StreamRevisionHTML(qw422016 *qt422016.Writer, rq *http.Request, h *hyphae.H
-

Please note that viewing binary parts of hyphae is not supported in history for now.

+

Please note that viewing attachments of hyphae is not supported in history for now.

`) //line views/readers.qtpl:118 qw422016.N().S(NaviTitleHTML(h)) diff --git a/web/mutators.go b/web/mutators.go index 0d64596..ac6a1a5 100644 --- a/web/mutators.go +++ b/web/mutators.go @@ -211,7 +211,7 @@ func handlerUploadText(w http.ResponseWriter, rq *http.Request) { } } -// handlerUploadBinary uploads a new binary part for the hypha. +// handlerUploadBinary uploads a new attachment for the hypha. func handlerUploadBinary(w http.ResponseWriter, rq *http.Request) { util.PrepareRq(rq) rq.ParseMultipartForm(10 << 20) // Set upload limit diff --git a/web/readers.go b/web/readers.go index aa5cfd8..ac22633 100644 --- a/web/readers.go +++ b/web/readers.go @@ -102,7 +102,7 @@ func handlerText(w http.ResponseWriter, rq *http.Request) { } } -// handlerBinary serves binary part of the hypha. +// handlerBinary serves attachment of the hypha. func handlerBinary(w http.ResponseWriter, rq *http.Request) { util.PrepareRq(rq) hyphaName := util.HyphaNameFromRq(rq, "binary")