mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-04-09 20:26:47 +00:00
Rename -user-tree to -user-hypha
This commit is contained in:
parent
e72ca863e3
commit
84545dd9f1
@ -32,7 +32,7 @@ Options:
|
||||
Port to serve the wiki at (default "1737")
|
||||
-url string
|
||||
URL at which your wiki can be found. Used to generate feeds (default "http://0.0.0.0:$port")
|
||||
-user-tree string
|
||||
-user-hypha string
|
||||
Hypha which is a superhypha of all user pages (default "u")
|
||||
```
|
||||
|
||||
|
6
flag.go
6
flag.go
@ -15,7 +15,7 @@ func init() {
|
||||
flag.StringVar(&util.HomePage, "home", "home", "The home page name")
|
||||
flag.StringVar(&util.SiteNavIcon, "icon", "🍄", "What to show in the navititle in the beginning, before the colon")
|
||||
flag.StringVar(&util.SiteName, "name", "wiki", "What is the name of your wiki")
|
||||
flag.StringVar(&util.UserTree, "user-tree", "u", "Hypha which is a superhypha of all user pages")
|
||||
flag.StringVar(&util.UserHypha, "user-hypha", "u", "Hypha which is a superhypha of all user pages")
|
||||
flag.StringVar(&util.AuthMethod, "auth-method", "none", "What auth method to use. Variants: \"none\", \"fixed\"")
|
||||
flag.StringVar(&util.FixedCredentialsPath, "fixed-credentials-path", "mycocredentials.json", "Used when -auth-method=fixed. Path to file with user credentials.")
|
||||
}
|
||||
@ -44,8 +44,8 @@ func parseCliArgs() {
|
||||
log.Fatal("Error: you must use a proper name for the homepage")
|
||||
}
|
||||
|
||||
if !isCanonicalName(util.UserTree) {
|
||||
log.Fatal("Error: you must use a proper name for user tree")
|
||||
if !isCanonicalName(util.UserHypha) {
|
||||
log.Fatal("Error: you must use a proper name for user hypha")
|
||||
}
|
||||
|
||||
switch util.AuthMethod {
|
||||
|
@ -118,7 +118,7 @@ func (rev Revision) RecentChangesEntry() (html string) {
|
||||
<li class="rc-entry__hash">%[2]s</li>
|
||||
<li class="rc-entry__links">%[5]s</li>
|
||||
<li class="rc-entry__msg">%[6]s <span class="rc-entry__author">by <a href="/page/%[3]s/%[4]s" rel="author">%[4]s</a></span></li>
|
||||
`, rev.TimeString(), rev.Hash, util.UserTree, rev.Username, rev.HyphaeLinks(), rev.Message)
|
||||
`, rev.TimeString(), rev.Hash, util.UserHypha, rev.Username, rev.HyphaeLinks(), rev.Message)
|
||||
}
|
||||
return fmt.Sprintf(`
|
||||
<li class="rc-entry__time"><time>%[1]s</time></li>
|
||||
|
@ -142,7 +142,7 @@ func (rev *Revision) asHistoryEntry(hyphaName string) (html string) {
|
||||
author := ""
|
||||
if rev.Username != "anon" {
|
||||
author = fmt.Sprintf(`
|
||||
<span class="history-entry__author">by <a href="/page/%[1]s/%[2]s" rel="author">%[2]s</span>`, util.UserTree, rev.Username)
|
||||
<span class="history-entry__author">by <a href="/page/%[1]s/%[2]s" rel="author">%[2]s</span>`, util.UserHypha, rev.Username)
|
||||
}
|
||||
return fmt.Sprintf(`
|
||||
<li class="history__entry">
|
||||
|
@ -52,7 +52,7 @@ var navEntries = []navEntry{
|
||||
{% if u.Group == "anon" %}
|
||||
<a href="/login">Login</a>
|
||||
{% else %}
|
||||
<a href="/page/{%s util.UserTree %}/{%s u.Name %}">{%s u.Name %}</a>
|
||||
<a href="/page/{%s util.UserHypha %}/{%s u.Name %}">{%s u.Name %}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
@ -166,7 +166,7 @@ func streamuserMenuHTML(qw422016 *qt422016.Writer, u *user.User) {
|
||||
qw422016.N().S(`
|
||||
<a href="/page/`)
|
||||
//line templates/common.qtpl:55
|
||||
qw422016.E().S(util.UserTree)
|
||||
qw422016.E().S(util.UserHypha)
|
||||
//line templates/common.qtpl:55
|
||||
qw422016.N().S(`/`)
|
||||
//line templates/common.qtpl:55
|
||||
|
@ -57,7 +57,7 @@
|
||||
<li><b>Administrators:</b> {%- for i, username := range user.ListUsersWithGroup("admin") -%}
|
||||
{%- if i > 0 -%}<span aria-hidden="true">, </span>
|
||||
{%- endif -%}
|
||||
<a href="/page/{%s util.UserTree %}/{%s username %}">{%s username %}</a>{%- endfor -%}</li>
|
||||
<a href="/page/{%s util.UserHypha %}/{%s username %}">{%s username %}</a>{%- endfor -%}</li>
|
||||
{%- else -%}
|
||||
<li>This wiki does not use authorization</li>
|
||||
{%- endif -%}
|
||||
|
@ -14,7 +14,7 @@ var (
|
||||
SiteNavIcon string
|
||||
SiteName string
|
||||
WikiDir string
|
||||
UserTree string
|
||||
UserHypha string
|
||||
AuthMethod string
|
||||
FixedCredentialsPath string
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user