bug fixes related to top page and post link rewriting
This commit is contained in:
@@ -127,6 +127,7 @@ func buildPostLink(decoded, context *database.PostLinkData) string {
|
||||
b.WriteString(context.Conference)
|
||||
} else {
|
||||
b.WriteString(decoded.Conference)
|
||||
started = true
|
||||
}
|
||||
b.WriteString(".")
|
||||
if decoded.Topic == -1 {
|
||||
@@ -168,6 +169,7 @@ func (rw *postLinkRewriter) Rewrite(ctx context.Context, data string, svc rewrit
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
mydata.CommId = ctxt.CommId
|
||||
err = mydata.VerifyNames(ctx)
|
||||
if err != nil {
|
||||
return nil
|
||||
|
||||
+3
-2
@@ -342,7 +342,6 @@ func (st *amSessionStore) SessionInfo() (int, []string, int) {
|
||||
func (st *amSessionStore) sweep(tick <-chan time.Time, done chan bool) {
|
||||
for range tick {
|
||||
if st.sweepRunning.Load() {
|
||||
log.Infof("session sweep running")
|
||||
// phase 1 - identify expired sessions
|
||||
st.mutex.RLock()
|
||||
zap := make([]string, 0, len(st.sessions))
|
||||
@@ -353,7 +352,9 @@ func (st *amSessionStore) sweep(tick <-chan time.Time, done chan bool) {
|
||||
}
|
||||
}
|
||||
st.mutex.RUnlock()
|
||||
log.Infof("identified %d sessions to zap", len(zap))
|
||||
if len(zap) > 0 {
|
||||
log.Infof("identified %d sessions to zap", len(zap))
|
||||
}
|
||||
|
||||
// phase 2 - get rid of the expired sessions
|
||||
for _, k := range zap {
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
{{ user = post_getUserName(p, .) }}
|
||||
{{ text = post_getText(p, .) }}
|
||||
{{ topic = post_topic(p, .) }}
|
||||
{{ link = post_topicLink(topic, comms[i], .) }}
|
||||
{{ link = post_topicLink(comms[i], topic, .) }}
|
||||
<div class="text-black text-sm">
|
||||
<div class="mb-2">
|
||||
<strong>{{ p.Pseud | raw }}</strong>
|
||||
|
||||
Reference in New Issue
Block a user