From 96b157e5aabba69c8efa8e43d91ed23a2a16dff0 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sat, 23 Sep 2017 21:46:28 +0100 Subject: [PATCH] Fixed a few regressions and renamed a file. --- mod_routes.go | 2 +- permissions.go | 14 +++++++------- .../{ip-search-results.html => ip-search.html} | 0 themes/shadow/public/main.css | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename templates/{ip-search-results.html => ip-search.html} (100%) diff --git a/mod_routes.go b/mod_routes.go index fa13d74b..97f5e34d 100644 --- a/mod_routes.go +++ b/mod_routes.go @@ -662,7 +662,7 @@ func routeIps(w http.ResponseWriter, r *http.Request, user User) { return } } - err = templates.ExecuteTemplate(w, "ip-search-results.html", pi) + err = templates.ExecuteTemplate(w, "ip-search.html", pi) if err != nil { InternalError(err, w) } diff --git a/permissions.go b/permissions.go index e7f1b187..92447efd 100644 --- a/permissions.go +++ b/permissions.go @@ -347,9 +347,9 @@ func rebuildForumPermissions(fid int) error { if dev.DebugMode { log.Print("Updating the forum permissions for Group #" + strconv.Itoa(group.ID)) } - var blankList []ForumPerms + var blankIntList []int - group.Forums = blankList + group.Forums = []ForumPerms{BlankForumPerms} group.CanSee = blankIntList for ffid := range forums { @@ -428,7 +428,7 @@ func buildForumPermissions() error { if dev.DebugMode { log.Print("Adding the forum permissions for Group #" + strconv.Itoa(group.ID) + " - " + group.Name) } - //groups[gid].Forums = append(groups[gid].Forums,BlankForumPerms) // GID 0. No longer needed now that Uncategorised occupies that slot + group.Forums = []ForumPerms{BlankForumPerms} for fid := range forums { forumPerm, ok := forumPerms[group.ID][fid] if ok { @@ -451,10 +451,10 @@ func buildForumPermissions() error { } } if dev.SuperDebug { - //log.Printf("groups[gid].CanSee %+v\n", groups[gid].CanSee) - //log.Printf("groups[gid].Forums %+v\n", groups[gid].Forums) - //log.Print("len(groups[gid].CanSee)",len(groups[gid].CanSee)) - //log.Print("len(groups[gid].Forums)",len(groups[gid].Forums)) + //log.Printf("group.CanSee %+v\n", group.CanSee) + //log.Printf("group.Forums %+v\n", group.Forums) + //log.Print("len(group.CanSee)",len(group.CanSee)) + //log.Print("len(group.Forums)",len(group.Forums)) } } return nil diff --git a/templates/ip-search-results.html b/templates/ip-search.html similarity index 100% rename from templates/ip-search-results.html rename to templates/ip-search.html diff --git a/themes/shadow/public/main.css b/themes/shadow/public/main.css index 886c3dc4..0faf6884 100644 --- a/themes/shadow/public/main.css +++ b/themes/shadow/public/main.css @@ -491,7 +491,7 @@ input, select, textarea { float: left; padding-right: 0px; } -.rowhead .rowitem:not(.has_opt) { +.rowhead .rowitem:not(.has_opt), .opthead .rowitem, .colstack_head .rowitem { width: 100%; }