diff --git a/common/errors.go b/common/errors.go
index f74cd809..d4405ff7 100644
--- a/common/errors.go
+++ b/common/errors.go
@@ -181,7 +181,7 @@ func InternalErrorXML(err error, w http.ResponseWriter, r *http.Request) RouteEr
func SilentInternalErrorXML(err error, w http.ResponseWriter, r *http.Request) RouteError {
w.Header().Set("Content-Type", "application/xml")
w.WriteHeader(500)
- w.Write([]byte(`
+ w.Write([]byte(`
` + phrases.GetErrorPhrase("internal_error_body") + ``))
log.Print("InternalError: ", err)
return HandledRouteError()
diff --git a/common/topic_store.go b/common/topic_store.go
index 8c758a16..5b7c720a 100644
--- a/common/topic_store.go
+++ b/common/topic_store.go
@@ -64,7 +64,7 @@ func NewDefaultTopicStore(cache TopicCache) (*DefaultTopicStore, error) {
t := "topics"
return &DefaultTopicStore{
cache: cache,
- get: acc.Select(t).Columns("title, content, createdBy, createdAt, lastReplyBy, lastReplyAt, lastReplyID, is_closed, sticky, parentID, ip, views, postCount, likeCount, attachCount, poll, data").Where("tid=?").Prepare(),
+ get: acc.Select(t).Columns("title,content,createdBy,createdAt,lastReplyBy,lastReplyAt,lastReplyID,is_closed,sticky,parentID,ip,views,postCount,likeCount,attachCount,poll,data").Where("tid=?").Prepare(),
exists: acc.Exists(t, "tid").Prepare(),
count: acc.Count(t).Prepare(),
countUser: acc.Count(t).Where("createdBy=?").Prepare(),
diff --git a/common/user_store.go b/common/user_store.go
index 5eb1f363..2724d022 100644
--- a/common/user_store.go
+++ b/common/user_store.go
@@ -53,7 +53,7 @@ func NewDefaultUserStore(cache UserCache) (*DefaultUserStore, error) {
cache = NewNullUserCache()
}
u := "users"
- allCols := "uid, name, group, active, is_super_admin, session, email, avatar, message, level, score, posts, liked, last_ip, temp_group, createdAt, enable_embeds"
+ allCols := "uid,name,group,active,is_super_admin,session,email,avatar,message,level,score,posts,liked,last_ip,temp_group,createdAt,enable_embeds"
// TODO: Add an admin version of registerStmt with more flexibility?
return &DefaultUserStore{
cache: cache,
diff --git a/common/widget_search_and_filter.go b/common/widget_search_and_filter.go
index 163cecb1..cefe7a0b 100644
--- a/common/widget_search_and_filter.go
+++ b/common/widget_search_and_filter.go
@@ -14,16 +14,16 @@ type searchAndFilter struct {
func widgetSearchAndFilter(widget *Widget, hvars interface{}) (out string, err error) {
header := hvars.(*Header)
- user := header.CurrentUser
+ u := header.CurrentUser
var forums []filterForum
var canSee []int
- if user.IsSuperAdmin {
+ if u.IsSuperAdmin {
canSee, err = Forums.GetAllVisibleIDs()
if err != nil {
return "", err
}
} else {
- group, err := Groups.Get(user.Group)
+ group, err := Groups.Get(u.Group)
if err != nil {
// TODO: Revisit this
return "", errors.New("Something weird happened")
diff --git a/misc_test.go b/misc_test.go
index f897ae9f..2b0e1717 100644
--- a/misc_test.go
+++ b/misc_test.go
@@ -1841,6 +1841,13 @@ func TestMFAStore(t *testing.T) {
it, err = c.MFAstore.Get(1)
test(i)
}
+ expectNilErr(t, it.Delete())
+ _, err = c.MFAstore.Get(-1)
+ recordMustNotExist(t, err, "mfa uid -1 should not exist")
+ _, err = c.MFAstore.Get(0)
+ recordMustNotExist(t, err, "mfa uid 0 should not exist")
+ _, err = c.MFAstore.Get(1)
+ recordMustNotExist(t, err, "mfa uid 1 should not exist")
}
// TODO: Expand upon the valid characters which can go in URLs?
diff --git a/templates/account_own_edit.html b/templates/account_own_edit.html
index 60aad3cc..20bd005a 100644
--- a/templates/account_own_edit.html
+++ b/templates/account_own_edit.html
@@ -1,12 +1,12 @@
-
+