Pictures in Posts now works!
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Amsterdam Web Communities System
|
||||
* Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||
* Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -34,6 +34,12 @@ var ENOACCOUNT error = errors.New("you cannot create a new account while logged
|
||||
func LoginForm(ctxt ui.AmContext) (string, any) {
|
||||
// Get target URI.
|
||||
target := ctxt.Parameter("tgt")
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -63,6 +69,12 @@ func Login(ctxt ui.AmContext) (string, any) {
|
||||
if err == nil {
|
||||
dlg.LoadFromForm(ctxt)
|
||||
target := dlg.Field("tgt").Value
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -166,6 +178,12 @@ func Logout(ctxt ui.AmContext) (string, any) {
|
||||
func VerifyEmailForm(ctxt ui.AmContext) (string, any) {
|
||||
// Get target URI.
|
||||
target := ctxt.Parameter("tgt")
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -222,6 +240,12 @@ func VerifyEMail(ctxt ui.AmContext) (string, any) {
|
||||
if err == nil {
|
||||
dlg.LoadFromForm(ctxt)
|
||||
target := dlg.Field("tgt").Value
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -276,6 +300,12 @@ func VerifyEMail(ctxt ui.AmContext) (string, any) {
|
||||
func NewAccountUserAgreement(ctxt ui.AmContext) (string, any) {
|
||||
// Get target URI.
|
||||
target := ctxt.Parameter("tgt")
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -302,6 +332,12 @@ func NewAccountUserAgreement(ctxt ui.AmContext) (string, any) {
|
||||
func NewAccountForm(ctxt ui.AmContext) (string, any) {
|
||||
// Get target URI.
|
||||
target := ctxt.Parameter("tgt")
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
@@ -337,6 +373,12 @@ func NewAccount(ctxt ui.AmContext) (string, any) {
|
||||
if err == nil {
|
||||
dlg.LoadFromForm(ctxt)
|
||||
target := dlg.Field("tgt").Value
|
||||
if target == "" {
|
||||
v := ctxt.GetSession("lastKnownGood")
|
||||
if v != nil {
|
||||
target = v.(string)
|
||||
}
|
||||
}
|
||||
if target == "" {
|
||||
target = "/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user