Try to eliminate some of these debug comments.
This commit is contained in:
parent
00059194a5
commit
15b3ad07fa
@ -360,7 +360,6 @@ func PreparseMessage(msg string) string {
|
||||
continue
|
||||
}
|
||||
|
||||
//fmt.Printf("username: %+v\n", username)
|
||||
user, err := Users.GetByName(username)
|
||||
if err != nil {
|
||||
if err != ErrNoRows {
|
||||
|
@ -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.
|
||||
tmpl, ok := Themes[theme].TmplPtr[template]
|
||||
if ok {
|
||||
//fmt.Println("tmpl: ", tmpl)
|
||||
//fmt.Println("exiting at Themes[theme].TmplPtr[template]")
|
||||
return tmpl
|
||||
}
|
||||
|
||||
tmpl, ok = TmplPtrMap[template]
|
||||
if ok {
|
||||
//fmt.Println("exiting at TmplPtrMap[template]")
|
||||
return tmpl
|
||||
}
|
||||
//fmt.Println("just passing back the template name")
|
||||
return template
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,6 @@ func (hub *WsHubImpl) Tick() error {
|
||||
}
|
||||
_ = forumList // Might use this later after we get the base feature working
|
||||
|
||||
//fmt.Println("canSeeItem")
|
||||
if topicList[0].Sticky {
|
||||
var lastSticky = 0
|
||||
for i, row := range topicList {
|
||||
@ -138,10 +137,7 @@ func (hub *WsHubImpl) Tick() error {
|
||||
if lastSticky == 0 {
|
||||
continue
|
||||
}
|
||||
//fmt.Println("lastSticky: ", lastSticky)
|
||||
//fmt.Println("before topicList: ", topicList)
|
||||
topicList = topicList[lastSticky:]
|
||||
//fmt.Println("after topicList: ", topicList)
|
||||
}
|
||||
|
||||
// TODO: Compare to previous tick to eliminate unnecessary work and data
|
||||
|
@ -73,11 +73,13 @@ func (wsUser *WSUser) AddSocket(conn *websocket.Conn, page string) {
|
||||
if socket == nil {
|
||||
wsUser.Sockets[i] = &WSUserSocket{conn, page}
|
||||
wsUser.Unlock()
|
||||
//fmt.Printf("%+v\n", wsUser.Sockets)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
wsUser.Sockets = append(wsUser.Sockets, &WSUserSocket{conn, page})
|
||||
//fmt.Printf("%+v\n", wsUser.Sockets)
|
||||
wsUser.Unlock()
|
||||
}
|
||||
|
||||
@ -91,6 +93,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) {
|
||||
if socket.conn == conn {
|
||||
wsUser.Sockets[i] = nil
|
||||
wsUser.Unlock()
|
||||
//fmt.Printf("%+v\n", wsUser.Sockets)
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -104,6 +107,7 @@ func (wsUser *WSUser) RemoveSocket(conn *websocket.Conn) {
|
||||
}
|
||||
}
|
||||
wsUser.Sockets = append(wsUser.Sockets[:key], wsUser.Sockets[key+1:]...)
|
||||
//fmt.Printf("%+v\n", wsUser.Sockets)
|
||||
|
||||
wsUser.Unlock()
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package panel
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -75,7 +74,7 @@ func SettingEdit(w http.ResponseWriter, r *http.Request, user common.User, sname
|
||||
if err != nil {
|
||||
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, ",") {
|
||||
itemList = append(itemList, common.OptionLabel{
|
||||
|
Loading…
Reference in New Issue
Block a user