Try to eliminate some of these debug comments.

This commit is contained in:
Azareal 2018-09-24 09:42:17 +10:00
parent 00059194a5
commit 15b3ad07fa
5 changed files with 5 additions and 12 deletions

View File

@ -360,7 +360,6 @@ func PreparseMessage(msg string) string {
continue continue
} }
//fmt.Printf("username: %+v\n", username)
user, err := Users.GetByName(username) user, err := Users.GetByName(username)
if err != nil { if err != nil {
if err != ErrNoRows { if err != ErrNoRows {

View File

@ -374,17 +374,12 @@ func GetThemeTemplate(theme string, template string) interface{} {
// Might have something to do with it being the theme's TmplPtr map, investigate. // Might have something to do with it being the theme's TmplPtr map, investigate.
tmpl, ok := Themes[theme].TmplPtr[template] tmpl, ok := Themes[theme].TmplPtr[template]
if ok { if ok {
//fmt.Println("tmpl: ", tmpl)
//fmt.Println("exiting at Themes[theme].TmplPtr[template]")
return tmpl return tmpl
} }
tmpl, ok = TmplPtrMap[template] tmpl, ok = TmplPtrMap[template]
if ok { if ok {
//fmt.Println("exiting at TmplPtrMap[template]")
return tmpl return tmpl
} }
//fmt.Println("just passing back the template name")
return template return template
} }

View File

@ -126,7 +126,6 @@ func (hub *WsHubImpl) Tick() error {
} }
_ = forumList // Might use this later after we get the base feature working _ = forumList // Might use this later after we get the base feature working
//fmt.Println("canSeeItem")
if topicList[0].Sticky { if topicList[0].Sticky {
var lastSticky = 0 var lastSticky = 0
for i, row := range topicList { for i, row := range topicList {
@ -138,10 +137,7 @@ func (hub *WsHubImpl) Tick() error {
if lastSticky == 0 { if lastSticky == 0 {
continue continue
} }
//fmt.Println("lastSticky: ", lastSticky)
//fmt.Println("before topicList: ", topicList)
topicList = topicList[lastSticky:] topicList = topicList[lastSticky:]
//fmt.Println("after topicList: ", topicList)
} }
// TODO: Compare to previous tick to eliminate unnecessary work and data // TODO: Compare to previous tick to eliminate unnecessary work and data

View File

@ -73,11 +73,13 @@ func (wsUser *WSUser) AddSocket(conn *websocket.Conn, page string) {
if socket == nil { if socket == nil {
wsUser.Sockets[i] = &WSUserSocket{conn, page} wsUser.Sockets[i] = &WSUserSocket{conn, page}
wsUser.Unlock() wsUser.Unlock()
//fmt.Printf("%+v\n", wsUser.Sockets)
return return
} }
} }
} }
wsUser.Sockets = append(wsUser.Sockets, &WSUserSocket{conn, page}) wsUser.Sockets = append(wsUser.Sockets, &WSUserSocket{conn, page})
//fmt.Printf("%+v\n", wsUser.Sockets)
wsUser.Unlock() wsUser.Unlock()
} }
@ -91,6 +93,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) {
if socket.conn == conn { if socket.conn == conn {
wsUser.Sockets[i] = nil wsUser.Sockets[i] = nil
wsUser.Unlock() wsUser.Unlock()
//fmt.Printf("%+v\n", wsUser.Sockets)
return return
} }
} }
@ -104,6 +107,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) {
} }
} }
wsUser.Sockets = append(wsUser.Sockets[:key], wsUser.Sockets[key+1:]...) wsUser.Sockets = append(wsUser.Sockets[:key], wsUser.Sockets[key+1:]...)
//fmt.Printf("%+v\n", wsUser.Sockets)
wsUser.Unlock() wsUser.Unlock()
} }

View File

@ -2,7 +2,6 @@ package panel
import ( import (
"database/sql" "database/sql"
"fmt"
"net/http" "net/http"
"strconv" "strconv"
"strings" "strings"
@ -75,7 +74,7 @@ func SettingEdit(w http.ResponseWriter, r *http.Request, user common.User, sname
if err != nil { if err != nil {
return common.LocalError("The value of this setting couldn't be converted to an integer", w, r, user) return common.LocalError("The value of this setting couldn't be converted to an integer", w, r, user)
} }
fmt.Println("llist: ", llist) //fmt.Println("llist: ", llist)
for index, label := range strings.Split(llist, ",") { for index, label := range strings.Split(llist, ",") {
itemList = append(itemList, common.OptionLabel{ itemList = append(itemList, common.OptionLabel{