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