mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-25 10:59:13 +08:00
fix bug for i18n and beego v2
This commit is contained in:
@@ -2,14 +2,15 @@ package pagination
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/beego/i18n"
|
||||
"html/template"
|
||||
"math"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/beego/v2/server/web"
|
||||
"github.com/beego/i18n"
|
||||
)
|
||||
|
||||
//Pagination 分页器
|
||||
@@ -117,7 +118,7 @@ func (p *Pagination) pageURL(page string) string {
|
||||
}
|
||||
|
||||
func (p *Pagination) getLang() string {
|
||||
lang := beego.AppConfig.String("default_lang")
|
||||
lang, _ := web.AppConfig.String("default_lang")
|
||||
ulang := p.Request.FormValue("lang")
|
||||
if len(ulang) == 0 {
|
||||
clang, err := p.Request.Cookie("lang")
|
||||
|
||||
Reference in New Issue
Block a user